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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 net::URLRequestContextGetter* request_context_getter, | 75 net::URLRequestContextGetter* request_context_getter, |
76 const base::Closure& callback) override; | 76 const base::Closure& callback) override; |
77 void ClearData(uint32_t remove_mask, | 77 void ClearData(uint32_t remove_mask, |
78 uint32_t quota_storage_remove_mask, | 78 uint32_t quota_storage_remove_mask, |
79 const GURL& storage_origin, | 79 const GURL& storage_origin, |
80 const OriginMatcherFunction& origin_matcher, | 80 const OriginMatcherFunction& origin_matcher, |
81 const base::Time begin, | 81 const base::Time begin, |
82 const base::Time end, | 82 const base::Time end, |
83 const base::Closure& callback) override; | 83 const base::Closure& callback) override; |
84 | 84 |
| 85 void ClearData(uint32_t remove_mask, |
| 86 uint32_t quota_storage_remove_mask, |
| 87 const OriginMatcherFunction& origin_matcher, |
| 88 const CookieMatcherFunction& cookie_matcher, |
| 89 const base::Time begin, |
| 90 const base::Time end, |
| 91 const base::Closure& callback) override; |
| 92 |
85 void Flush() override; | 93 void Flush() override; |
86 | 94 |
87 WebRTCIdentityStore* GetWebRTCIdentityStore(); | 95 WebRTCIdentityStore* GetWebRTCIdentityStore(); |
88 | 96 |
89 // Can return nullptr while |this| is being destroyed. | 97 // Can return nullptr while |this| is being destroyed. |
90 BrowserContext* browser_context() const; | 98 BrowserContext* browser_context() const; |
91 | 99 |
92 // Called by each renderer process once. | 100 // Called by each renderer process once. |
93 void Bind(mojo::InterfaceRequest<StoragePartitionService> request); | 101 void Bind(mojo::InterfaceRequest<StoragePartitionService> request); |
94 | 102 |
(...skipping 22 matching lines...) Expand all Loading... |
117 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, | 125 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, |
118 RemoveQuotaManagedUnprotectedOrigins); | 126 RemoveQuotaManagedUnprotectedOrigins); |
119 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, | 127 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, |
120 RemoveQuotaManagedProtectedSpecificOrigin); | 128 RemoveQuotaManagedProtectedSpecificOrigin); |
121 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, | 129 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, |
122 RemoveQuotaManagedProtectedOrigins); | 130 RemoveQuotaManagedProtectedOrigins); |
123 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, | 131 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, |
124 RemoveQuotaManagedIgnoreDevTools); | 132 RemoveQuotaManagedIgnoreDevTools); |
125 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, RemoveCookieForever); | 133 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, RemoveCookieForever); |
126 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, RemoveCookieLastHour); | 134 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, RemoveCookieLastHour); |
| 135 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, RemoveCookieWithMatcher); |
127 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, | 136 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, |
128 RemoveUnprotectedLocalStorageForever); | 137 RemoveUnprotectedLocalStorageForever); |
129 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, | 138 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, |
130 RemoveProtectedLocalStorageForever); | 139 RemoveProtectedLocalStorageForever); |
131 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, | 140 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, |
132 RemoveLocalStorageForLastWeek); | 141 RemoveLocalStorageForLastWeek); |
133 | 142 |
134 // The |partition_path| is the absolute path to the root of this | 143 // The |partition_path| is the absolute path to the root of this |
135 // StoragePartition's on-disk storage. | 144 // StoragePartition's on-disk storage. |
136 // | 145 // |
(...skipping 16 matching lines...) Expand all Loading... |
153 CacheStorageContextImpl* cache_storage_context, | 162 CacheStorageContextImpl* cache_storage_context, |
154 ServiceWorkerContextWrapper* service_worker_context, | 163 ServiceWorkerContextWrapper* service_worker_context, |
155 WebRTCIdentityStore* webrtc_identity_store, | 164 WebRTCIdentityStore* webrtc_identity_store, |
156 storage::SpecialStoragePolicy* special_storage_policy, | 165 storage::SpecialStoragePolicy* special_storage_policy, |
157 GeofencingManager* geofencing_manager, | 166 GeofencingManager* geofencing_manager, |
158 HostZoomLevelContext* host_zoom_level_context, | 167 HostZoomLevelContext* host_zoom_level_context, |
159 NavigatorConnectContextImpl* navigator_connect_context, | 168 NavigatorConnectContextImpl* navigator_connect_context, |
160 PlatformNotificationContextImpl* platform_notification_context, | 169 PlatformNotificationContextImpl* platform_notification_context, |
161 BackgroundSyncContextImpl* background_sync_context); | 170 BackgroundSyncContextImpl* background_sync_context); |
162 | 171 |
| 172 // We will never have both remove_origin be populated and a cookie_matcher. |
163 void ClearDataImpl(uint32_t remove_mask, | 173 void ClearDataImpl(uint32_t remove_mask, |
164 uint32_t quota_storage_remove_mask, | 174 uint32_t quota_storage_remove_mask, |
165 const GURL& remove_origin, | 175 const GURL& remove_origin, |
166 const OriginMatcherFunction& origin_matcher, | 176 const OriginMatcherFunction& origin_matcher, |
| 177 const CookieMatcherFunction& cookie_matcher, |
167 net::URLRequestContextGetter* rq_context, | 178 net::URLRequestContextGetter* rq_context, |
168 const base::Time begin, | 179 const base::Time begin, |
169 const base::Time end, | 180 const base::Time end, |
170 const base::Closure& callback); | 181 const base::Closure& callback); |
171 | 182 |
172 // Used by StoragePartitionImplMap. | 183 // Used by StoragePartitionImplMap. |
173 // | 184 // |
174 // TODO(ajwong): These should be taken in the constructor and in Create() but | 185 // TODO(ajwong): These should be taken in the constructor and in Create() but |
175 // because the URLRequestContextGetter still lives in Profile with a tangled | 186 // because the URLRequestContextGetter still lives in Profile with a tangled |
176 // initialization, if we try to retrieve the URLRequestContextGetter() | 187 // initialization, if we try to retrieve the URLRequestContextGetter() |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 // StoragePartitionImplMap which then owns StoragePartitionImpl. When the | 222 // StoragePartitionImplMap which then owns StoragePartitionImpl. When the |
212 // BrowserContext is destroyed, |this| will be destroyed too. | 223 // BrowserContext is destroyed, |this| will be destroyed too. |
213 BrowserContext* browser_context_; | 224 BrowserContext* browser_context_; |
214 | 225 |
215 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); | 226 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); |
216 }; | 227 }; |
217 | 228 |
218 } // namespace content | 229 } // namespace content |
219 | 230 |
220 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ | 231 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ |
OLD | NEW |