Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(732)

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc

Issue 11052015: Fix bug with login-prompt-visible not being sent in some rare cases. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/chromeos/login/screen_gaia_signin.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chromeos/login/signin_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_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/callback.h" 9 #include "base/callback.h"
10 #include "base/cancelable_callback.h" 10 #include "base/cancelable_callback.h"
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 } 1002 }
1003 1003
1004 base::FundamentalValue animated_value(animated); 1004 base::FundamentalValue animated_value(animated);
1005 base::FundamentalValue guest_value(delegate_->IsShowGuest()); 1005 base::FundamentalValue guest_value(delegate_->IsShowGuest());
1006 web_ui()->CallJavascriptFunction("login.AccountPickerScreen.loadUsers", 1006 web_ui()->CallJavascriptFunction("login.AccountPickerScreen.loadUsers",
1007 users_list, animated_value, guest_value); 1007 users_list, animated_value, guest_value);
1008 } 1008 }
1009 1009
1010 void SigninScreenHandler::HandleAccountPickerReady( 1010 void SigninScreenHandler::HandleAccountPickerReady(
1011 const base::ListValue* args) { 1011 const base::ListValue* args) {
1012 LOG(INFO) << "Login WebUI >> AccountPickerReady";
1012 1013
1013 PrefService* prefs = g_browser_process->local_state(); 1014 PrefService* prefs = g_browser_process->local_state();
1014 if (prefs->GetBoolean(prefs::kFactoryResetRequested)) { 1015 if (prefs->GetBoolean(prefs::kFactoryResetRequested)) {
1015 prefs->SetBoolean(prefs::kFactoryResetRequested, false); 1016 prefs->SetBoolean(prefs::kFactoryResetRequested, false);
1016 prefs->CommitPendingWrite(); 1017 prefs->CommitPendingWrite();
1017 base::ListValue args; 1018 base::ListValue args;
1018 HandleToggleResetScreen(&args); 1019 HandleToggleResetScreen(&args);
1019 return; 1020 return;
1020 } 1021 }
1021 1022
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 void SigninScreenHandler::HandleCreateAccount(const base::ListValue* args) { 1133 void SigninScreenHandler::HandleCreateAccount(const base::ListValue* args) {
1133 if (delegate_) 1134 if (delegate_)
1134 delegate_->CreateAccount(); 1135 delegate_->CreateAccount();
1135 } 1136 }
1136 1137
1137 void SigninScreenHandler::HandleOpenProxySettings(const base::ListValue* args) { 1138 void SigninScreenHandler::HandleOpenProxySettings(const base::ListValue* args) {
1138 BaseLoginDisplayHost::default_host()->OpenProxySettings(); 1139 BaseLoginDisplayHost::default_host()->OpenProxySettings();
1139 } 1140 }
1140 1141
1141 void SigninScreenHandler::HandleLoginVisible(const base::ListValue* args) { 1142 void SigninScreenHandler::HandleLoginVisible(const base::ListValue* args) {
1142 LOG(INFO) << "Login WebUI >> LoginVisible, webui_visible_: " 1143 std::string source;
1143 << webui_visible_; 1144 if (!args->GetString(0, &source)) {
1145 NOTREACHED();
1146 return;
1147 }
1148
1149 LOG(INFO) << "Login WebUI >> LoginVisible, source: " << source
1150 << ", webui_visible_: " << webui_visible_;
1144 if (!webui_visible_) { 1151 if (!webui_visible_) {
1145 // There might be multiple messages from OOBE UI so send notifications after 1152 // There might be multiple messages from OOBE UI so send notifications after
1146 // the first one only. 1153 // the first one only.
1147 content::NotificationService::current()->Notify( 1154 content::NotificationService::current()->Notify(
1148 chrome::NOTIFICATION_LOGIN_WEBUI_VISIBLE, 1155 chrome::NOTIFICATION_LOGIN_WEBUI_VISIBLE,
1149 content::NotificationService::AllSources(), 1156 content::NotificationService::AllSources(),
1150 content::NotificationService::NoDetails()); 1157 content::NotificationService::NoDetails());
1151 } 1158 }
1152 webui_visible_ = true; 1159 webui_visible_ = true;
1153 if (ScreenLocker::default_screen_locker()) 1160 if (ScreenLocker::default_screen_locker())
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
1214 } 1221 }
1215 for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) { 1222 for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) {
1216 if (!cros_settings->FindEmailInList(kAccountsPrefUsers, (*it)->email())) { 1223 if (!cros_settings->FindEmailInList(kAccountsPrefUsers, (*it)->email())) {
1217 return false; 1224 return false;
1218 } 1225 }
1219 } 1226 }
1220 return true; 1227 return true;
1221 } 1228 }
1222 1229
1223 } // namespace chromeos 1230 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/login/screen_gaia_signin.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698