Chromium Code Reviews| Index: chrome/browser/ui/webui/history_login_handler.cc |
| diff --git a/chrome/browser/ui/webui/history_login_handler.cc b/chrome/browser/ui/webui/history_login_handler.cc |
| index c83c72f2abcd227ceb4bec79a3daa6805cfe6ddd..40dc37b631d3b05ce0c6bdee3b1c6e4239f856fe 100644 |
| --- a/chrome/browser/ui/webui/history_login_handler.cc |
| +++ b/chrome/browser/ui/webui/history_login_handler.cc |
| @@ -23,6 +23,9 @@ void HistoryLoginHandler::RegisterMessages() { |
| web_ui()->RegisterMessageCallback("otherDevicesInitialized", |
| base::Bind(&HistoryLoginHandler::HandleOtherDevicesInitialized, |
| base::Unretained(this))); |
|
calamity
2016/07/29 05:14:59
Can we just reuse this message? It seems to be exa
lshang
2016/07/29 06:11:58
Done.
I thought it would be a little confusing to
|
| + web_ui()->RegisterMessageCallback("getSignInState", |
| + base::Bind(&HistoryLoginHandler::HandleGetSignInState, |
| + base::Unretained(this))); |
| } |
| void HistoryLoginHandler::HandleOtherDevicesInitialized( |
| @@ -30,6 +33,11 @@ void HistoryLoginHandler::HandleOtherDevicesInitialized( |
| ProfileInfoChanged(); |
| } |
| +void HistoryLoginHandler::HandleGetSignInState( |
| + const base::ListValue* /*args*/) { |
| + ProfileInfoChanged(); |
| +} |
| + |
| void HistoryLoginHandler::ProfileInfoChanged() { |
| bool signed_in = !profile_info_watcher_->GetAuthenticatedUsername().empty(); |
| web_ui()->CallJavascriptFunctionUnsafe("updateSignInState", |