OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/webui/history_login_handler.h" | 5 #include "chrome/browser/ui/webui/history_login_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 base::Unretained(this))); | 25 base::Unretained(this))); |
26 } | 26 } |
27 | 27 |
28 void HistoryLoginHandler::HandleOtherDevicesInitialized( | 28 void HistoryLoginHandler::HandleOtherDevicesInitialized( |
29 const base::ListValue* /*args*/) { | 29 const base::ListValue* /*args*/) { |
30 ProfileInfoChanged(); | 30 ProfileInfoChanged(); |
31 } | 31 } |
32 | 32 |
33 void HistoryLoginHandler::ProfileInfoChanged() { | 33 void HistoryLoginHandler::ProfileInfoChanged() { |
34 bool signed_in = !profile_info_watcher_->GetAuthenticatedUsername().empty(); | 34 bool signed_in = !profile_info_watcher_->GetAuthenticatedUsername().empty(); |
35 web_ui()->CallJavascriptFunction( | 35 web_ui()->CallJavascriptFunctionUnsafe("updateSignInState", |
36 "updateSignInState", base::FundamentalValue(signed_in)); | 36 base::FundamentalValue(signed_in)); |
37 } | 37 } |
OLD | NEW |