Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(565)

Side by Side Diff: content/browser/cache_storage/cache_storage.h

Issue 2167483002: [CacheStorage] Simpler way to wrap callbacks to run pending operation completions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment clarification Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_H_ 5 #ifndef CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_H_
6 #define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_H_ 6 #define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 std::unique_ptr<ServiceWorkerResponse> service_worker_response, 192 std::unique_ptr<ServiceWorkerResponse> service_worker_response,
193 std::unique_ptr<storage::BlobDataHandle> handle); 193 std::unique_ptr<storage::BlobDataHandle> handle);
194 void MatchAllCachesDidMatchAll( 194 void MatchAllCachesDidMatchAll(
195 std::unique_ptr<std::vector<CacheMatchResponse>> match_responses, 195 std::unique_ptr<std::vector<CacheMatchResponse>> match_responses,
196 const CacheStorageCache::ResponseCallback& callback); 196 const CacheStorageCache::ResponseCallback& callback);
197 197
198 void GetSizeThenCloseAllCachesImpl(const SizeCallback& callback); 198 void GetSizeThenCloseAllCachesImpl(const SizeCallback& callback);
199 199
200 void SizeImpl(const SizeCallback& callback); 200 void SizeImpl(const SizeCallback& callback);
201 201
202 void PendingClosure(const base::Closure& callback);
203 void PendingBoolAndErrorCallback(const BoolAndErrorCallback& callback,
204 bool found,
205 CacheStorageError error);
206 void PendingCacheAndErrorCallback(
207 const CacheAndErrorCallback& callback,
208 std::unique_ptr<CacheStorageCacheHandle> cache_handle,
209 CacheStorageError error);
210 void PendingStringsAndErrorCallback(const StringsAndErrorCallback& callback,
211 const StringVector& strings,
212 CacheStorageError error);
213 void PendingResponseCallback(
214 const CacheStorageCache::ResponseCallback& callback,
215 CacheStorageError error,
216 std::unique_ptr<ServiceWorkerResponse> response,
217 std::unique_ptr<storage::BlobDataHandle> blob_data_handle);
218
219 void PendingSizeCallback(const SizeCallback& callback, int64_t size);
220
221 // Whether or not we've loaded the list of cache names into memory. 202 // Whether or not we've loaded the list of cache names into memory.
222 bool initialized_; 203 bool initialized_;
223 bool initializing_; 204 bool initializing_;
224 205
225 // True if the backend is supposed to reside in memory only. 206 // True if the backend is supposed to reside in memory only.
226 bool memory_only_; 207 bool memory_only_;
227 208
228 // The pending operation scheduler. 209 // The pending operation scheduler.
229 std::unique_ptr<CacheStorageScheduler> scheduler_; 210 std::unique_ptr<CacheStorageScheduler> scheduler_;
230 211
(...skipping 27 matching lines...) Expand all
258 GURL origin_; 239 GURL origin_;
259 240
260 base::WeakPtrFactory<CacheStorage> weak_factory_; 241 base::WeakPtrFactory<CacheStorage> weak_factory_;
261 242
262 DISALLOW_COPY_AND_ASSIGN(CacheStorage); 243 DISALLOW_COPY_AND_ASSIGN(CacheStorage);
263 }; 244 };
264 245
265 } // namespace content 246 } // namespace content
266 247
267 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_H_ 248 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_H_
OLDNEW
« no previous file with comments | « content/browser/background_sync/background_sync_manager.cc ('k') | content/browser/cache_storage/cache_storage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698