| 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 #include "content/browser/cache_storage/cache_storage_cache.h" | 5 #include "content/browser/cache_storage/cache_storage_cache.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 CacheStorage* cache_storage, | 275 CacheStorage* cache_storage, |
| 276 const scoped_refptr<net::URLRequestContextGetter>& request_context_getter, | 276 const scoped_refptr<net::URLRequestContextGetter>& request_context_getter, |
| 277 const scoped_refptr<storage::QuotaManagerProxy>& quota_manager_proxy, | 277 const scoped_refptr<storage::QuotaManagerProxy>& quota_manager_proxy, |
| 278 base::WeakPtr<storage::BlobStorageContext> blob_context) | 278 base::WeakPtr<storage::BlobStorageContext> blob_context) |
| 279 : CacheStorageCache(origin, | 279 : CacheStorageCache(origin, |
| 280 cache_name, | 280 cache_name, |
| 281 path, | 281 path, |
| 282 cache_storage, | 282 cache_storage, |
| 283 request_context_getter, | 283 request_context_getter, |
| 284 quota_manager_proxy, | 284 quota_manager_proxy, |
| 285 blob_context), | 285 blob_context, |
| 286 0 /* cache_size */), |
| 286 delay_backend_creation_(false) {} | 287 delay_backend_creation_(false) {} |
| 287 | 288 |
| 288 void CreateBackend(const ErrorCallback& callback) override { | 289 void CreateBackend(const ErrorCallback& callback) override { |
| 289 backend_creation_callback_ = callback; | 290 backend_creation_callback_ = callback; |
| 290 if (delay_backend_creation_) | 291 if (delay_backend_creation_) |
| 291 return; | 292 return; |
| 292 ContinueCreateBackend(); | 293 ContinueCreateBackend(); |
| 293 } | 294 } |
| 294 | 295 |
| 295 void ContinueCreateBackend() { | 296 void ContinueCreateBackend() { |
| (...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1645 EXPECT_EQ(1, sequence_out); | 1646 EXPECT_EQ(1, sequence_out); |
| 1646 close_loop2->Run(); | 1647 close_loop2->Run(); |
| 1647 EXPECT_EQ(2, sequence_out); | 1648 EXPECT_EQ(2, sequence_out); |
| 1648 } | 1649 } |
| 1649 | 1650 |
| 1650 INSTANTIATE_TEST_CASE_P(CacheStorageCacheTest, | 1651 INSTANTIATE_TEST_CASE_P(CacheStorageCacheTest, |
| 1651 CacheStorageCacheTestP, | 1652 CacheStorageCacheTestP, |
| 1652 ::testing::Values(false, true)); | 1653 ::testing::Values(false, true)); |
| 1653 | 1654 |
| 1654 } // namespace content | 1655 } // namespace content |
| OLD | NEW |