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

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

Issue 12213110: Implemented screen notifying users about malformed HWID. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed log message. Created 7 years, 10 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
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/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/command_line.h" 10 #include "base/command_line.h"
11 #include "base/logging.h" 11 #include "base/logging.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/input_method/xkeyboard.h" 24 #include "chrome/browser/chromeos/input_method/xkeyboard.h"
25 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" 25 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
26 #include "chrome/browser/chromeos/login/base_login_display_host.h" 26 #include "chrome/browser/chromeos/login/base_login_display_host.h"
27 #include "chrome/browser/chromeos/login/error_screen_actor.h" 27 #include "chrome/browser/chromeos/login/error_screen_actor.h"
28 #include "chrome/browser/chromeos/login/hwid_checker.h"
28 #include "chrome/browser/chromeos/login/screen_locker.h" 29 #include "chrome/browser/chromeos/login/screen_locker.h"
29 #include "chrome/browser/chromeos/login/user.h" 30 #include "chrome/browser/chromeos/login/user.h"
30 #include "chrome/browser/chromeos/login/webui_login_display.h" 31 #include "chrome/browser/chromeos/login/webui_login_display.h"
31 #include "chrome/browser/chromeos/net/network_portal_detector.h" 32 #include "chrome/browser/chromeos/net/network_portal_detector.h"
32 #include "chrome/browser/chromeos/settings/cros_settings.h" 33 #include "chrome/browser/chromeos/settings/cros_settings.h"
33 #include "chrome/browser/io_thread.h" 34 #include "chrome/browser/io_thread.h"
34 #include "chrome/browser/policy/browser_policy_connector.h" 35 #include "chrome/browser/policy/browser_policy_connector.h"
35 #include "chrome/browser/prefs/pref_service.h" 36 #include "chrome/browser/prefs/pref_service.h"
36 #include "chrome/browser/profiles/profile.h" 37 #include "chrome/browser/profiles/profile.h"
37 #include "chrome/browser/ui/webui/chromeos/login/error_screen_handler.h" 38 #include "chrome/browser/ui/webui/chromeos/login/error_screen_handler.h"
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 base::FundamentalValue animated_value(animated); 1262 base::FundamentalValue animated_value(animated);
1262 base::FundamentalValue guest_value(delegate_->IsShowGuest()); 1263 base::FundamentalValue guest_value(delegate_->IsShowGuest());
1263 web_ui()->CallJavascriptFunction("login.AccountPickerScreen.loadUsers", 1264 web_ui()->CallJavascriptFunction("login.AccountPickerScreen.loadUsers",
1264 users_list, animated_value, guest_value); 1265 users_list, animated_value, guest_value);
1265 } 1266 }
1266 1267
1267 void SigninScreenHandler::HandleAccountPickerReady( 1268 void SigninScreenHandler::HandleAccountPickerReady(
1268 const base::ListValue* args) { 1269 const base::ListValue* args) {
1269 LOG(INFO) << "Login WebUI >> AccountPickerReady"; 1270 LOG(INFO) << "Login WebUI >> AccountPickerReady";
1270 1271
1272 if (delegate_ && !ScreenLocker::default_screen_locker() &&
1273 !chromeos::IsMachineHWIDCorrect() &&
1274 !oobe_ui_) {
1275 delegate_->ShowWrongHWIDScreen();
1276 return;
1277 }
1278
1271 PrefService* prefs = g_browser_process->local_state(); 1279 PrefService* prefs = g_browser_process->local_state();
1272 if (prefs->GetBoolean(prefs::kFactoryResetRequested)) { 1280 if (prefs->GetBoolean(prefs::kFactoryResetRequested)) {
1273 prefs->SetBoolean(prefs::kFactoryResetRequested, false); 1281 prefs->SetBoolean(prefs::kFactoryResetRequested, false);
1274 prefs->CommitPendingWrite(); 1282 prefs->CommitPendingWrite();
1275 base::ListValue args; 1283 base::ListValue args;
1276 HandleToggleResetScreen(&args); 1284 HandleToggleResetScreen(&args);
1277 return; 1285 return;
1278 } 1286 }
1279 1287
1280 is_account_picker_showing_first_time_ = true; 1288 is_account_picker_showing_first_time_ = true;
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
1660 if (!cros_settings) 1668 if (!cros_settings)
1661 return false; 1669 return false;
1662 1670
1663 // Offline login is allowed only when user pods are hidden. 1671 // Offline login is allowed only when user pods are hidden.
1664 bool show_pods; 1672 bool show_pods;
1665 cros_settings->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, &show_pods); 1673 cros_settings->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, &show_pods);
1666 return !show_pods; 1674 return !show_pods;
1667 } 1675 }
1668 1676
1669 } // namespace chromeos 1677 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698