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_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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 222 |
223 // The names of caches in the order that they were created. | 223 // The names of caches in the order that they were created. |
224 StringVector ordered_cache_names_; | 224 StringVector ordered_cache_names_; |
225 | 225 |
226 // The file path for this CacheStorage. | 226 // The file path for this CacheStorage. |
227 base::FilePath origin_path_; | 227 base::FilePath origin_path_; |
228 | 228 |
229 // The TaskRunner to run file IO on. | 229 // The TaskRunner to run file IO on. |
230 scoped_refptr<base::SequencedTaskRunner> cache_task_runner_; | 230 scoped_refptr<base::SequencedTaskRunner> cache_task_runner_; |
231 | 231 |
232 // Whether or not to store data in disk or memory. | |
233 bool memory_only_; | |
234 | |
235 // Performs backend specific operations (memory vs disk). | 232 // Performs backend specific operations (memory vs disk). |
236 std::unique_ptr<CacheLoader> cache_loader_; | 233 std::unique_ptr<CacheLoader> cache_loader_; |
237 | 234 |
238 // Holds ref pointers to recently opened caches so that they can be reused | 235 // Holds ref pointers to recently opened caches so that they can be reused |
239 // without having the open the cache again. | 236 // without having the open the cache again. |
240 std::map<const CacheStorageCache*, scoped_refptr<CacheStorageCache>> | 237 std::map<const CacheStorageCache*, scoped_refptr<CacheStorageCache>> |
241 preserved_caches_; | 238 preserved_caches_; |
242 | 239 |
243 // The quota manager. | 240 // The quota manager. |
244 scoped_refptr<storage::QuotaManagerProxy> quota_manager_proxy_; | 241 scoped_refptr<storage::QuotaManagerProxy> quota_manager_proxy_; |
245 | 242 |
246 // The origin that this CacheStorage is associated with. | 243 // The origin that this CacheStorage is associated with. |
247 GURL origin_; | 244 GURL origin_; |
248 | 245 |
249 base::WeakPtrFactory<CacheStorage> weak_factory_; | 246 base::WeakPtrFactory<CacheStorage> weak_factory_; |
250 | 247 |
251 DISALLOW_COPY_AND_ASSIGN(CacheStorage); | 248 DISALLOW_COPY_AND_ASSIGN(CacheStorage); |
252 }; | 249 }; |
253 | 250 |
254 } // namespace content | 251 } // namespace content |
255 | 252 |
256 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_H_ | 253 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_H_ |
OLD | NEW |