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

Unified Diff: chrome/browser/autofill/autofill_manager.h

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head for commit 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/api/prefs/pref_member_unittest.cc ('k') | chrome/browser/autofill/autofill_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_manager.h
diff --git a/chrome/browser/autofill/autofill_manager.h b/chrome/browser/autofill/autofill_manager.h
index 4be3a4f5a3b2825c44192c4ee557bcefd6dd9c5d..af42fbe159457bf4a809f600a0d87d5df1c0365b 100644
--- a/chrome/browser/autofill/autofill_manager.h
+++ b/chrome/browser/autofill/autofill_manager.h
@@ -18,6 +18,7 @@
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "base/prefs/public/pref_change_registrar.h"
+#include "base/prefs/public/pref_observer.h"
#include "base/string16.h"
#include "base/time.h"
#include "chrome/browser/api/sync/profile_sync_service_observer.h"
@@ -25,7 +26,6 @@
#include "chrome/browser/autofill/autofill_download.h"
#include "chrome/browser/autofill/field_types.h"
#include "chrome/browser/autofill/form_structure.h"
-#include "content/public/browser/notification_observer.h"
#include "content/public/browser/web_contents_observer.h"
class AutofillExternalDelegate;
@@ -64,10 +64,10 @@ class Message;
// Manages saving and restoring the user's personal information entered into web
// forms.
-class AutofillManager : public content::NotificationObserver,
- public content::WebContentsObserver,
+class AutofillManager : public content::WebContentsObserver,
public AutofillDownloadManager::Observer,
public ProfileSyncServiceObserver,
+ public PrefObserver,
public base::RefCounted<AutofillManager> {
public:
static void CreateForWebContentsAndDelegate(
@@ -191,10 +191,9 @@ class AutofillManager : public content::NotificationObserver,
// Register as an observer with the sync service.
void RegisterWithSyncService();
- // content::NotificationObserver override
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
+ // PrefObserver.
+ virtual void OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) OVERRIDE;
// Determines what the current state of password generation is, and if it has
// changed from |password_generation_enabled_|. If it has changed or if
« no previous file with comments | « chrome/browser/api/prefs/pref_member_unittest.cc ('k') | chrome/browser/autofill/autofill_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698