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 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_STORAGE_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_STORAGE_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_STORAGE_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_STORAGE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 const BoolAndErrorCallback& callback, | 140 const BoolAndErrorCallback& callback, |
141 bool success); | 141 bool success); |
142 void DeleteCacheDidCleanUp(const BoolAndErrorCallback& callback, | 142 void DeleteCacheDidCleanUp(const BoolAndErrorCallback& callback, |
143 bool success); | 143 bool success); |
144 | 144 |
145 // The MatchCache callbacks are below. | 145 // The MatchCache callbacks are below. |
146 void MatchCacheDidMatch(const scoped_refptr<ServiceWorkerCache>& cache, | 146 void MatchCacheDidMatch(const scoped_refptr<ServiceWorkerCache>& cache, |
147 const ServiceWorkerCache::ResponseCallback& callback, | 147 const ServiceWorkerCache::ResponseCallback& callback, |
148 ServiceWorkerCache::ErrorType error, | 148 ServiceWorkerCache::ErrorType error, |
149 scoped_ptr<ServiceWorkerResponse> response, | 149 scoped_ptr<ServiceWorkerResponse> response, |
150 scoped_ptr<storage::BlobDataHandle> handle); | 150 scoped_ptr<storage::BlobDataSnapshotHandle> handle); |
151 | 151 |
152 // The MatchAllCaches callbacks are below. | 152 // The MatchAllCaches callbacks are below. |
153 void MatchAllCachesDidMatch(scoped_refptr<ServiceWorkerCache> cache, | 153 void MatchAllCachesDidMatch( |
154 const base::Closure& barrier_closure, | 154 scoped_refptr<ServiceWorkerCache> cache, |
155 ServiceWorkerCache::ResponseCallback* callback, | 155 const base::Closure& barrier_closure, |
156 ServiceWorkerCache::ErrorType error, | 156 ServiceWorkerCache::ResponseCallback* callback, |
157 scoped_ptr<ServiceWorkerResponse> response, | 157 ServiceWorkerCache::ErrorType error, |
158 scoped_ptr<storage::BlobDataHandle> handle); | 158 scoped_ptr<ServiceWorkerResponse> response, |
| 159 scoped_ptr<storage::BlobDataSnapshotHandle> handle); |
159 void MatchAllCachesDidMatchAll( | 160 void MatchAllCachesDidMatchAll( |
160 scoped_ptr<ServiceWorkerCache::ResponseCallback> callback); | 161 scoped_ptr<ServiceWorkerCache::ResponseCallback> callback); |
161 | 162 |
162 // Whether or not we've loaded the list of cache names into memory. | 163 // Whether or not we've loaded the list of cache names into memory. |
163 bool initialized_; | 164 bool initialized_; |
164 | 165 |
165 // The list of operations waiting on initialization. | 166 // The list of operations waiting on initialization. |
166 std::vector<base::Closure> init_callbacks_; | 167 std::vector<base::Closure> init_callbacks_; |
167 | 168 |
168 // The map of cache names to ServiceWorkerCache objects. | 169 // The map of cache names to ServiceWorkerCache objects. |
(...skipping 15 matching lines...) Expand all Loading... |
184 scoped_ptr<CacheLoader> cache_loader_; | 185 scoped_ptr<CacheLoader> cache_loader_; |
185 | 186 |
186 base::WeakPtrFactory<ServiceWorkerCacheStorage> weak_factory_; | 187 base::WeakPtrFactory<ServiceWorkerCacheStorage> weak_factory_; |
187 | 188 |
188 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerCacheStorage); | 189 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerCacheStorage); |
189 }; | 190 }; |
190 | 191 |
191 } // namespace content | 192 } // namespace content |
192 | 193 |
193 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_STORAGE_H_ | 194 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_STORAGE_H_ |
OLD | NEW |