Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(822)

Side by Side Diff: content/browser/cache_storage/cache_storage_manager.h

Issue 1468163002: [CacheStorage] Use a map of scoped_ptrs instead of raw pointers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/cache_storage/cache_storage_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 84 }
85 85
86 base::FilePath root_path() const { return root_path_; } 86 base::FilePath root_path() const { return root_path_; }
87 87
88 private: 88 private:
89 friend class CacheStorageContextImpl; 89 friend class CacheStorageContextImpl;
90 friend class CacheStorageManagerTest; 90 friend class CacheStorageManagerTest;
91 friend class CacheStorageMigrationTest; 91 friend class CacheStorageMigrationTest;
92 friend class CacheStorageQuotaClient; 92 friend class CacheStorageQuotaClient;
93 93
94 typedef std::map<GURL, CacheStorage*> CacheStorageMap; 94 typedef std::map<GURL, scoped_ptr<CacheStorage>> CacheStorageMap;
95 95
96 CacheStorageManager( 96 CacheStorageManager(
97 const base::FilePath& path, 97 const base::FilePath& path,
98 const scoped_refptr<base::SequencedTaskRunner>& cache_task_runner, 98 const scoped_refptr<base::SequencedTaskRunner>& cache_task_runner,
99 const scoped_refptr<storage::QuotaManagerProxy>& quota_manager_proxy); 99 const scoped_refptr<storage::QuotaManagerProxy>& quota_manager_proxy);
100 100
101 // The returned CacheStorage* is owned by this manager. 101 // The returned CacheStorage* is owned by this manager.
102 CacheStorage* FindOrCreateCacheStorage(const GURL& origin); 102 CacheStorage* FindOrCreateCacheStorage(const GURL& origin);
103 103
104 // QuotaClient and Browsing Data Deletion support 104 // QuotaClient and Browsing Data Deletion support
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; 157 scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
158 base::WeakPtr<storage::BlobStorageContext> blob_context_; 158 base::WeakPtr<storage::BlobStorageContext> blob_context_;
159 159
160 base::WeakPtrFactory<CacheStorageManager> weak_ptr_factory_; 160 base::WeakPtrFactory<CacheStorageManager> weak_ptr_factory_;
161 DISALLOW_COPY_AND_ASSIGN(CacheStorageManager); 161 DISALLOW_COPY_AND_ASSIGN(CacheStorageManager);
162 }; 162 };
163 163
164 } // namespace content 164 } // namespace content
165 165
166 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_MANAGER_H_ 166 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/cache_storage/cache_storage_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698