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

Unified Diff: chrome/browser/browsing_data/browsing_data_remover.h

Issue 23710022: Convert NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED to CallbackList (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean-up Created 7 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/browsing_data/browsing_data_remover.h
diff --git a/chrome/browser/browsing_data/browsing_data_remover.h b/chrome/browser/browsing_data/browsing_data_remover.h
index be29059a2b733a9105d01e5d13f6fa8f4d2bba55..a8d7ca43da14db7cd4ab1071983e0fe8dd1d9a62 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.h
+++ b/chrome/browser/browsing_data/browsing_data_remover.h
@@ -15,9 +15,8 @@
#include "base/synchronization/waitable_event_watcher.h"
#include "base/time/time.h"
#include "chrome/browser/pepper_flash_settings_manager.h"
+#include "chrome/browser/search_engines/template_url_service.h"
#include "chrome/common/cancelable_task_tracker.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
#include "url/gurl.h"
#include "webkit/common/quota/quota_types.h"
@@ -50,11 +49,11 @@ struct SessionStorageUsageInfo;
// BrowsingDataRemover is responsible for removing data related to browsing:
// visits in url database, downloads, cookies ...
-class BrowsingDataRemover : public content::NotificationObserver
+class BrowsingDataRemover
#if defined(ENABLE_PLUGINS)
- , public PepperFlashSettingsManager::Client
+ : public PepperFlashSettingsManager::Client
#endif
- {
+ {
public:
// Time period ranges available when doing browsing data removals.
enum TimePeriod {
@@ -214,13 +213,8 @@ class BrowsingDataRemover : public content::NotificationObserver
friend class base::DeleteHelper<BrowsingDataRemover>;
virtual ~BrowsingDataRemover();
- // content::NotificationObserver method. Callback when TemplateURLService has
- // finished loading. Deletes the entries from the model, and if we're not
- // waiting on anything else notifies observers and deletes this
- // BrowsingDataRemover.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
+ // Callback when TemplateURLService has finished loading.
Avi (use Gerrit) 2013/10/02 22:27:52 "Callback for when..."?
Cait (Slow) 2013/10/03 15:36:45 Done.
+ void OnKeywordsLoaded();
// Called when plug-in data has been cleared. Invokes NotifyAndDeleteIfDone.
void OnWaitableEventSignaled(base::WaitableEvent* waitable_event);
@@ -377,8 +371,6 @@ class BrowsingDataRemover : public content::NotificationObserver
// Returns true if we're all done.
bool AllDone();
- content::NotificationRegistrar registrar_;
-
// Profile we're to remove from.
Profile* profile_;
@@ -440,6 +432,7 @@ class BrowsingDataRemover : public content::NotificationObserver
bool waiting_for_clear_session_storage_;
bool waiting_for_clear_shader_cache_;
bool waiting_for_clear_webrtc_identity_store_;
+ bool waiting_for_clear_keyword_data_;
// Tracking how many origins need to be deleted, and whether we're finished
// gathering origins.
@@ -460,6 +453,8 @@ class BrowsingDataRemover : public content::NotificationObserver
// Used if we need to clear history.
CancelableTaskTracker history_task_tracker_;
+ scoped_ptr<TemplateURLService::Subscription> template_url_sub_;
+
DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover);
};

Powered by Google App Engine
This is Rietveld 408576698