| 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_manager.h" | 5 #include "content/browser/cache_storage/cache_storage_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 new storage::BlobDataBuilder(base::GenerateGUID())); | 245 new storage::BlobDataBuilder(base::GenerateGUID())); |
| 246 blob_data->AppendData(url.spec()); | 246 blob_data->AppendData(url.spec()); |
| 247 | 247 |
| 248 std::unique_ptr<storage::BlobDataHandle> blob_handle = | 248 std::unique_ptr<storage::BlobDataHandle> blob_handle = |
| 249 blob_storage_context_->AddFinishedBlob(blob_data.get()); | 249 blob_storage_context_->AddFinishedBlob(blob_data.get()); |
| 250 ServiceWorkerResponse response( | 250 ServiceWorkerResponse response( |
| 251 url, status_code, "OK", blink::WebServiceWorkerResponseTypeDefault, | 251 url, status_code, "OK", blink::WebServiceWorkerResponseTypeDefault, |
| 252 ServiceWorkerHeaderMap(), blob_handle->uuid(), url.spec().size(), | 252 ServiceWorkerHeaderMap(), blob_handle->uuid(), url.spec().size(), |
| 253 GURL(), blink::WebServiceWorkerResponseErrorUnknown, base::Time(), | 253 GURL(), blink::WebServiceWorkerResponseErrorUnknown, base::Time(), |
| 254 false /* is_in_cache_storage */, | 254 false /* is_in_cache_storage */, |
| 255 std::string() /* cache_storage_cache_name */); | 255 std::string() /* cache_storage_cache_name */, |
| 256 ServiceWorkerHeaderList() /* cors_exposed_header_names */); |
| 256 | 257 |
| 257 CacheStorageBatchOperation operation; | 258 CacheStorageBatchOperation operation; |
| 258 operation.operation_type = CACHE_STORAGE_CACHE_OPERATION_TYPE_PUT; | 259 operation.operation_type = CACHE_STORAGE_CACHE_OPERATION_TYPE_PUT; |
| 259 operation.request = request; | 260 operation.request = request; |
| 260 operation.response = response; | 261 operation.response = response; |
| 261 | 262 |
| 262 base::RunLoop loop; | 263 base::RunLoop loop; |
| 263 cache->BatchOperation( | 264 cache->BatchOperation( |
| 264 std::vector<CacheStorageBatchOperation>(1, operation), | 265 std::vector<CacheStorageBatchOperation>(1, operation), |
| 265 base::Bind(&CacheStorageManagerTest::CachePutCallback, | 266 base::Bind(&CacheStorageManagerTest::CachePutCallback, |
| (...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1146 | 1147 |
| 1147 INSTANTIATE_TEST_CASE_P(CacheStorageManagerTests, | 1148 INSTANTIATE_TEST_CASE_P(CacheStorageManagerTests, |
| 1148 CacheStorageManagerTestP, | 1149 CacheStorageManagerTestP, |
| 1149 ::testing::Values(false, true)); | 1150 ::testing::Values(false, true)); |
| 1150 | 1151 |
| 1151 INSTANTIATE_TEST_CASE_P(CacheStorageQuotaClientTests, | 1152 INSTANTIATE_TEST_CASE_P(CacheStorageQuotaClientTests, |
| 1152 CacheStorageQuotaClientTestP, | 1153 CacheStorageQuotaClientTestP, |
| 1153 ::testing::Values(false, true)); | 1154 ::testing::Values(false, true)); |
| 1154 | 1155 |
| 1155 } // namespace content | 1156 } // namespace content |
| OLD | NEW |