| 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 476150a58fd297a610e04ebcce47122fff38f2a2..94af9f3a0cc9a4df103f8421fec9b025c2f9175b 100644
|
| --- a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
|
| +++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
|
| @@ -88,7 +88,10 @@ NTPLoginHandler::~NTPLoginHandler() {
|
|
|
| void NTPLoginHandler::RegisterMessages() {
|
| PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
|
| - username_pref_.Init(prefs::kGoogleServicesUsername, pref_service, this);
|
| + username_pref_.Init(prefs::kGoogleServicesUsername,
|
| + pref_service,
|
| + base::Bind(&NTPLoginHandler::UpdateLogin,
|
| + base::Unretained(this)));
|
|
|
| registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
|
| content::NotificationService::AllSources());
|
| @@ -117,12 +120,6 @@ void NTPLoginHandler::Observe(int type,
|
| }
|
| }
|
|
|
| -void NTPLoginHandler::OnPreferenceChanged(PrefServiceBase* service,
|
| - const std::string& pref_name) {
|
| - if (prefs::kGoogleServicesUsername == pref_name)
|
| - UpdateLogin();
|
| -}
|
| -
|
| void NTPLoginHandler::HandleInitializeSyncLogin(const ListValue* args) {
|
| UpdateLogin();
|
| }
|
|
|