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

Unified Diff: chrome/browser/profile_resetter/profile_resetter.h

Issue 23710022: Convert NOTIFICATION_TEMPLATE_URL_SERVICE_LOADED to CallbackList (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/profile_resetter/profile_resetter.h
diff --git a/chrome/browser/profile_resetter/profile_resetter.h b/chrome/browser/profile_resetter/profile_resetter.h
index 77e8a1c3387322885bff9f35bf34d3c4bd80e0c4..44170a8b1af08896e08f62a8932866e679a2fe48 100644
--- a/chrome/browser/profile_resetter/profile_resetter.h
+++ b/chrome/browser/profile_resetter/profile_resetter.h
@@ -10,17 +10,14 @@
#include "base/threading/non_thread_safe.h"
#include "chrome/browser/browsing_data/browsing_data_remover.h"
#include "chrome/browser/profile_resetter/brandcoded_default_settings.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
+#include "chrome/browser/search_engines/template_url_service.h"
class Profile;
-class TemplateURLService;
// This class allows resetting certain aspects of a profile to default values.
// It is used in case the profile has been damaged due to malware or bad user
// settings.
class ProfileResetter : public base::NonThreadSafe,
- public content::NotificationObserver,
public BrowsingDataRemover::Observer {
public:
// Flags indicating what aspects of a profile shall be reset.
@@ -69,14 +66,12 @@ class ProfileResetter : public base::NonThreadSafe,
void ResetStartupPages();
void ResetPinnedTabs();
- // content::NotificationObserver:
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
// BrowsingDataRemover::Observer:
virtual void OnBrowsingDataRemoverDone() OVERRIDE;
+ // Callback for when TemplateURLService has loaded.
+ void OnTemplateURLServiceLoaded();
+
Profile* const profile_;
scoped_ptr<BrandcodedDefaultSettings> master_settings_;
TemplateURLService* template_url_service_;
@@ -88,12 +83,12 @@ class ProfileResetter : public base::NonThreadSafe,
// Called on UI thread when reset has been completed.
base::Closure callback_;
- content::NotificationRegistrar registrar_;
-
// If non-null it means removal is in progress. BrowsingDataRemover takes care
// of deleting itself when done.
BrowsingDataRemover* cookies_remover_;
+ scoped_ptr<TemplateURLService::Subscription> template_url_service_sub_;
+
DISALLOW_COPY_AND_ASSIGN(ProfileResetter);
};
« no previous file with comments | « chrome/browser/importer/external_process_importer_host.cc ('k') | chrome/browser/profile_resetter/profile_resetter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698