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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 net::URLRequestContextGetter* request_context_getter, | 81 net::URLRequestContextGetter* request_context_getter, |
82 const base::Closure& callback) override; | 82 const base::Closure& callback) override; |
83 void ClearData(uint32_t remove_mask, | 83 void ClearData(uint32_t remove_mask, |
84 uint32_t quota_storage_remove_mask, | 84 uint32_t quota_storage_remove_mask, |
85 const GURL& storage_origin, | 85 const GURL& storage_origin, |
86 const OriginMatcherFunction& origin_matcher, | 86 const OriginMatcherFunction& origin_matcher, |
87 const base::Time begin, | 87 const base::Time begin, |
88 const base::Time end, | 88 const base::Time end, |
89 const base::Closure& callback) override; | 89 const base::Closure& callback) override; |
90 | 90 |
| 91 void ClearData(uint32_t remove_mask, |
| 92 uint32_t quota_storage_remove_mask, |
| 93 const OriginMatcherFunction& origin_matcher, |
| 94 const CookieMatcherFunction& cookie_matcher, |
| 95 const base::Time begin, |
| 96 const base::Time end, |
| 97 const base::Closure& callback) override; |
| 98 |
91 void Flush() override; | 99 void Flush() override; |
92 | 100 |
93 WebRTCIdentityStore* GetWebRTCIdentityStore(); | 101 WebRTCIdentityStore* GetWebRTCIdentityStore(); |
94 | 102 |
95 // Can return nullptr while |this| is being destroyed. | 103 // Can return nullptr while |this| is being destroyed. |
96 BrowserContext* browser_context() const; | 104 BrowserContext* browser_context() const; |
97 | 105 |
98 // Called by each renderer process once. | 106 // Called by each renderer process once. |
99 void Bind(mojo::InterfaceRequest<mojom::StoragePartitionService> request); | 107 void Bind(mojo::InterfaceRequest<mojom::StoragePartitionService> request); |
100 | 108 |
(...skipping 22 matching lines...) Expand all Loading... |
123 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, | 131 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, |
124 RemoveQuotaManagedUnprotectedOrigins); | 132 RemoveQuotaManagedUnprotectedOrigins); |
125 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, | 133 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, |
126 RemoveQuotaManagedProtectedSpecificOrigin); | 134 RemoveQuotaManagedProtectedSpecificOrigin); |
127 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, | 135 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, |
128 RemoveQuotaManagedProtectedOrigins); | 136 RemoveQuotaManagedProtectedOrigins); |
129 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, | 137 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, |
130 RemoveQuotaManagedIgnoreDevTools); | 138 RemoveQuotaManagedIgnoreDevTools); |
131 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, RemoveCookieForever); | 139 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, RemoveCookieForever); |
132 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, RemoveCookieLastHour); | 140 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, RemoveCookieLastHour); |
| 141 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, RemoveCookieWithMatcher); |
133 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, | 142 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, |
134 RemoveUnprotectedLocalStorageForever); | 143 RemoveUnprotectedLocalStorageForever); |
135 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, | 144 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, |
136 RemoveProtectedLocalStorageForever); | 145 RemoveProtectedLocalStorageForever); |
137 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, | 146 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, |
138 RemoveLocalStorageForLastWeek); | 147 RemoveLocalStorageForLastWeek); |
139 | 148 |
140 // |relative_partition_path| is the relative path under |profile_path| to the | 149 // |relative_partition_path| is the relative path under |profile_path| to the |
141 // StoragePartition's on-disk-storage. | 150 // StoragePartition's on-disk-storage. |
142 // | 151 // |
(...skipping 16 matching lines...) Expand all Loading... |
159 IndexedDBContextImpl* indexed_db_context, | 168 IndexedDBContextImpl* indexed_db_context, |
160 CacheStorageContextImpl* cache_storage_context, | 169 CacheStorageContextImpl* cache_storage_context, |
161 ServiceWorkerContextWrapper* service_worker_context, | 170 ServiceWorkerContextWrapper* service_worker_context, |
162 WebRTCIdentityStore* webrtc_identity_store, | 171 WebRTCIdentityStore* webrtc_identity_store, |
163 storage::SpecialStoragePolicy* special_storage_policy, | 172 storage::SpecialStoragePolicy* special_storage_policy, |
164 GeofencingManager* geofencing_manager, | 173 GeofencingManager* geofencing_manager, |
165 HostZoomLevelContext* host_zoom_level_context, | 174 HostZoomLevelContext* host_zoom_level_context, |
166 PlatformNotificationContextImpl* platform_notification_context, | 175 PlatformNotificationContextImpl* platform_notification_context, |
167 BackgroundSyncContextImpl* background_sync_context); | 176 BackgroundSyncContextImpl* background_sync_context); |
168 | 177 |
| 178 // We will never have both remove_origin be populated and a cookie_matcher. |
169 void ClearDataImpl(uint32_t remove_mask, | 179 void ClearDataImpl(uint32_t remove_mask, |
170 uint32_t quota_storage_remove_mask, | 180 uint32_t quota_storage_remove_mask, |
171 const GURL& remove_origin, | 181 const GURL& remove_origin, |
172 const OriginMatcherFunction& origin_matcher, | 182 const OriginMatcherFunction& origin_matcher, |
| 183 const CookieMatcherFunction& cookie_matcher, |
173 net::URLRequestContextGetter* rq_context, | 184 net::URLRequestContextGetter* rq_context, |
174 const base::Time begin, | 185 const base::Time begin, |
175 const base::Time end, | 186 const base::Time end, |
176 const base::Closure& callback); | 187 const base::Closure& callback); |
177 | 188 |
178 // Used by StoragePartitionImplMap. | 189 // Used by StoragePartitionImplMap. |
179 // | 190 // |
180 // TODO(ajwong): These should be taken in the constructor and in Create() but | 191 // TODO(ajwong): These should be taken in the constructor and in Create() but |
181 // because the URLRequestContextGetter still lives in Profile with a tangled | 192 // because the URLRequestContextGetter still lives in Profile with a tangled |
182 // initialization, if we try to retrieve the URLRequestContextGetter() | 193 // initialization, if we try to retrieve the URLRequestContextGetter() |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 // StoragePartitionImplMap which then owns StoragePartitionImpl. When the | 227 // StoragePartitionImplMap which then owns StoragePartitionImpl. When the |
217 // BrowserContext is destroyed, |this| will be destroyed too. | 228 // BrowserContext is destroyed, |this| will be destroyed too. |
218 BrowserContext* browser_context_; | 229 BrowserContext* browser_context_; |
219 | 230 |
220 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); | 231 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); |
221 }; | 232 }; |
222 | 233 |
223 } // namespace content | 234 } // namespace content |
224 | 235 |
225 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ | 236 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ |
OLD | NEW |