OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 IOS_CHROME_BROWSER_BROWSING_DATA_IOS_CHROME_BROWSING_DATA_REMOVER_H_ | 5 #ifndef IOS_CHROME_BROWSER_BROWSING_DATA_IOS_CHROME_BROWSING_DATA_REMOVER_H_ |
6 #define IOS_CHROME_BROWSER_BROWSING_DATA_IOS_CHROME_BROWSING_DATA_REMOVER_H_ | 6 #define IOS_CHROME_BROWSER_BROWSING_DATA_IOS_CHROME_BROWSING_DATA_REMOVER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 // Callback for when TemplateURLService has finished loading. Clears the data, | 164 // Callback for when TemplateURLService has finished loading. Clears the data, |
165 // clears the respective waiting flag, and invokes NotifyAndDeleteIfDone. | 165 // clears the respective waiting flag, and invokes NotifyAndDeleteIfDone. |
166 void OnKeywordsLoaded(); | 166 void OnKeywordsLoaded(); |
167 | 167 |
168 // Removes the specified items related to browsing for a specific host. If the | 168 // Removes the specified items related to browsing for a specific host. If the |
169 // provided |remove_url| is empty, data is removed for all origins. | 169 // provided |remove_url| is empty, data is removed for all origins. |
170 // TODO(mkwst): The current implementation relies on unique (empty) origins to | 170 // TODO(mkwst): The current implementation relies on unique (empty) origins to |
171 // signal removal of all origins. Reconsider this behavior if/when we build | 171 // signal removal of all origins. Reconsider this behavior if/when we build |
172 // a "forget this site" feature. | 172 // a "forget this site" feature. |
173 void RemoveImpl(int remove_mask, const GURL& remove_url); | 173 void RemoveImpl(int remove_mask); |
174 | 174 |
175 // Notifies observers and deletes this object. | 175 // Notifies observers and deletes this object. |
176 void NotifyAndDelete(); | 176 void NotifyAndDelete(); |
177 | 177 |
178 // Checks if we are all done, and if so, calls NotifyAndDelete(). | 178 // Checks if we are all done, and if so, calls NotifyAndDelete(). |
179 void NotifyAndDeleteIfDone(); | 179 void NotifyAndDeleteIfDone(); |
180 | 180 |
181 // Callback for when the hostname resolution cache has been cleared. | 181 // Callback for when the hostname resolution cache has been cleared. |
182 // Clears the respective waiting flag and invokes NotifyAndDeleteIfDone. | 182 // Clears the respective waiting flag and invokes NotifyAndDeleteIfDone. |
183 void OnClearedHostnameResolutionCache(); | 183 void OnClearedHostnameResolutionCache(); |
184 | 184 |
185 // Callback for when network related data in ProfileIOData has been cleared. | 185 // Callback for when network related data in ProfileIOData has been cleared. |
186 // Clears the respective waiting flag and invokes NotifyAndDeleteIfDone. | 186 // Clears the respective waiting flag and invokes NotifyAndDeleteIfDone. |
187 void OnClearedNetworkingHistory(); | 187 void OnClearedNetworkingHistory(); |
188 | 188 |
189 // Callback for when the cache has been deleted. Invokes | 189 // Callback for when the cache has been deleted. Invokes |
190 // NotifyAndDeleteIfDone. | 190 // NotifyAndDeleteIfDone. |
191 void OnClearedCache(int error); | 191 void OnClearedCache(int error); |
192 | 192 |
193 // Callback for when passwords for the requested time range have been cleared. | 193 // Callback for when passwords for the requested time range have been cleared. |
194 void OnClearedPasswords(); | 194 void OnClearedPasswords(); |
195 | 195 |
196 // Callback for when Cookies has been deleted. Invokes NotifyAndDeleteIfDone. | 196 // Callback for when Cookies has been deleted. Invokes NotifyAndDeleteIfDone. |
197 void OnClearedCookies(int num_deleted); | 197 void OnClearedCookies(int num_deleted); |
198 | 198 |
199 // Invoked on the IO thread to delete cookies. | 199 // Invoked on the IO thread to delete cookies. |
200 void ClearCookiesOnIOThread( | 200 void ClearCookiesOnIOThread( |
201 const scoped_refptr<net::URLRequestContextGetter>& rq_context, | 201 const scoped_refptr<net::URLRequestContextGetter>& rq_context); |
202 const GURL& storage_url); | |
203 | 202 |
204 // Invoked on the IO thread to delete channel IDs. | 203 // Invoked on the IO thread to delete channel IDs. |
205 void ClearChannelIDsOnIOThread( | 204 void ClearChannelIDsOnIOThread( |
206 const scoped_refptr<net::URLRequestContextGetter>& rq_context); | 205 const scoped_refptr<net::URLRequestContextGetter>& rq_context); |
207 | 206 |
208 // Callback on IO Thread when channel IDs have been deleted. Clears SSL | 207 // Callback on IO Thread when channel IDs have been deleted. Clears SSL |
209 // connection pool and posts to UI thread to run OnClearedChannelIDs. | 208 // connection pool and posts to UI thread to run OnClearedChannelIDs. |
210 void OnClearedChannelIDsOnIOThread( | 209 void OnClearedChannelIDsOnIOThread( |
211 const scoped_refptr<net::URLRequestContextGetter>& rq_context); | 210 const scoped_refptr<net::URLRequestContextGetter>& rq_context); |
212 | 211 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 | 261 |
263 // Used if we need to clear history. | 262 // Used if we need to clear history. |
264 base::CancelableTaskTracker history_task_tracker_; | 263 base::CancelableTaskTracker history_task_tracker_; |
265 | 264 |
266 scoped_ptr<TemplateURLService::Subscription> template_url_sub_; | 265 scoped_ptr<TemplateURLService::Subscription> template_url_sub_; |
267 | 266 |
268 DISALLOW_COPY_AND_ASSIGN(IOSChromeBrowsingDataRemover); | 267 DISALLOW_COPY_AND_ASSIGN(IOSChromeBrowsingDataRemover); |
269 }; | 268 }; |
270 | 269 |
271 #endif // IOS_CHROME_BROWSER_BROWSING_DATA_IOS_CHROME_BROWSING_DATA_REMOVER_H_ | 270 #endif // IOS_CHROME_BROWSER_BROWSING_DATA_IOS_CHROME_BROWSING_DATA_REMOVER_H_ |
OLD | NEW |