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

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

Issue 15572002: Implemented 'Reset Search engines' feature. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge with trunk + Peter's comments Created 7 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/profile_resetter/profile_resetter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1030fb4da7bd989b717d0a9f60f3916a774bffdb..810ca5c34fed552cf4ad17eb065e8de1ebb787d1 100644
--- a/chrome/browser/profile_resetter/profile_resetter.h
+++ b/chrome/browser/profile_resetter/profile_resetter.h
@@ -8,13 +8,17 @@
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/threading/non_thread_safe.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.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 {
+class ProfileResetter : public base::NonThreadSafe,
+ public content::NotificationObserver {
public:
// Flags indicating what aspects of a profile shall be reset.
enum Resettable {
@@ -43,7 +47,7 @@ class ProfileResetter : public base::NonThreadSafe {
type_ResettableFlags_doesnt_match_Resettable);
explicit ProfileResetter(Profile* profile);
- ~ProfileResetter();
+ virtual ~ProfileResetter();
// Resets |resettable_flags| and calls |callback| on the UI thread on
// completion. If |resettable_flags| contains EXTENSIONS, these are handled
@@ -66,7 +70,13 @@ class ProfileResetter : public base::NonThreadSafe {
void ResetExtensions(ExtensionHandling extension_handling);
void ResetStartPage();
+ // content::NotificationObserver:
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
+
Profile* profile_;
+ TemplateURLService* template_url_service_;
// Flags of a Resetable indicating which reset operations we are still waiting
// for.
@@ -75,6 +85,8 @@ class ProfileResetter : public base::NonThreadSafe {
// Called on UI thread when reset has been completed.
base::Closure callback_;
+ content::NotificationRegistrar registrar_;
+
DISALLOW_COPY_AND_ASSIGN(ProfileResetter);
};
« no previous file with comments | « no previous file | chrome/browser/profile_resetter/profile_resetter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698