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

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

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 8 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/autofill/autofill_manager.cc
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index f9dfd82a7e3b4be008cfffe9820981709c137158..132d4ce85a0aa4cf93abfbb2df48e736f6a7e3dd 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -290,14 +290,10 @@ void AutofillManager::RenderViewCreated(content::RenderViewHost* host) {
UpdatePasswordGenerationState(host, true);
}
-void AutofillManager::Observe(
- int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
+void AutofillManager::OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK_EQ(chrome::NOTIFICATION_PREF_CHANGED, type);
- std::string* pref = content::Details<std::string>(details).ptr();
- DCHECK(prefs::kPasswordGenerationEnabled == *pref);
+ DCHECK(prefs::kPasswordGenerationEnabled == pref_name);
UpdatePasswordGenerationState(web_contents()->GetRenderViewHost(), false);
}

Powered by Google App Engine
This is Rietveld 408576698