| Index: chrome/browser/ui/webui/ntp/ntp_login_handler.cc
|
| diff --git a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
|
| index 4702fb1070521eb809cb5a82a7798b861ff664b4..476150a58fd297a610e04ebcce47122fff38f2a2 100644
|
| --- a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
|
| +++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
|
| @@ -112,15 +112,17 @@ void NTPLoginHandler::Observe(int type,
|
| const content::NotificationDetails& details) {
|
| if (type == chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED) {
|
| UpdateLogin();
|
| - } else if (type == chrome::NOTIFICATION_PREF_CHANGED) {
|
| - std::string* name = content::Details<std::string>(details).ptr();
|
| - if (prefs::kGoogleServicesUsername == *name)
|
| - UpdateLogin();
|
| } else {
|
| NOTREACHED();
|
| }
|
| }
|
|
|
| +void NTPLoginHandler::OnPreferenceChanged(PrefServiceBase* service,
|
| + const std::string& pref_name) {
|
| + if (prefs::kGoogleServicesUsername == pref_name)
|
| + UpdateLogin();
|
| +}
|
| +
|
| void NTPLoginHandler::HandleInitializeSyncLogin(const ListValue* args) {
|
| UpdateLogin();
|
| }
|
|
|