| 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 <vector> | 10 #include <vector> |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 std::unique_ptr<ScopedBackendPtr> backend_ptr, | 329 std::unique_ptr<ScopedBackendPtr> backend_ptr, |
| 330 int rv); | 330 int rv); |
| 331 | 331 |
| 332 void InitBackend(); | 332 void InitBackend(); |
| 333 void InitDidCreateBackend(const base::Closure& callback, | 333 void InitDidCreateBackend(const base::Closure& callback, |
| 334 CacheStorageError cache_create_error); | 334 CacheStorageError cache_create_error); |
| 335 void InitGotCacheSize(const base::Closure& callback, | 335 void InitGotCacheSize(const base::Closure& callback, |
| 336 CacheStorageError cache_create_error, | 336 CacheStorageError cache_create_error, |
| 337 int cache_size); | 337 int cache_size); |
| 338 | 338 |
| 339 void PendingClosure(const base::Closure& callback); | |
| 340 void PendingErrorCallback(const ErrorCallback& callback, | |
| 341 CacheStorageError error); | |
| 342 void PendingResponseCallback( | |
| 343 const ResponseCallback& callback, | |
| 344 CacheStorageError error, | |
| 345 std::unique_ptr<ServiceWorkerResponse> response, | |
| 346 std::unique_ptr<storage::BlobDataHandle> blob_data_handle); | |
| 347 void PendingResponsesCallback( | |
| 348 const ResponsesCallback& callback, | |
| 349 CacheStorageError error, | |
| 350 std::unique_ptr<Responses> responses, | |
| 351 std::unique_ptr<BlobDataHandles> blob_data_handles); | |
| 352 void PendingRequestsCallback(const RequestsCallback& callback, | |
| 353 CacheStorageError error, | |
| 354 std::unique_ptr<Requests> requests); | |
| 355 void PendingSizeCallback(const SizeCallback& callback, int64_t size); | |
| 356 | |
| 357 void PopulateResponseMetadata(const CacheMetadata& metadata, | 339 void PopulateResponseMetadata(const CacheMetadata& metadata, |
| 358 ServiceWorkerResponse* response); | 340 ServiceWorkerResponse* response); |
| 359 std::unique_ptr<storage::BlobDataHandle> PopulateResponseBody( | 341 std::unique_ptr<storage::BlobDataHandle> PopulateResponseBody( |
| 360 disk_cache::ScopedEntryPtr entry, | 342 disk_cache::ScopedEntryPtr entry, |
| 361 ServiceWorkerResponse* response); | 343 ServiceWorkerResponse* response); |
| 362 | 344 |
| 363 // Virtual for testing. | 345 // Virtual for testing. |
| 364 virtual std::unique_ptr<CacheStorageCacheHandle> CreateCacheHandle(); | 346 virtual std::unique_ptr<CacheStorageCacheHandle> CreateCacheHandle(); |
| 365 | 347 |
| 366 // Be sure to check |backend_state_| before use. | 348 // Be sure to check |backend_state_| before use. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 388 bool memory_only_; | 370 bool memory_only_; |
| 389 | 371 |
| 390 base::WeakPtrFactory<CacheStorageCache> weak_ptr_factory_; | 372 base::WeakPtrFactory<CacheStorageCache> weak_ptr_factory_; |
| 391 | 373 |
| 392 DISALLOW_COPY_AND_ASSIGN(CacheStorageCache); | 374 DISALLOW_COPY_AND_ASSIGN(CacheStorageCache); |
| 393 }; | 375 }; |
| 394 | 376 |
| 395 } // namespace content | 377 } // namespace content |
| 396 | 378 |
| 397 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CACHE_H_ | 379 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CACHE_H_ |
| OLD | NEW |