Chromium Code Reviews| Index: chrome/browser/ui/webui/options/password_manager_handler.cc |
| diff --git a/chrome/browser/ui/webui/options/password_manager_handler.cc b/chrome/browser/ui/webui/options/password_manager_handler.cc |
| index 73d6cb32def07b91ee0949d3e57a1e53f274001f..e529aca8d8213144c2d2f374a6b2baecec3cdb1b 100644 |
| --- a/chrome/browser/ui/webui/options/password_manager_handler.cc |
| +++ b/chrome/browser/ui/webui/options/password_manager_handler.cc |
| @@ -109,18 +109,12 @@ PasswordStore* PasswordManagerHandler::GetPasswordStore() { |
| Profile::EXPLICIT_ACCESS); |
| } |
| -void PasswordManagerHandler::Observe( |
| - int type, |
| - const content::NotificationSource& source, |
| - const content::NotificationDetails& details) { |
| - if (type == chrome::NOTIFICATION_PREF_CHANGED) { |
| - std::string* pref_name = content::Details<std::string>(details).ptr(); |
| - if (*pref_name == prefs::kPasswordManagerAllowShowPasswords) { |
| - UpdatePasswordLists(NULL); |
| - } |
| - } |
| +void PasswordManagerHandler::OnPreferenceChanged(PrefServiceBase* service, |
| + const std::string& pref_name) { |
| + DCHECK_EQ(std::string(prefs::kPasswordManagerAllowShowPasswords), pref_name); |
| + UpdatePasswordLists(NULL); |
| - OptionsPageUIHandler::Observe(type, source, details); |
| + // No need to forward to base class as it is not a PrefObserver. |
|
Mattias Nissler (ping if slow)
2012/10/31 13:29:36
See my other comment, let's remove this.
Jói
2012/10/31 14:56:26
Done.
|
| } |
| void PasswordManagerHandler::UpdatePasswordLists(const ListValue* args) { |