Chromium Code Reviews| Index: content/browser/cache_storage/cache_storage_cache.h |
| diff --git a/content/browser/cache_storage/cache_storage_cache.h b/content/browser/cache_storage/cache_storage_cache.h |
| index ea5541cc9253e07564dffaeacf615ed35d0b3455..ae6a8a4ef79e8f6148e012155a48edfe8a7db78d 100644 |
| --- a/content/browser/cache_storage/cache_storage_cache.h |
| +++ b/content/browser/cache_storage/cache_storage_cache.h |
| @@ -34,10 +34,11 @@ class QuotaManagerProxy; |
| } |
| namespace content { |
| +class CacheMetadata; |
| class CacheStorage; |
| class CacheStorageBlobToDiskCache; |
| class CacheStorageCacheHandle; |
| -class CacheMetadata; |
| +class CacheStorageCacheObserver; |
| class CacheStorageScheduler; |
| class TestCacheStorageCache; |
| @@ -79,7 +80,8 @@ class CONTENT_EXPORT CacheStorageCache { |
| const base::FilePath& path, |
| scoped_refptr<net::URLRequestContextGetter> request_context_getter, |
| scoped_refptr<storage::QuotaManagerProxy> quota_manager_proxy, |
| - base::WeakPtr<storage::BlobStorageContext> blob_context); |
| + base::WeakPtr<storage::BlobStorageContext> blob_context, |
| + int64_t cache_size); |
| // Returns ERROR_TYPE_NOT_FOUND if not found. |
| void Match(std::unique_ptr<ServiceWorkerFetchRequest> request, |
| @@ -154,6 +156,10 @@ class CONTENT_EXPORT CacheStorageCache { |
| std::string cache_name() const { return cache_name_; } |
| + int64_t cache_size() const { return cache_size_; } |
| + |
| + void SetObserver(CacheStorageCacheObserver* observer); |
|
jkarlin
2016/10/21 18:04:19
This needs documentation, especially to specify th
cmumford
2016/11/10 17:28:16
Function deleted.
|
| + |
| base::WeakPtr<CacheStorageCache> AsWeakPtr(); |
| private: |
| @@ -195,7 +201,8 @@ class CONTENT_EXPORT CacheStorageCache { |
| CacheStorage* cache_storage, |
| scoped_refptr<net::URLRequestContextGetter> request_context_getter, |
| scoped_refptr<storage::QuotaManagerProxy> quota_manager_proxy, |
| - base::WeakPtr<storage::BlobStorageContext> blob_context); |
| + base::WeakPtr<storage::BlobStorageContext> blob_context, |
| + int64_t cache_size); |
| // Returns all entries in this cache. |
| void OpenAllEntries(const OpenAllEntriesCallback& callback); |
| @@ -384,8 +391,9 @@ class CONTENT_EXPORT CacheStorageCache { |
| BackendState backend_state_ = BACKEND_UNINITIALIZED; |
| std::unique_ptr<CacheStorageScheduler> scheduler_; |
| bool initializing_ = false; |
| - int64_t cache_size_ = 0; |
| + int64_t cache_size_; |
| size_t max_query_size_bytes_; |
| + CacheStorageCacheObserver* cache_observer_; |
| // Owns the elements of the list |
| BlobToDiskCacheIDMap active_blob_to_disk_cache_writers_; |