| 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.h" | 5 #include "content/browser/cache_storage/cache_storage.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 const CacheStorage::SizeCallback& callback) { | 52 const CacheStorage::SizeCallback& callback) { |
| 53 base::ThreadTaskRunnerHandle::Get()->PostTask( | 53 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 54 FROM_HERE, base::Bind(callback, *accumulator)); | 54 FROM_HERE, base::Bind(callback, *accumulator)); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void DoNothingWithBool(bool success) {} | 57 void DoNothingWithBool(bool success) {} |
| 58 | 58 |
| 59 } // namespace | 59 } // namespace |
| 60 | 60 |
| 61 const char CacheStorage::kIndexFileName[] = "index.txt"; | 61 const char CacheStorage::kIndexFileName[] = "index.txt"; |
| 62 const int64_t CacheStorage::kSizeUnknown; | 62 constexpr int64_t CacheStorage::kSizeUnknown; |
| 63 | 63 |
| 64 struct CacheStorage::CacheMatchResponse { | 64 struct CacheStorage::CacheMatchResponse { |
| 65 CacheMatchResponse() = default; | 65 CacheMatchResponse() = default; |
| 66 ~CacheMatchResponse() = default; | 66 ~CacheMatchResponse() = default; |
| 67 | 67 |
| 68 CacheStorageError error; | 68 CacheStorageError error; |
| 69 std::unique_ptr<ServiceWorkerResponse> service_worker_response; | 69 std::unique_ptr<ServiceWorkerResponse> service_worker_response; |
| 70 std::unique_ptr<storage::BlobDataHandle> blob_data_handle; | 70 std::unique_ptr<storage::BlobDataHandle> blob_data_handle; |
| 71 }; | 71 }; |
| 72 | 72 |
| (...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1096 GetLoadedCache(cache_metadata.name); | 1096 GetLoadedCache(cache_metadata.name); |
| 1097 CacheStorageCache* cache = cache_handle->value(); | 1097 CacheStorageCache* cache = cache_handle->value(); |
| 1098 cache->Size(base::Bind(&CacheStorage::SizeRetrievedFromCache, | 1098 cache->Size(base::Bind(&CacheStorage::SizeRetrievedFromCache, |
| 1099 weak_factory_.GetWeakPtr(), | 1099 weak_factory_.GetWeakPtr(), |
| 1100 base::Passed(std::move(cache_handle)), | 1100 base::Passed(std::move(cache_handle)), |
| 1101 barrier_closure, accumulator_ptr)); | 1101 barrier_closure, accumulator_ptr)); |
| 1102 } | 1102 } |
| 1103 } | 1103 } |
| 1104 | 1104 |
| 1105 } // namespace content | 1105 } // namespace content |
| OLD | NEW |