cache_type.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright (c) 2009 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef NET_BASE_CACHE_TYPE_H_
  5. #define NET_BASE_CACHE_TYPE_H_
  6. namespace net {
  7. // The types of caches that can be created.
  8. // Note: enum values used in some metrics, so add new values at end only,
  9. // and don't renumber old ones.
  10. enum CacheType {
  11. DISK_CACHE, // Disk is used as the backing storage.
  12. MEMORY_CACHE, // Data is stored only in memory.
  13. REMOVED_MEDIA_CACHE, // No longer in use.
  14. APP_CACHE, // Special case of DISK_CACHE. Optimizes for
  15. // cases where auto-eviction is not desired:
  16. // e.g. cache_storage, service worker script cache
  17. SHADER_CACHE, // Backing store for the GL shader cache.
  18. PNACL_CACHE, // Backing store the PNaCl translation cache
  19. GENERATED_BYTE_CODE_CACHE, // Backing store for renderer generated data like
  20. // bytecode for JavaScript.
  21. GENERATED_NATIVE_CODE_CACHE, // Backing store for renderer generated data
  22. // like native code for WebAssembly.
  23. GENERATED_WEBUI_BYTE_CODE_CACHE, // Backing store for renderer generated data
  24. // like bytecode for JavaScript from WebUI
  25. // pages.
  26. };
  27. // The types of disk cache backend, only used at backend instantiation.
  28. enum BackendType {
  29. CACHE_BACKEND_DEFAULT,
  30. CACHE_BACKEND_BLOCKFILE, // The |BackendImpl|.
  31. CACHE_BACKEND_SIMPLE // The |SimpleBackendImpl|.
  32. };
  33. } // namespace net
  34. #endif // NET_BASE_CACHE_TYPE_H_