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

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

Issue 14200033: [cros] Rename BaseLoginDisplayHost to LoginDisplayHostImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years, 8 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/ui/webui/chromeos/login/oobe_ui.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
11 #include "base/prefs/pref_service.h" 11 #include "base/prefs/pref_service.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/stringprintf.h" 14 #include "base/stringprintf.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "chrome/browser/browser_process.h" 16 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/browser_shutdown.h" 17 #include "chrome/browser/browser_shutdown.h"
18 #include "chrome/browser/browsing_data/browsing_data_helper.h" 18 #include "chrome/browser/browsing_data/browsing_data_helper.h"
19 #include "chrome/browser/browsing_data/browsing_data_remover.h" 19 #include "chrome/browser/browsing_data/browsing_data_remover.h"
20 #include "chrome/browser/chromeos/cros/cros_library.h" 20 #include "chrome/browser/chromeos/cros/cros_library.h"
21 #include "chrome/browser/chromeos/cros/network_library.h" 21 #include "chrome/browser/chromeos/cros/network_library.h"
22 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" 22 #include "chrome/browser/chromeos/input_method/input_method_configuration.h"
23 #include "chrome/browser/chromeos/input_method/input_method_manager.h" 23 #include "chrome/browser/chromeos/input_method/input_method_manager.h"
24 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" 24 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
25 #include "chrome/browser/chromeos/login/base_login_display_host.h"
26 #include "chrome/browser/chromeos/login/hwid_checker.h" 25 #include "chrome/browser/chromeos/login/hwid_checker.h"
26 #include "chrome/browser/chromeos/login/login_display_host_impl.h"
27 #include "chrome/browser/chromeos/login/screen_locker.h" 27 #include "chrome/browser/chromeos/login/screen_locker.h"
28 #include "chrome/browser/chromeos/login/screens/error_screen_actor.h" 28 #include "chrome/browser/chromeos/login/screens/error_screen_actor.h"
29 #include "chrome/browser/chromeos/login/user.h" 29 #include "chrome/browser/chromeos/login/user.h"
30 #include "chrome/browser/chromeos/login/webui_login_display.h" 30 #include "chrome/browser/chromeos/login/webui_login_display.h"
31 #include "chrome/browser/chromeos/login/wizard_controller.h" 31 #include "chrome/browser/chromeos/login/wizard_controller.h"
32 #include "chrome/browser/chromeos/net/network_portal_detector.h" 32 #include "chrome/browser/chromeos/net/network_portal_detector.h"
33 #include "chrome/browser/chromeos/settings/cros_settings.h" 33 #include "chrome/browser/chromeos/settings/cros_settings.h"
34 #include "chrome/browser/io_thread.h" 34 #include "chrome/browser/io_thread.h"
35 #include "chrome/browser/policy/browser_policy_connector.h" 35 #include "chrome/browser/policy/browser_policy_connector.h"
36 #include "chrome/browser/profiles/profile.h" 36 #include "chrome/browser/profiles/profile.h"
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 1074
1075 void SigninScreenHandler::HandleLaunchIncognito() { 1075 void SigninScreenHandler::HandleLaunchIncognito() {
1076 if (delegate_) 1076 if (delegate_)
1077 delegate_->LoginAsGuest(); 1077 delegate_->LoginAsGuest();
1078 } 1078 }
1079 1079
1080 void SigninScreenHandler::HandleShowLocallyManagedUserCreationScreen() { 1080 void SigninScreenHandler::HandleShowLocallyManagedUserCreationScreen() {
1081 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 1081 const CommandLine* command_line = CommandLine::ForCurrentProcess();
1082 if (!command_line->HasSwitch(::switches::kEnableManagedUsers)) 1082 if (!command_line->HasSwitch(::switches::kEnableManagedUsers))
1083 return; 1083 return;
1084 BaseLoginDisplayHost::default_host()-> 1084 LoginDisplayHostImpl::default_host()->
1085 StartWizard(WizardController::kLocallyManagedUserCreationScreenName, 1085 StartWizard(WizardController::kLocallyManagedUserCreationScreenName,
1086 NULL); 1086 NULL);
1087 } 1087 }
1088 1088
1089 void SigninScreenHandler::HandleLaunchPublicAccount( 1089 void SigninScreenHandler::HandleLaunchPublicAccount(
1090 const std::string& username) { 1090 const std::string& username) {
1091 if (delegate_) 1091 if (delegate_)
1092 delegate_->LoginAsPublicAccount(username); 1092 delegate_->LoginAsPublicAccount(username);
1093 } 1093 }
1094 1094
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 size_t non_owner_count = 0; 1205 size_t non_owner_count = 0;
1206 1206
1207 ListValue users_list; 1207 ListValue users_list;
1208 const UserList& users = delegate_->GetUsers(); 1208 const UserList& users = delegate_->GetUsers();
1209 1209
1210 // TODO(nkostylev): Show optional intro dialog about multi-profiles feature 1210 // TODO(nkostylev): Show optional intro dialog about multi-profiles feature
1211 // based on user preferences. http://crbug.com/230862 1211 // based on user preferences. http://crbug.com/230862
1212 1212
1213 // TODO(nkostylev): Move to a separate method in UserManager. 1213 // TODO(nkostylev): Move to a separate method in UserManager.
1214 // http://crbug.com/230852 1214 // http://crbug.com/230852
1215 bool is_signin_to_add = BaseLoginDisplayHost::default_host() && 1215 bool is_signin_to_add = LoginDisplayHostImpl::default_host() &&
1216 UserManager::Get()->IsUserLoggedIn(); 1216 UserManager::Get()->IsUserLoggedIn();
1217 1217
1218 bool single_user = users.size() == 1; 1218 bool single_user = users.size() == 1;
1219 for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) { 1219 for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) {
1220 const std::string& email = (*it)->email(); 1220 const std::string& email = (*it)->email();
1221 if (is_signin_to_add && (*it)->is_logged_in()) { 1221 if (is_signin_to_add && (*it)->is_logged_in()) {
1222 // Skip all users that are already signed in. 1222 // Skip all users that are already signed in.
1223 continue; 1223 continue;
1224 } 1224 }
1225 1225
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 content::NotificationService::AllSources(), 1352 content::NotificationService::AllSources(),
1353 content::NotificationService::NoDetails()); 1353 content::NotificationService::NoDetails());
1354 } 1354 }
1355 1355
1356 void SigninScreenHandler::HandleCreateAccount() { 1356 void SigninScreenHandler::HandleCreateAccount() {
1357 if (delegate_) 1357 if (delegate_)
1358 delegate_->CreateAccount(); 1358 delegate_->CreateAccount();
1359 } 1359 }
1360 1360
1361 void SigninScreenHandler::HandleOpenProxySettings() { 1361 void SigninScreenHandler::HandleOpenProxySettings() {
1362 BaseLoginDisplayHost::default_host()->OpenProxySettings(); 1362 LoginDisplayHostImpl::default_host()->OpenProxySettings();
1363 } 1363 }
1364 1364
1365 void SigninScreenHandler::HandleLoginVisible(const std::string& source) { 1365 void SigninScreenHandler::HandleLoginVisible(const std::string& source) {
1366 LOG(INFO) << "Login WebUI >> LoginVisible, source: " << source << ", " 1366 LOG(INFO) << "Login WebUI >> LoginVisible, source: " << source << ", "
1367 << "webui_visible_: " << webui_visible_; 1367 << "webui_visible_: " << webui_visible_;
1368 if (!webui_visible_) { 1368 if (!webui_visible_) {
1369 // There might be multiple messages from OOBE UI so send notifications after 1369 // There might be multiple messages from OOBE UI so send notifications after
1370 // the first one only. 1370 // the first one only.
1371 content::NotificationService::current()->Notify( 1371 content::NotificationService::current()->Notify(
1372 chrome::NOTIFICATION_LOGIN_WEBUI_VISIBLE, 1372 chrome::NOTIFICATION_LOGIN_WEBUI_VISIBLE,
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1557 if (!cros_settings) 1557 if (!cros_settings)
1558 return false; 1558 return false;
1559 1559
1560 // Offline login is allowed only when user pods are hidden. 1560 // Offline login is allowed only when user pods are hidden.
1561 bool show_pods; 1561 bool show_pods;
1562 cros_settings->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, &show_pods); 1562 cros_settings->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, &show_pods);
1563 return !show_pods; 1563 return !show_pods;
1564 } 1564 }
1565 1565
1566 } // namespace chromeos 1566 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/oobe_ui.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698