| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1682 int* result, | 1682 int* result, |
| 1683 const base::Closure& continuation, | 1683 const base::Closure& continuation, |
| 1684 std::unique_ptr<CacheStorageCacheHandle> cache_handle, | 1684 std::unique_ptr<CacheStorageCacheHandle> cache_handle, |
| 1685 CacheStorageError error, | 1685 CacheStorageError error, |
| 1686 std::unique_ptr<ServiceWorkerResponse> response, | 1686 std::unique_ptr<ServiceWorkerResponse> response, |
| 1687 std::unique_ptr<storage::BlobDataHandle> blob_data_handle) { | 1687 std::unique_ptr<storage::BlobDataHandle> blob_data_handle) { |
| 1688 ASSERT_EQ(CACHE_STORAGE_OK, error); | 1688 ASSERT_EQ(CACHE_STORAGE_OK, error); |
| 1689 blob_data_handle_ = std::move(blob_data_handle); | 1689 blob_data_handle_ = std::move(blob_data_handle); |
| 1690 blob_reader_ = blob_data_handle_->CreateReader( | 1690 blob_reader_ = blob_data_handle_->CreateReader( |
| 1691 file_system_context_, | 1691 file_system_context_, |
| 1692 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get()); | 1692 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get()); |
| 1693 const storage::BlobReader::Status status = blob_reader_->CalculateSize( | 1693 const storage::BlobReader::Status status = blob_reader_->CalculateSize( |
| 1694 base::Bind(&self::OnBlobReaderCalculateSizeCallback, this, result, | 1694 base::Bind(&self::OnBlobReaderCalculateSizeCallback, this, result, |
| 1695 continuation)); | 1695 continuation)); |
| 1696 | 1696 |
| 1697 ASSERT_NE(storage::BlobReader::Status::NET_ERROR, status); | 1697 ASSERT_NE(storage::BlobReader::Status::NET_ERROR, status); |
| 1698 if (status == storage::BlobReader::Status::DONE) | 1698 if (status == storage::BlobReader::Status::DONE) |
| 1699 OnBlobReaderCalculateSizeCallback(result, continuation, net::OK); | 1699 OnBlobReaderCalculateSizeCallback(result, continuation, net::OK); |
| 1700 } | 1700 } |
| 1701 | 1701 |
| 1702 void OnBlobReaderCalculateSizeCallback(int* result, | 1702 void OnBlobReaderCalculateSizeCallback(int* result, |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1895 private: | 1895 private: |
| 1896 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerV8CacheStrategiesAggressiveTest); | 1896 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerV8CacheStrategiesAggressiveTest); |
| 1897 }; | 1897 }; |
| 1898 | 1898 |
| 1899 IN_PROC_BROWSER_TEST_F(ServiceWorkerV8CacheStrategiesAggressiveTest, | 1899 IN_PROC_BROWSER_TEST_F(ServiceWorkerV8CacheStrategiesAggressiveTest, |
| 1900 V8CacheOnCacheStorage) { | 1900 V8CacheOnCacheStorage) { |
| 1901 CheckStrategyIsAggressive(); | 1901 CheckStrategyIsAggressive(); |
| 1902 } | 1902 } |
| 1903 | 1903 |
| 1904 } // namespace content | 1904 } // namespace content |
| OLD | NEW |