| 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 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 | 233 |
| 234 scoped_ptr<storage::BlobDataBuilder> blob_data( | 234 scoped_ptr<storage::BlobDataBuilder> blob_data( |
| 235 new storage::BlobDataBuilder(base::GenerateGUID())); | 235 new storage::BlobDataBuilder(base::GenerateGUID())); |
| 236 blob_data->AppendData(url.spec()); | 236 blob_data->AppendData(url.spec()); |
| 237 | 237 |
| 238 scoped_ptr<storage::BlobDataHandle> blob_handle = | 238 scoped_ptr<storage::BlobDataHandle> blob_handle = |
| 239 blob_storage_context_->AddFinishedBlob(blob_data.get()); | 239 blob_storage_context_->AddFinishedBlob(blob_data.get()); |
| 240 ServiceWorkerResponse response( | 240 ServiceWorkerResponse response( |
| 241 url, 200, "OK", blink::WebServiceWorkerResponseTypeDefault, | 241 url, 200, "OK", blink::WebServiceWorkerResponseTypeDefault, |
| 242 ServiceWorkerHeaderMap(), blob_handle->uuid(), url.spec().size(), | 242 ServiceWorkerHeaderMap(), blob_handle->uuid(), url.spec().size(), |
| 243 GURL(), blink::WebServiceWorkerResponseErrorUnknown); | 243 GURL(), blink::WebServiceWorkerResponseErrorUnknown, base::Time()); |
| 244 | 244 |
| 245 CacheStorageBatchOperation operation; | 245 CacheStorageBatchOperation operation; |
| 246 operation.operation_type = CACHE_STORAGE_CACHE_OPERATION_TYPE_PUT; | 246 operation.operation_type = CACHE_STORAGE_CACHE_OPERATION_TYPE_PUT; |
| 247 operation.request = request; | 247 operation.request = request; |
| 248 operation.response = response; | 248 operation.response = response; |
| 249 | 249 |
| 250 base::RunLoop loop; | 250 base::RunLoop loop; |
| 251 cache->BatchOperation( | 251 cache->BatchOperation( |
| 252 std::vector<CacheStorageBatchOperation>(1, operation), | 252 std::vector<CacheStorageBatchOperation>(1, operation), |
| 253 base::Bind(&CacheStorageManagerTest::CachePutCallback, | 253 base::Bind(&CacheStorageManagerTest::CachePutCallback, |
| (...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1037 | 1037 |
| 1038 INSTANTIATE_TEST_CASE_P(CacheStorageManagerTests, | 1038 INSTANTIATE_TEST_CASE_P(CacheStorageManagerTests, |
| 1039 CacheStorageManagerTestP, | 1039 CacheStorageManagerTestP, |
| 1040 ::testing::Values(false, true)); | 1040 ::testing::Values(false, true)); |
| 1041 | 1041 |
| 1042 INSTANTIATE_TEST_CASE_P(CacheStorageQuotaClientTests, | 1042 INSTANTIATE_TEST_CASE_P(CacheStorageQuotaClientTests, |
| 1043 CacheStorageQuotaClientTestP, | 1043 CacheStorageQuotaClientTestP, |
| 1044 ::testing::Values(false, true)); | 1044 ::testing::Values(false, true)); |
| 1045 | 1045 |
| 1046 } // namespace content | 1046 } // namespace content |
| OLD | NEW |