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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 typedef base::Callback<void(const StringVector&, CacheStorageError)> | 49 typedef base::Callback<void(const StringVector&, CacheStorageError)> |
50 StringsAndErrorCallback; | 50 StringsAndErrorCallback; |
51 | 51 |
52 static const char kIndexFileName[]; | 52 static const char kIndexFileName[]; |
53 | 53 |
54 ServiceWorkerCacheStorage( | 54 ServiceWorkerCacheStorage( |
55 const base::FilePath& origin_path, | 55 const base::FilePath& origin_path, |
56 bool memory_only, | 56 bool memory_only, |
57 base::SequencedTaskRunner* cache_task_runner, | 57 base::SequencedTaskRunner* cache_task_runner, |
58 net::URLRequestContext* request_context, | 58 net::URLRequestContext* request_context, |
| 59 const scoped_refptr<storage::QuotaManagerProxy>& quota_manager_proxy, |
59 base::WeakPtr<storage::BlobStorageContext> blob_context, | 60 base::WeakPtr<storage::BlobStorageContext> blob_context, |
60 const GURL& origin); | 61 const GURL& origin); |
61 | 62 |
62 // Any unfinished asynchronous operations may not complete or call their | 63 // Any unfinished asynchronous operations may not complete or call their |
63 // callbacks. | 64 // callbacks. |
64 virtual ~ServiceWorkerCacheStorage(); | 65 virtual ~ServiceWorkerCacheStorage(); |
65 | 66 |
66 // Get the cache for the given key. If the cache is not found it is | 67 // Get the cache for the given key. If the cache is not found it is |
67 // created. | 68 // created. |
68 void OpenCache(const std::string& cache_name, | 69 void OpenCache(const std::string& cache_name, |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 scoped_ptr<CacheLoader> cache_loader_; | 148 scoped_ptr<CacheLoader> cache_loader_; |
148 | 149 |
149 base::WeakPtrFactory<ServiceWorkerCacheStorage> weak_factory_; | 150 base::WeakPtrFactory<ServiceWorkerCacheStorage> weak_factory_; |
150 | 151 |
151 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerCacheStorage); | 152 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerCacheStorage); |
152 }; | 153 }; |
153 | 154 |
154 } // namespace content | 155 } // namespace content |
155 | 156 |
156 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_STORAGE_H_ | 157 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CACHE_STORAGE_H_ |
OLD | NEW |