OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
6 #define CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 // Lower level helpers. | 167 // Lower level helpers. |
168 void OnGotAppCacheInfo(int rv); | 168 void OnGotAppCacheInfo(int rv); |
169 void OnAppCacheDeleted(int rv); | 169 void OnAppCacheDeleted(int rv); |
170 | 170 |
171 // Callback when Gears data has been deleted. Invokes NotifyAndDeleteIfDone. | 171 // Callback when Gears data has been deleted. Invokes NotifyAndDeleteIfDone. |
172 void OnClearedGearsData(); | 172 void OnClearedGearsData(); |
173 | 173 |
174 // Invoked on the FILE thread to delete old Gears data. | 174 // Invoked on the FILE thread to delete old Gears data. |
175 void ClearGearsDataOnFILEThread(const FilePath& profile_dir); | 175 void ClearGearsDataOnFILEThread(const FilePath& profile_dir); |
176 | 176 |
| 177 // Callback when Cookies has been deleted. Invokes NotifyAndDeleteIfDone. |
| 178 void OnClearedCookie(int num_deleted); |
| 179 |
| 180 // Invoked on the IO thread to delete cookies. |
| 181 void ClearCookieOnIOThread(net::URLRequestContextGetter* rq_context); |
| 182 |
177 // Calculate the begin time for the deletion range specified by |time_period|. | 183 // Calculate the begin time for the deletion range specified by |time_period|. |
178 base::Time CalculateBeginDeleteTime(TimePeriod time_period); | 184 base::Time CalculateBeginDeleteTime(TimePeriod time_period); |
179 | 185 |
180 // Returns true if we're all done. | 186 // Returns true if we're all done. |
181 bool all_done() { | 187 bool all_done() { |
182 return registrar_.IsEmpty() && !waiting_for_clear_cache_ && | 188 return registrar_.IsEmpty() && !waiting_for_clear_cache_ && |
183 !waiting_for_clear_history_ && | 189 !waiting_for_clear_history_ && |
| 190 !waiting_for_clear_cookies_&& |
184 !waiting_for_clear_networking_history_ && | 191 !waiting_for_clear_networking_history_ && |
185 !waiting_for_clear_databases_ && !waiting_for_clear_appcache_ && | 192 !waiting_for_clear_databases_ && !waiting_for_clear_appcache_ && |
186 !waiting_for_clear_lso_data_ && !waiting_for_clear_gears_data_ && | 193 !waiting_for_clear_lso_data_ && !waiting_for_clear_gears_data_ && |
187 !waiting_for_clear_file_systems_; | 194 !waiting_for_clear_file_systems_; |
188 } | 195 } |
189 | 196 |
190 NotificationRegistrar registrar_; | 197 NotificationRegistrar registrar_; |
191 | 198 |
192 // Profile we're to remove from. | 199 // Profile we're to remove from. |
193 Profile* profile_; | 200 Profile* profile_; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 scoped_refptr<net::URLRequestContextGetter> media_context_getter_; | 233 scoped_refptr<net::URLRequestContextGetter> media_context_getter_; |
227 | 234 |
228 // Used to delete plugin data. | 235 // Used to delete plugin data. |
229 scoped_refptr<PluginDataRemover> plugin_data_remover_; | 236 scoped_refptr<PluginDataRemover> plugin_data_remover_; |
230 base::WaitableEventWatcher watcher_; | 237 base::WaitableEventWatcher watcher_; |
231 | 238 |
232 // True if we're waiting for various data to be deleted. | 239 // True if we're waiting for various data to be deleted. |
233 bool waiting_for_clear_databases_; | 240 bool waiting_for_clear_databases_; |
234 bool waiting_for_clear_history_; | 241 bool waiting_for_clear_history_; |
235 bool waiting_for_clear_networking_history_; | 242 bool waiting_for_clear_networking_history_; |
| 243 bool waiting_for_clear_cookies_; |
236 bool waiting_for_clear_cache_; | 244 bool waiting_for_clear_cache_; |
237 bool waiting_for_clear_appcache_; | 245 bool waiting_for_clear_appcache_; |
238 bool waiting_for_clear_lso_data_; | 246 bool waiting_for_clear_lso_data_; |
239 bool waiting_for_clear_gears_data_; | 247 bool waiting_for_clear_gears_data_; |
240 bool waiting_for_clear_file_systems_; | 248 bool waiting_for_clear_file_systems_; |
241 | 249 |
242 ObserverList<Observer> observer_list_; | 250 ObserverList<Observer> observer_list_; |
243 | 251 |
244 // Used if we need to clear history. | 252 // Used if we need to clear history. |
245 CancelableRequestConsumer request_consumer_; | 253 CancelableRequestConsumer request_consumer_; |
246 | 254 |
247 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); | 255 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); |
248 }; | 256 }; |
249 | 257 |
250 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ | 258 #endif // CHROME_BROWSER_BROWSING_DATA_REMOVER_H_ |
OLD | NEW |