| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CACHE_H_ | 5 #ifndef CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CACHE_H_ |
| 6 #define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CACHE_H_ | 6 #define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CACHE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 int expected_bytes, | 318 int expected_bytes, |
| 319 int rv); | 319 int rv); |
| 320 void PutDidWriteBlobToCache(std::unique_ptr<PutContext> put_context, | 320 void PutDidWriteBlobToCache(std::unique_ptr<PutContext> put_context, |
| 321 BlobToDiskCacheIDMap::KeyType blob_to_cache_key, | 321 BlobToDiskCacheIDMap::KeyType blob_to_cache_key, |
| 322 disk_cache::ScopedEntryPtr entry, | 322 disk_cache::ScopedEntryPtr entry, |
| 323 bool success); | 323 bool success); |
| 324 | 324 |
| 325 // Asynchronously calculates the current cache size, notifies the quota | 325 // Asynchronously calculates the current cache size, notifies the quota |
| 326 // manager of any change from the last report, and sets cache_size_ to the new | 326 // manager of any change from the last report, and sets cache_size_ to the new |
| 327 // size. | 327 // size. |
| 328 void UpdateCacheSize(); | 328 void UpdateCacheSize(const base::Closure& callback); |
| 329 void UpdateCacheSizeGotSize(std::unique_ptr<CacheStorageCacheHandle>, | 329 void UpdateCacheSizeGotSize(std::unique_ptr<CacheStorageCacheHandle>, |
| 330 const base::Closure& callback, |
| 330 int current_cache_size); | 331 int current_cache_size); |
| 331 | 332 |
| 332 // Returns ERROR_NOT_FOUND if not found. Otherwise deletes and returns OK. | 333 // Returns ERROR_NOT_FOUND if not found. Otherwise deletes and returns OK. |
| 333 void Delete(const CacheStorageBatchOperation& operation, | 334 void Delete(const CacheStorageBatchOperation& operation, |
| 334 const ErrorCallback& callback); | 335 const ErrorCallback& callback); |
| 335 void DeleteImpl(std::unique_ptr<ServiceWorkerFetchRequest> request, | 336 void DeleteImpl(std::unique_ptr<ServiceWorkerFetchRequest> request, |
| 336 const CacheStorageCacheQueryParams& match_params, | 337 const CacheStorageCacheQueryParams& match_params, |
| 337 const ErrorCallback& callback); | 338 const ErrorCallback& callback); |
| 338 void DeleteDidQueryCache( | 339 void DeleteDidQueryCache( |
| 339 const ErrorCallback& callback, | 340 const ErrorCallback& callback, |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 bool memory_only_; | 410 bool memory_only_; |
| 410 | 411 |
| 411 base::WeakPtrFactory<CacheStorageCache> weak_ptr_factory_; | 412 base::WeakPtrFactory<CacheStorageCache> weak_ptr_factory_; |
| 412 | 413 |
| 413 DISALLOW_COPY_AND_ASSIGN(CacheStorageCache); | 414 DISALLOW_COPY_AND_ASSIGN(CacheStorageCache); |
| 414 }; | 415 }; |
| 415 | 416 |
| 416 } // namespace content | 417 } // namespace content |
| 417 | 418 |
| 418 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CACHE_H_ | 419 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CACHE_H_ |
| OLD | NEW |