Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 58 void ClearData(uint32 remove_mask, | 58 void ClearData(uint32 remove_mask, |
| 59 uint32 quota_storage_remove_mask, | 59 uint32 quota_storage_remove_mask, |
| 60 const GURL& storage_origin, | 60 const GURL& storage_origin, |
| 61 const OriginMatcherFunction& origin_matcher, | 61 const OriginMatcherFunction& origin_matcher, |
| 62 const base::Time begin, | 62 const base::Time begin, |
| 63 const base::Time end, | 63 const base::Time end, |
| 64 const base::Closure& callback) override; | 64 const base::Closure& callback) override; |
| 65 | 65 |
| 66 WebRTCIdentityStore* GetWebRTCIdentityStore(); | 66 WebRTCIdentityStore* GetWebRTCIdentityStore(); |
| 67 | 67 |
| 68 BrowserContext* browser_context() const; | |
| 69 | |
| 68 struct DataDeletionHelper; | 70 struct DataDeletionHelper; |
| 69 struct QuotaManagedDataDeletionHelper; | 71 struct QuotaManagedDataDeletionHelper; |
| 70 | 72 |
| 71 private: | 73 private: |
| 72 friend class StoragePartitionImplMap; | 74 friend class StoragePartitionImplMap; |
| 73 FRIEND_TEST_ALL_PREFIXES(StoragePartitionShaderClearTest, ClearShaderCache); | 75 FRIEND_TEST_ALL_PREFIXES(StoragePartitionShaderClearTest, ClearShaderCache); |
| 74 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, | 76 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, |
| 75 RemoveQuotaManagedDataForeverBoth); | 77 RemoveQuotaManagedDataForeverBoth); |
| 76 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, | 78 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, |
| 77 RemoveQuotaManagedDataForeverOnlyTemporary); | 79 RemoveQuotaManagedDataForeverOnlyTemporary); |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 106 // StoragePartition's on-disk storage. | 108 // StoragePartition's on-disk storage. |
| 107 // | 109 // |
| 108 // If |in_memory| is true, the |partition_path| is (ab)used as a way of | 110 // If |in_memory| is true, the |partition_path| is (ab)used as a way of |
| 109 // distinguishing different in-memory partitions, but nothing is persisted | 111 // distinguishing different in-memory partitions, but nothing is persisted |
| 110 // on to disk. | 112 // on to disk. |
| 111 static StoragePartitionImpl* Create(BrowserContext* context, | 113 static StoragePartitionImpl* Create(BrowserContext* context, |
| 112 bool in_memory, | 114 bool in_memory, |
| 113 const base::FilePath& profile_path); | 115 const base::FilePath& profile_path); |
| 114 | 116 |
| 115 CONTENT_EXPORT StoragePartitionImpl( | 117 CONTENT_EXPORT StoragePartitionImpl( |
| 118 BrowserContext* browser_context, | |
| 116 const base::FilePath& partition_path, | 119 const base::FilePath& partition_path, |
| 117 storage::QuotaManager* quota_manager, | 120 storage::QuotaManager* quota_manager, |
| 118 ChromeAppCacheService* appcache_service, | 121 ChromeAppCacheService* appcache_service, |
| 119 storage::FileSystemContext* filesystem_context, | 122 storage::FileSystemContext* filesystem_context, |
| 120 storage::DatabaseTracker* database_tracker, | 123 storage::DatabaseTracker* database_tracker, |
| 121 DOMStorageContextWrapper* dom_storage_context, | 124 DOMStorageContextWrapper* dom_storage_context, |
| 122 IndexedDBContextImpl* indexed_db_context, | 125 IndexedDBContextImpl* indexed_db_context, |
| 123 ServiceWorkerContextWrapper* service_worker_context, | 126 ServiceWorkerContextWrapper* service_worker_context, |
| 124 WebRTCIdentityStore* webrtc_identity_store, | 127 WebRTCIdentityStore* webrtc_identity_store, |
| 125 storage::SpecialStoragePolicy* special_storage_policy, | 128 storage::SpecialStoragePolicy* special_storage_policy, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 162 scoped_refptr<storage::DatabaseTracker> database_tracker_; | 165 scoped_refptr<storage::DatabaseTracker> database_tracker_; |
| 163 scoped_refptr<DOMStorageContextWrapper> dom_storage_context_; | 166 scoped_refptr<DOMStorageContextWrapper> dom_storage_context_; |
| 164 scoped_refptr<IndexedDBContextImpl> indexed_db_context_; | 167 scoped_refptr<IndexedDBContextImpl> indexed_db_context_; |
| 165 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_; | 168 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_; |
| 166 scoped_refptr<WebRTCIdentityStore> webrtc_identity_store_; | 169 scoped_refptr<WebRTCIdentityStore> webrtc_identity_store_; |
| 167 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_; | 170 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_; |
| 168 scoped_refptr<GeofencingManager> geofencing_manager_; | 171 scoped_refptr<GeofencingManager> geofencing_manager_; |
| 169 scoped_refptr<HostZoomLevelContext> host_zoom_level_context_; | 172 scoped_refptr<HostZoomLevelContext> host_zoom_level_context_; |
| 170 scoped_refptr<NavigatorConnectContext> navigator_connect_context_; | 173 scoped_refptr<NavigatorConnectContext> navigator_connect_context_; |
| 171 | 174 |
| 175 // Weak pointer that should always be valid. The BrowserContext owns the | |
|
michaeln
2015/01/13 21:27:32
"Raw pointer" is more accurate since it's not a We
mlamouri (slow - plz ping)
2015/01/14 15:46:24
Done.
| |
| 176 // StoragePartitionImplMap which then owns StoragePartitionImpl. When the | |
| 177 // BrowserContext is destroyed, |this| will be destroyed too. | |
| 178 BrowserContext* browser_context_; | |
| 179 | |
| 172 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); | 180 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); |
| 173 }; | 181 }; |
| 174 | 182 |
| 175 } // namespace content | 183 } // namespace content |
| 176 | 184 |
| 177 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ | 185 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ |
| OLD | NEW |