| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 const base::Closure& callback, | 107 const base::Closure& callback, |
| 108 scoped_ptr<std::vector<std::string> > indexed_cache_names); | 108 scoped_ptr<std::vector<std::string> > indexed_cache_names); |
| 109 void LazyInitIterateAndLoadCacheName( | 109 void LazyInitIterateAndLoadCacheName( |
| 110 const base::Closure& callback, | 110 const base::Closure& callback, |
| 111 scoped_ptr<std::vector<std::string> > indexed_cache_names, | 111 scoped_ptr<std::vector<std::string> > indexed_cache_names, |
| 112 const std::vector<std::string>::const_iterator& iter, | 112 const std::vector<std::string>::const_iterator& iter, |
| 113 const std::string& cache_name, | 113 const std::string& cache_name, |
| 114 scoped_ptr<ServiceWorkerCache> cache); | 114 scoped_ptr<ServiceWorkerCache> cache); |
| 115 void LazyInitDone(); | 115 void LazyInitDone(); |
| 116 | 116 |
| 117 void DidCreateBackend(base::WeakPtr<ServiceWorkerCache> cache, | |
| 118 CacheID cache_id, | |
| 119 const CacheAndErrorCallback& callback, | |
| 120 ServiceWorkerCache::ErrorType error); | |
| 121 | |
| 122 CacheContext* AddCacheToMaps(const std::string& cache_name, | 117 CacheContext* AddCacheToMaps(const std::string& cache_name, |
| 123 scoped_ptr<ServiceWorkerCache> cache); | 118 scoped_ptr<ServiceWorkerCache> cache); |
| 124 | 119 |
| 125 // The CreateCache callbacks are below. | 120 // The CreateCache callbacks are below. |
| 126 void CreateCacheDidCreateCache(const std::string& cache_name, | 121 void CreateCacheDidCreateCache(const std::string& cache_name, |
| 127 const CacheAndErrorCallback& callback, | 122 const CacheAndErrorCallback& callback, |
| 128 scoped_ptr<ServiceWorkerCache> cache); | 123 scoped_ptr<ServiceWorkerCache> cache); |
| 129 void CreateCacheDidWriteIndex(const CacheAndErrorCallback& callback, | 124 void CreateCacheDidWriteIndex(const CacheAndErrorCallback& callback, |
| 130 base::WeakPtr<ServiceWorkerCache> cache, | 125 base::WeakPtr<ServiceWorkerCache> cache, |
| 131 CacheID id, | 126 CacheID id, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 scoped_ptr<CacheLoader> cache_loader_; | 158 scoped_ptr<CacheLoader> cache_loader_; |
| 164 | 159 |
| 165 base::WeakPtrFactory<ServiceWorkerCacheStorage> weak_factory_; | 160 base::WeakPtrFactory<ServiceWorkerCacheStorage> weak_factory_; |
| 166 | 161 |
| 167 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerCacheStorage); | 162 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerCacheStorage); |
| 168 }; | 163 }; |
| 169 | 164 |
| 170 } // namespace content | 165 } // namespace content |
| 171 | 166 |
| 172 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_STORAGE_H_ | 167 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_STORAGE_H_ |
| OLD | NEW |