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

Side by Side Diff: content/browser/storage_partition_impl.h

Issue 492873002: Collapse fileapi, webkit_blob, webkit_database, quota, and webkit_common namespaces into single sto… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos build Created 6 years, 4 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_STORAGE_PARTITION_IMPL_H_ 5 #ifndef CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_
6 #define CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ 6 #define CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 10 matching lines...) Expand all
21 21
22 class StoragePartitionImpl : public StoragePartition { 22 class StoragePartitionImpl : public StoragePartition {
23 public: 23 public:
24 CONTENT_EXPORT virtual ~StoragePartitionImpl(); 24 CONTENT_EXPORT virtual ~StoragePartitionImpl();
25 25
26 // Quota managed data uses a different bitmask for types than 26 // Quota managed data uses a different bitmask for types than
27 // StoragePartition uses. This method generates that mask. 27 // StoragePartition uses. This method generates that mask.
28 CONTENT_EXPORT static int GenerateQuotaClientMask(uint32 remove_mask); 28 CONTENT_EXPORT static int GenerateQuotaClientMask(uint32 remove_mask);
29 29
30 CONTENT_EXPORT void OverrideQuotaManagerForTesting( 30 CONTENT_EXPORT void OverrideQuotaManagerForTesting(
31 quota::QuotaManager* quota_manager); 31 storage::QuotaManager* quota_manager);
32 CONTENT_EXPORT void OverrideSpecialStoragePolicyForTesting( 32 CONTENT_EXPORT void OverrideSpecialStoragePolicyForTesting(
33 quota::SpecialStoragePolicy* special_storage_policy); 33 storage::SpecialStoragePolicy* special_storage_policy);
34 34
35 // StoragePartition interface. 35 // StoragePartition interface.
36 virtual base::FilePath GetPath() OVERRIDE; 36 virtual base::FilePath GetPath() OVERRIDE;
37 virtual net::URLRequestContextGetter* GetURLRequestContext() OVERRIDE; 37 virtual net::URLRequestContextGetter* GetURLRequestContext() OVERRIDE;
38 virtual net::URLRequestContextGetter* GetMediaURLRequestContext() OVERRIDE; 38 virtual net::URLRequestContextGetter* GetMediaURLRequestContext() OVERRIDE;
39 virtual quota::QuotaManager* GetQuotaManager() OVERRIDE; 39 virtual storage::QuotaManager* GetQuotaManager() OVERRIDE;
40 virtual ChromeAppCacheService* GetAppCacheService() OVERRIDE; 40 virtual ChromeAppCacheService* GetAppCacheService() OVERRIDE;
41 virtual fileapi::FileSystemContext* GetFileSystemContext() OVERRIDE; 41 virtual storage::FileSystemContext* GetFileSystemContext() OVERRIDE;
42 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() OVERRIDE; 42 virtual storage::DatabaseTracker* GetDatabaseTracker() OVERRIDE;
43 virtual DOMStorageContextWrapper* GetDOMStorageContext() OVERRIDE; 43 virtual DOMStorageContextWrapper* GetDOMStorageContext() OVERRIDE;
44 virtual IndexedDBContextImpl* GetIndexedDBContext() OVERRIDE; 44 virtual IndexedDBContextImpl* GetIndexedDBContext() OVERRIDE;
45 virtual ServiceWorkerContextWrapper* GetServiceWorkerContext() OVERRIDE; 45 virtual ServiceWorkerContextWrapper* GetServiceWorkerContext() OVERRIDE;
46 46
47 virtual void ClearDataForOrigin( 47 virtual void ClearDataForOrigin(
48 uint32 remove_mask, 48 uint32 remove_mask,
49 uint32 quota_storage_remove_mask, 49 uint32 quota_storage_remove_mask,
50 const GURL& storage_origin, 50 const GURL& storage_origin,
51 net::URLRequestContextGetter* request_context_getter, 51 net::URLRequestContextGetter* request_context_getter,
52 const base::Closure& callback) OVERRIDE; 52 const base::Closure& callback) OVERRIDE;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // 102 //
103 // If |in_memory| is true, the |partition_path| is (ab)used as a way of 103 // If |in_memory| is true, the |partition_path| is (ab)used as a way of
104 // distinguishing different in-memory partitions, but nothing is persisted 104 // distinguishing different in-memory partitions, but nothing is persisted
105 // on to disk. 105 // on to disk.
106 static StoragePartitionImpl* Create(BrowserContext* context, 106 static StoragePartitionImpl* Create(BrowserContext* context,
107 bool in_memory, 107 bool in_memory,
108 const base::FilePath& profile_path); 108 const base::FilePath& profile_path);
109 109
110 CONTENT_EXPORT StoragePartitionImpl( 110 CONTENT_EXPORT StoragePartitionImpl(
111 const base::FilePath& partition_path, 111 const base::FilePath& partition_path,
112 quota::QuotaManager* quota_manager, 112 storage::QuotaManager* quota_manager,
113 ChromeAppCacheService* appcache_service, 113 ChromeAppCacheService* appcache_service,
114 fileapi::FileSystemContext* filesystem_context, 114 storage::FileSystemContext* filesystem_context,
115 webkit_database::DatabaseTracker* database_tracker, 115 storage::DatabaseTracker* database_tracker,
116 DOMStorageContextWrapper* dom_storage_context, 116 DOMStorageContextWrapper* dom_storage_context,
117 IndexedDBContextImpl* indexed_db_context, 117 IndexedDBContextImpl* indexed_db_context,
118 ServiceWorkerContextWrapper* service_worker_context, 118 ServiceWorkerContextWrapper* service_worker_context,
119 WebRTCIdentityStore* webrtc_identity_store, 119 WebRTCIdentityStore* webrtc_identity_store,
120 quota::SpecialStoragePolicy* special_storage_policy); 120 storage::SpecialStoragePolicy* special_storage_policy);
121 121
122 void ClearDataImpl(uint32 remove_mask, 122 void ClearDataImpl(uint32 remove_mask,
123 uint32 quota_storage_remove_mask, 123 uint32 quota_storage_remove_mask,
124 const GURL& remove_origin, 124 const GURL& remove_origin,
125 const OriginMatcherFunction& origin_matcher, 125 const OriginMatcherFunction& origin_matcher,
126 net::URLRequestContextGetter* rq_context, 126 net::URLRequestContextGetter* rq_context,
127 const base::Time begin, 127 const base::Time begin,
128 const base::Time end, 128 const base::Time end,
129 const base::Closure& callback); 129 const base::Closure& callback);
130 130
(...skipping 10 matching lines...) Expand all
141 // URLRequestContextGetter's lifetime is sorted out. We should also move the 141 // URLRequestContextGetter's lifetime is sorted out. We should also move the
142 // PostCreateInitialization() out of StoragePartitionImplMap. 142 // PostCreateInitialization() out of StoragePartitionImplMap.
143 CONTENT_EXPORT void SetURLRequestContext( 143 CONTENT_EXPORT void SetURLRequestContext(
144 net::URLRequestContextGetter* url_request_context); 144 net::URLRequestContextGetter* url_request_context);
145 void SetMediaURLRequestContext( 145 void SetMediaURLRequestContext(
146 net::URLRequestContextGetter* media_url_request_context); 146 net::URLRequestContextGetter* media_url_request_context);
147 147
148 base::FilePath partition_path_; 148 base::FilePath partition_path_;
149 scoped_refptr<net::URLRequestContextGetter> url_request_context_; 149 scoped_refptr<net::URLRequestContextGetter> url_request_context_;
150 scoped_refptr<net::URLRequestContextGetter> media_url_request_context_; 150 scoped_refptr<net::URLRequestContextGetter> media_url_request_context_;
151 scoped_refptr<quota::QuotaManager> quota_manager_; 151 scoped_refptr<storage::QuotaManager> quota_manager_;
152 scoped_refptr<ChromeAppCacheService> appcache_service_; 152 scoped_refptr<ChromeAppCacheService> appcache_service_;
153 scoped_refptr<fileapi::FileSystemContext> filesystem_context_; 153 scoped_refptr<storage::FileSystemContext> filesystem_context_;
154 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; 154 scoped_refptr<storage::DatabaseTracker> database_tracker_;
155 scoped_refptr<DOMStorageContextWrapper> dom_storage_context_; 155 scoped_refptr<DOMStorageContextWrapper> dom_storage_context_;
156 scoped_refptr<IndexedDBContextImpl> indexed_db_context_; 156 scoped_refptr<IndexedDBContextImpl> indexed_db_context_;
157 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_; 157 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
158 scoped_refptr<WebRTCIdentityStore> webrtc_identity_store_; 158 scoped_refptr<WebRTCIdentityStore> webrtc_identity_store_;
159 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; 159 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_;
160 160
161 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); 161 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl);
162 }; 162 };
163 163
164 } // namespace content 164 } // namespace content
165 165
166 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ 166 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/shared_worker/worker_storage_partition.cc ('k') | content/browser/storage_partition_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698