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

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

Issue 608283003: Remove retail mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/login/ui/login_display_host_impl.h" 5 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/debug/trace_event.h" 11 #include "base/debug/trace_event.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/prefs/pref_service.h" 13 #include "base/prefs/pref_service.h"
14 #include "base/strings/string_split.h" 14 #include "base/strings/string_split.h"
15 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
16 #include "base/threading/thread_restrictions.h" 16 #include "base/threading/thread_restrictions.h"
17 #include "base/time/time.h" 17 #include "base/time/time.h"
18 #include "base/values.h" 18 #include "base/values.h"
19 #include "chrome/browser/browser_process.h" 19 #include "chrome/browser/browser_process.h"
20 #include "chrome/browser/browser_shutdown.h" 20 #include "chrome/browser/browser_shutdown.h"
21 #include "chrome/browser/chrome_notification_types.h" 21 #include "chrome/browser/chrome_notification_types.h"
22 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 22 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
23 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" 23 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
24 #include "chrome/browser/chromeos/base/locale_util.h" 24 #include "chrome/browser/chromeos/base/locale_util.h"
25 #include "chrome/browser/chromeos/boot_times_loader.h" 25 #include "chrome/browser/chromeos/boot_times_loader.h"
26 #include "chrome/browser/chromeos/first_run/drive_first_run_controller.h" 26 #include "chrome/browser/chromeos/first_run/drive_first_run_controller.h"
27 #include "chrome/browser/chromeos/first_run/first_run.h" 27 #include "chrome/browser/chromeos/first_run/first_run.h"
28 #include "chrome/browser/chromeos/input_method/input_method_util.h" 28 #include "chrome/browser/chromeos/input_method/input_method_util.h"
29 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
30 #include "chrome/browser/chromeos/language_preferences.h" 29 #include "chrome/browser/chromeos/language_preferences.h"
31 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" 30 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h"
32 #include "chrome/browser/chromeos/login/existing_user_controller.h" 31 #include "chrome/browser/chromeos/login/existing_user_controller.h"
33 #include "chrome/browser/chromeos/login/helper.h" 32 #include "chrome/browser/chromeos/login/helper.h"
34 #include "chrome/browser/chromeos/login/login_utils.h" 33 #include "chrome/browser/chromeos/login/login_utils.h"
35 #include "chrome/browser/chromeos/login/login_wizard.h" 34 #include "chrome/browser/chromeos/login/login_wizard.h"
36 #include "chrome/browser/chromeos/login/screens/core_oobe_actor.h" 35 #include "chrome/browser/chromeos/login/screens/core_oobe_actor.h"
37 #include "chrome/browser/chromeos/login/startup_utils.h" 36 #include "chrome/browser/chromeos/login/startup_utils.h"
38 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h" 37 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h"
39 #include "chrome/browser/chromeos/login/ui/oobe_display.h" 38 #include "chrome/browser/chromeos/login/ui/oobe_display.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 initialize_webui_hidden_ = true; 356 initialize_webui_hidden_ = true;
358 else if (override_type == kWebUIInitPostpone) 357 else if (override_type == kWebUIInitPostpone)
359 initialize_webui_hidden_ = false; 358 initialize_webui_hidden_ = false;
360 } 359 }
361 360
362 // Always postpone WebUI initialization on first boot, otherwise we miss 361 // Always postpone WebUI initialization on first boot, otherwise we miss
363 // initial animation. 362 // initial animation.
364 if (!StartupUtils::IsOobeCompleted()) 363 if (!StartupUtils::IsOobeCompleted())
365 initialize_webui_hidden_ = false; 364 initialize_webui_hidden_ = false;
366 365
367 // There is no wallpaper for KioskMode, don't initialize the webui hidden.
368 if (chromeos::KioskModeSettings::Get()->IsKioskModeEnabled())
369 initialize_webui_hidden_ = false;
370
371 #if !defined(USE_ATHENA) 366 #if !defined(USE_ATHENA)
372 if (waiting_for_wallpaper_load_) { 367 if (waiting_for_wallpaper_load_) {
373 registrar_.Add(this, 368 registrar_.Add(this,
374 chrome::NOTIFICATION_WALLPAPER_ANIMATION_FINISHED, 369 chrome::NOTIFICATION_WALLPAPER_ANIMATION_FINISHED,
375 content::NotificationService::AllSources()); 370 content::NotificationService::AllSources());
376 } 371 }
377 #endif 372 #endif
378 373
379 // When we wait for WebUI to be initialized we wait for one of 374 // When we wait for WebUI to be initialized we wait for one of
380 // these notifications. 375 // these notifications.
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 // Initiate device policy fetching. 657 // Initiate device policy fetching.
663 policy::BrowserPolicyConnectorChromeOS* connector = 658 policy::BrowserPolicyConnectorChromeOS* connector =
664 g_browser_process->platform_part()->browser_policy_connector_chromeos(); 659 g_browser_process->platform_part()->browser_policy_connector_chromeos();
665 connector->ScheduleServiceInitialization( 660 connector->ScheduleServiceInitialization(
666 kPolicyServiceInitializationDelayMilliseconds); 661 kPolicyServiceInitializationDelayMilliseconds);
667 662
668 CHECK(webui_login_display_); 663 CHECK(webui_login_display_);
669 GetOobeUI()->ShowSigninScreen(context, 664 GetOobeUI()->ShowSigninScreen(context,
670 webui_login_display_, 665 webui_login_display_,
671 webui_login_display_); 666 webui_login_display_);
672 if (chromeos::KioskModeSettings::Get()->IsKioskModeEnabled())
673 SetStatusAreaVisible(false);
674 TRACE_EVENT_ASYNC_STEP_INTO0("ui", 667 TRACE_EVENT_ASYNC_STEP_INTO0("ui",
675 "ShowLoginWebUI", 668 "ShowLoginWebUI",
676 kShowLoginWebUIid, 669 kShowLoginWebUIid,
677 "WaitForScreenStateInitialize"); 670 "WaitForScreenStateInitialize");
678 BootTimesLoader::Get()->RecordCurrentStats( 671 BootTimesLoader::Get()->RecordCurrentStats(
679 "login-wait-for-signin-state-initialize"); 672 "login-wait-for-signin-state-initialize");
680 } 673 }
681 674
682 void LoginDisplayHostImpl::ResumeSignInScreen() { 675 void LoginDisplayHostImpl::ResumeSignInScreen() {
683 // We only get here after a previous call the StartSignInScreen. That sign-in 676 // We only get here after a previous call the StartSignInScreen. That sign-in
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 1295
1303 locale_util::SwitchLanguageCallback callback( 1296 locale_util::SwitchLanguageCallback callback(
1304 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))); 1297 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())));
1305 1298
1306 // Load locale keyboards here. Hardware layout would be automatically enabled. 1299 // Load locale keyboards here. Hardware layout would be automatically enabled.
1307 locale_util::SwitchLanguage( 1300 locale_util::SwitchLanguage(
1308 locale, true, true /* login_layouts_only */, callback); 1301 locale, true, true /* login_layouts_only */, callback);
1309 } 1302 }
1310 1303
1311 } // namespace chromeos 1304 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698