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 29 matching lines...) Expand all Loading... |
40 | 40 |
41 // The CacheID returned on failed cache operations. | 41 // The CacheID returned on failed cache operations. |
42 const static int kInvalidCacheID; | 42 const static int kInvalidCacheID; |
43 | 43 |
44 enum CacheStorageError { | 44 enum CacheStorageError { |
45 CACHE_STORAGE_ERROR_NO_ERROR, | 45 CACHE_STORAGE_ERROR_NO_ERROR, |
46 CACHE_STORAGE_ERROR_NOT_IMPLEMENTED, | 46 CACHE_STORAGE_ERROR_NOT_IMPLEMENTED, |
47 CACHE_STORAGE_ERROR_NOT_FOUND, | 47 CACHE_STORAGE_ERROR_NOT_FOUND, |
48 CACHE_STORAGE_ERROR_EXISTS, | 48 CACHE_STORAGE_ERROR_EXISTS, |
49 CACHE_STORAGE_ERROR_STORAGE, | 49 CACHE_STORAGE_ERROR_STORAGE, |
50 CACHE_STORAGE_ERROR_EMPTY_KEY, | |
51 CACHE_STORAGE_ERROR_CLOSING | 50 CACHE_STORAGE_ERROR_CLOSING |
52 }; | 51 }; |
53 | 52 |
54 typedef base::Callback<void(bool, CacheStorageError)> BoolAndErrorCallback; | 53 typedef base::Callback<void(bool, CacheStorageError)> BoolAndErrorCallback; |
55 typedef base::Callback<void(int, CacheStorageError)> CacheAndErrorCallback; | 54 typedef base::Callback<void(int, CacheStorageError)> CacheAndErrorCallback; |
56 typedef base::Callback<void(const std::vector<std::string>&, | 55 typedef base::Callback<void(const std::vector<std::string>&, |
57 CacheStorageError)> StringsAndErrorCallback; | 56 CacheStorageError)> StringsAndErrorCallback; |
58 | 57 |
59 ServiceWorkerCacheStorage( | 58 ServiceWorkerCacheStorage( |
60 const base::FilePath& origin_path, | 59 const base::FilePath& origin_path, |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 scoped_ptr<CacheLoader> cache_loader_; | 162 scoped_ptr<CacheLoader> cache_loader_; |
164 | 163 |
165 base::WeakPtrFactory<ServiceWorkerCacheStorage> weak_factory_; | 164 base::WeakPtrFactory<ServiceWorkerCacheStorage> weak_factory_; |
166 | 165 |
167 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerCacheStorage); | 166 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerCacheStorage); |
168 }; | 167 }; |
169 | 168 |
170 } // namespace content | 169 } // namespace content |
171 | 170 |
172 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_STORAGE_H_ | 171 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_STORAGE_H_ |
OLD | NEW |