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

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

Issue 852463002: Keep track of ServiceWorkerContext's BrowserContext and expose it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nullptr
Patch Set: remove include Created 5 years, 11 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
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Can return nullptr while |this| is being destroyed.
69 BrowserContext* browser_context() const;
70
68 struct DataDeletionHelper; 71 struct DataDeletionHelper;
69 struct QuotaManagedDataDeletionHelper; 72 struct QuotaManagedDataDeletionHelper;
70 73
71 private: 74 private:
72 friend class StoragePartitionImplMap; 75 friend class StoragePartitionImplMap;
73 FRIEND_TEST_ALL_PREFIXES(StoragePartitionShaderClearTest, ClearShaderCache); 76 FRIEND_TEST_ALL_PREFIXES(StoragePartitionShaderClearTest, ClearShaderCache);
74 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, 77 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest,
75 RemoveQuotaManagedDataForeverBoth); 78 RemoveQuotaManagedDataForeverBoth);
76 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, 79 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest,
77 RemoveQuotaManagedDataForeverOnlyTemporary); 80 RemoveQuotaManagedDataForeverOnlyTemporary);
(...skipping 28 matching lines...) Expand all
106 // StoragePartition's on-disk storage. 109 // StoragePartition's on-disk storage.
107 // 110 //
108 // If |in_memory| is true, the |partition_path| is (ab)used as a way of 111 // 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 112 // distinguishing different in-memory partitions, but nothing is persisted
110 // on to disk. 113 // on to disk.
111 static StoragePartitionImpl* Create(BrowserContext* context, 114 static StoragePartitionImpl* Create(BrowserContext* context,
112 bool in_memory, 115 bool in_memory,
113 const base::FilePath& profile_path); 116 const base::FilePath& profile_path);
114 117
115 CONTENT_EXPORT StoragePartitionImpl( 118 CONTENT_EXPORT StoragePartitionImpl(
119 BrowserContext* browser_context,
116 const base::FilePath& partition_path, 120 const base::FilePath& partition_path,
117 storage::QuotaManager* quota_manager, 121 storage::QuotaManager* quota_manager,
118 ChromeAppCacheService* appcache_service, 122 ChromeAppCacheService* appcache_service,
119 storage::FileSystemContext* filesystem_context, 123 storage::FileSystemContext* filesystem_context,
120 storage::DatabaseTracker* database_tracker, 124 storage::DatabaseTracker* database_tracker,
121 DOMStorageContextWrapper* dom_storage_context, 125 DOMStorageContextWrapper* dom_storage_context,
122 IndexedDBContextImpl* indexed_db_context, 126 IndexedDBContextImpl* indexed_db_context,
123 ServiceWorkerContextWrapper* service_worker_context, 127 ServiceWorkerContextWrapper* service_worker_context,
124 WebRTCIdentityStore* webrtc_identity_store, 128 WebRTCIdentityStore* webrtc_identity_store,
125 storage::SpecialStoragePolicy* special_storage_policy, 129 storage::SpecialStoragePolicy* special_storage_policy,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 scoped_refptr<storage::DatabaseTracker> database_tracker_; 166 scoped_refptr<storage::DatabaseTracker> database_tracker_;
163 scoped_refptr<DOMStorageContextWrapper> dom_storage_context_; 167 scoped_refptr<DOMStorageContextWrapper> dom_storage_context_;
164 scoped_refptr<IndexedDBContextImpl> indexed_db_context_; 168 scoped_refptr<IndexedDBContextImpl> indexed_db_context_;
165 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_; 169 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
166 scoped_refptr<WebRTCIdentityStore> webrtc_identity_store_; 170 scoped_refptr<WebRTCIdentityStore> webrtc_identity_store_;
167 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_; 171 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_;
168 scoped_refptr<GeofencingManager> geofencing_manager_; 172 scoped_refptr<GeofencingManager> geofencing_manager_;
169 scoped_refptr<HostZoomLevelContext> host_zoom_level_context_; 173 scoped_refptr<HostZoomLevelContext> host_zoom_level_context_;
170 scoped_refptr<NavigatorConnectContext> navigator_connect_context_; 174 scoped_refptr<NavigatorConnectContext> navigator_connect_context_;
171 175
176 // Raw pointer that should always be valid. The BrowserContext owns the
177 // StoragePartitionImplMap which then owns StoragePartitionImpl. When the
178 // BrowserContext is destroyed, |this| will be destroyed too.
179 BrowserContext* browser_context_;
180
172 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); 181 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl);
173 }; 182 };
174 183
175 } // namespace content 184 } // namespace content
176 185
177 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ 186 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_context_wrapper.cc ('k') | content/browser/storage_partition_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698