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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_remover.h

Issue 11238034: Added completion notification to Profile's ClearNetworkingHistorySince. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed IO/UI typo and rebased. Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_remover.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_
6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ 6 #define CHROME_BROWSER_BROWSING_DATA_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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 // |origin_set_mask| parameter defines the set of origins from which data 218 // |origin_set_mask| parameter defines the set of origins from which data
219 // should be removed (protected, unprotected, or both). 219 // should be removed (protected, unprotected, or both).
220 void RemoveImpl(int remove_mask, 220 void RemoveImpl(int remove_mask,
221 const GURL& origin, 221 const GURL& origin,
222 int origin_set_mask); 222 int origin_set_mask);
223 223
224 // If we're not waiting on anything, notifies observers and deletes this 224 // If we're not waiting on anything, notifies observers and deletes this
225 // object. 225 // object.
226 void NotifyAndDeleteIfDone(); 226 void NotifyAndDeleteIfDone();
227 227
228 // Callback when the network history has been deleted. Invokes 228 // Callback when the hostname resolution cache has been cleared.
229 // NotifyAndDeleteIfDone. 229 // Clears the respective waiting flag and invokes NotifyAndDeleteIfDone.
230 void ClearedNetworkHistory(); 230 void OnClearedHostnameResolutionCache();
231 231
232 // Invoked on the IO thread to clear the HostCache, speculative data about 232 // Invoked on the IO thread to clear the hostname resolution cache.
233 // subresources on visited sites, and initial navigation history. 233 void ClearHostnameResolutionCacheOnIOThread(IOThread* io_thread);
234 void ClearNetworkingHistory(IOThread* io_thread); 234
235 // Callback when speculative data in the network Predictor has been cleared.
236 // Clears the respective waiting flag and invokes NotifyAndDeleteIfDone.
237 void OnClearedNetworkPredictor();
238
239 // Invoked on the IO thread to clear speculative data related to hostname
240 // pre-resolution from the network Predictor.
241 void ClearNetworkPredictorOnIOThread();
242
243 // Callback when network related data in ProfileIOData has been cleared.
244 // Clears the respective waiting flag and invokes NotifyAndDeleteIfDone.
245 void OnClearedNetworkingHistory();
235 246
236 // Callback when the cache has been deleted. Invokes NotifyAndDeleteIfDone. 247 // Callback when the cache has been deleted. Invokes NotifyAndDeleteIfDone.
237 void ClearedCache(); 248 void ClearedCache();
238 249
239 // Invoked on the IO thread to delete from the cache. 250 // Invoked on the IO thread to delete from the cache.
240 void ClearCacheOnIOThread(); 251 void ClearCacheOnIOThread();
241 252
242 // Performs the actual work to delete the cache. 253 // Performs the actual work to delete the cache.
243 void DoClearCache(int rv); 254 void DoClearCache(int rv);
244 255
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 scoped_ptr<content::PluginDataRemover> plugin_data_remover_; 364 scoped_ptr<content::PluginDataRemover> plugin_data_remover_;
354 base::WaitableEventWatcher watcher_; 365 base::WaitableEventWatcher watcher_;
355 366
356 // Used to deauthorize content licenses for Pepper Flash. 367 // Used to deauthorize content licenses for Pepper Flash.
357 scoped_ptr<PepperFlashSettingsManager> pepper_flash_settings_manager_; 368 scoped_ptr<PepperFlashSettingsManager> pepper_flash_settings_manager_;
358 uint32 deauthorize_content_licenses_request_id_; 369 uint32 deauthorize_content_licenses_request_id_;
359 370
360 // True if we're waiting for various data to be deleted. 371 // True if we're waiting for various data to be deleted.
361 // These may only be accessed from UI thread in order to avoid races! 372 // These may only be accessed from UI thread in order to avoid races!
362 bool waiting_for_clear_cache_; 373 bool waiting_for_clear_cache_;
363 bool waiting_for_clear_nacl_cache_; 374 bool waiting_for_clear_content_licenses_;
364 // Non-zero if waiting for cookies to be cleared. 375 // Non-zero if waiting for cookies to be cleared.
365 int waiting_for_clear_cookies_count_; 376 int waiting_for_clear_cookies_count_;
377 bool waiting_for_clear_form_;
366 bool waiting_for_clear_history_; 378 bool waiting_for_clear_history_;
379 bool waiting_for_clear_hostname_resolution_cache_;
367 bool waiting_for_clear_local_storage_; 380 bool waiting_for_clear_local_storage_;
368 bool waiting_for_clear_session_storage_; 381 bool waiting_for_clear_nacl_cache_;
382 bool waiting_for_clear_network_predictor_;
369 bool waiting_for_clear_networking_history_; 383 bool waiting_for_clear_networking_history_;
370 bool waiting_for_clear_server_bound_certs_;
371 bool waiting_for_clear_plugin_data_; 384 bool waiting_for_clear_plugin_data_;
372 bool waiting_for_clear_quota_managed_data_; 385 bool waiting_for_clear_quota_managed_data_;
373 bool waiting_for_clear_content_licenses_; 386 bool waiting_for_clear_server_bound_certs_;
374 bool waiting_for_clear_form_; 387 bool waiting_for_clear_session_storage_;
375 388
376 // Tracking how many origins need to be deleted, and whether we're finished 389 // Tracking how many origins need to be deleted, and whether we're finished
377 // gathering origins. 390 // gathering origins.
378 int quota_managed_origins_to_delete_count_; 391 int quota_managed_origins_to_delete_count_;
379 int quota_managed_storage_types_to_delete_count_; 392 int quota_managed_storage_types_to_delete_count_;
380 393
381 // The removal mask for the current removal operation. 394 // The removal mask for the current removal operation.
382 int remove_mask_; 395 int remove_mask_;
383 396
384 // The origin for the current removal operation. 397 // The origin for the current removal operation.
385 GURL remove_origin_; 398 GURL remove_origin_;
386 399
387 // From which types of origins should we remove data? 400 // From which types of origins should we remove data?
388 int origin_set_mask_; 401 int origin_set_mask_;
389 402
390 ObserverList<Observer> observer_list_; 403 ObserverList<Observer> observer_list_;
391 404
392 // Used if we need to clear history. 405 // Used if we need to clear history.
393 CancelableRequestConsumer request_consumer_; 406 CancelableRequestConsumer request_consumer_;
394 407
395 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); 408 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover);
396 }; 409 };
397 410
398 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ 411 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_remover.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698