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_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_MANAGER_H_ |
6 #define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_MANAGER_H_ | 6 #define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 81 |
82 base::WeakPtr<CacheStorageManager> AsWeakPtr() { | 82 base::WeakPtr<CacheStorageManager> AsWeakPtr() { |
83 return weak_ptr_factory_.GetWeakPtr(); | 83 return weak_ptr_factory_.GetWeakPtr(); |
84 } | 84 } |
85 | 85 |
86 private: | 86 private: |
87 friend class CacheStorageContextImpl; | 87 friend class CacheStorageContextImpl; |
88 friend class CacheStorageManagerTest; | 88 friend class CacheStorageManagerTest; |
89 friend class CacheStorageMigrationTest; | 89 friend class CacheStorageMigrationTest; |
90 friend class CacheStorageQuotaClient; | 90 friend class CacheStorageQuotaClient; |
| 91 friend class MigratedLegacyCacheDirectoryNameTest; |
91 | 92 |
92 typedef std::map<GURL, CacheStorage*> CacheStorageMap; | 93 typedef std::map<GURL, CacheStorage*> CacheStorageMap; |
93 | 94 |
94 CacheStorageManager( | 95 CacheStorageManager( |
95 const base::FilePath& path, | 96 const base::FilePath& path, |
96 const scoped_refptr<base::SequencedTaskRunner>& cache_task_runner, | 97 const scoped_refptr<base::SequencedTaskRunner>& cache_task_runner, |
97 const scoped_refptr<storage::QuotaManagerProxy>& quota_manager_proxy); | 98 const scoped_refptr<storage::QuotaManagerProxy>& quota_manager_proxy); |
98 | 99 |
99 // The returned CacheStorage* is owned by this manager. | 100 // The returned CacheStorage* is owned by this manager. |
100 CacheStorage* FindOrCreateCacheStorage(const GURL& origin); | 101 CacheStorage* FindOrCreateCacheStorage(const GURL& origin); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; | 155 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; |
155 base::WeakPtr<storage::BlobStorageContext> blob_context_; | 156 base::WeakPtr<storage::BlobStorageContext> blob_context_; |
156 | 157 |
157 base::WeakPtrFactory<CacheStorageManager> weak_ptr_factory_; | 158 base::WeakPtrFactory<CacheStorageManager> weak_ptr_factory_; |
158 DISALLOW_COPY_AND_ASSIGN(CacheStorageManager); | 159 DISALLOW_COPY_AND_ASSIGN(CacheStorageManager); |
159 }; | 160 }; |
160 | 161 |
161 } // namespace content | 162 } // namespace content |
162 | 163 |
163 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_MANAGER_H_ | 164 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_MANAGER_H_ |
OLD | NEW |