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

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

Issue 2771803003: Don't start FRE from the login screen (Closed)
Patch Set: Created 3 years, 9 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
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 <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/system/tray/system_tray.h" 10 #include "ash/common/system/tray/system_tray.h"
(...skipping 20 matching lines...) Expand all
31 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 31 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
32 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" 32 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
33 #include "chrome/browser/chromeos/base/locale_util.h" 33 #include "chrome/browser/chromeos/base/locale_util.h"
34 #include "chrome/browser/chromeos/boot_times_recorder.h" 34 #include "chrome/browser/chromeos/boot_times_recorder.h"
35 #include "chrome/browser/chromeos/first_run/drive_first_run_controller.h" 35 #include "chrome/browser/chromeos/first_run/drive_first_run_controller.h"
36 #include "chrome/browser/chromeos/first_run/first_run.h" 36 #include "chrome/browser/chromeos/first_run/first_run.h"
37 #include "chrome/browser/chromeos/input_method/input_method_util.h" 37 #include "chrome/browser/chromeos/input_method/input_method_util.h"
38 #include "chrome/browser/chromeos/language_preferences.h" 38 #include "chrome/browser/chromeos/language_preferences.h"
39 #include "chrome/browser/chromeos/login/arc_kiosk_controller.h" 39 #include "chrome/browser/chromeos/login/arc_kiosk_controller.h"
40 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" 40 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h"
41 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h"
42 #include "chrome/browser/chromeos/login/existing_user_controller.h" 41 #include "chrome/browser/chromeos/login/existing_user_controller.h"
43 #include "chrome/browser/chromeos/login/helper.h" 42 #include "chrome/browser/chromeos/login/helper.h"
44 #include "chrome/browser/chromeos/login/login_wizard.h" 43 #include "chrome/browser/chromeos/login/login_wizard.h"
45 #include "chrome/browser/chromeos/login/screens/core_oobe_view.h" 44 #include "chrome/browser/chromeos/login/screens/core_oobe_view.h"
46 #include "chrome/browser/chromeos/login/screens/gaia_view.h" 45 #include "chrome/browser/chromeos/login/screens/gaia_view.h"
47 #include "chrome/browser/chromeos/login/signin/token_handle_util.h" 46 #include "chrome/browser/chromeos/login/signin/token_handle_util.h"
48 #include "chrome/browser/chromeos/login/startup_utils.h" 47 #include "chrome/browser/chromeos/login/startup_utils.h"
49 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h" 48 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h"
50 #include "chrome/browser/chromeos/login/ui/webui_login_display.h" 49 #include "chrome/browser/chromeos/login/ui/webui_login_display.h"
51 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" 50 #include "chrome/browser/chromeos/login/ui/webui_login_view.h"
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 // Defer the deletion of LoginDisplayHost instance until the user adding 584 // Defer the deletion of LoginDisplayHost instance until the user adding
586 // animation (which is done by UserSwitchAnimatorChromeOS) is finished. 585 // animation (which is done by UserSwitchAnimatorChromeOS) is finished.
587 // This is to guarantee OnUserSwitchAnimationFinished() is called before 586 // This is to guarantee OnUserSwitchAnimationFinished() is called before
588 // LoginDisplayHost deletes itself. 587 // LoginDisplayHost deletes itself.
589 break; 588 break;
590 default: 589 default:
591 break; 590 break;
592 } 591 }
593 } 592 }
594 593
595 void LoginDisplayHostImpl::OnCompleteLogin() {
596 if (auto_enrollment_controller_)
597 auto_enrollment_controller_->Cancel();
598 }
599
600 void LoginDisplayHostImpl::OpenProxySettings() { 594 void LoginDisplayHostImpl::OpenProxySettings() {
601 if (login_view_) 595 if (login_view_)
602 login_view_->OpenProxySettings(); 596 login_view_->OpenProxySettings();
603 } 597 }
604 598
605 void LoginDisplayHostImpl::SetStatusAreaVisible(bool visible) { 599 void LoginDisplayHostImpl::SetStatusAreaVisible(bool visible) {
606 if (initialize_webui_hidden_) 600 if (initialize_webui_hidden_)
607 status_area_saved_visibility_ = visible; 601 status_area_saved_visibility_ = visible;
608 else if (login_view_) 602 else if (login_view_)
609 login_view_->SetStatusAreaVisible(visible); 603 login_view_->SetStatusAreaVisible(visible);
610 } 604 }
611 605
612 AutoEnrollmentController* LoginDisplayHostImpl::GetAutoEnrollmentController() {
613 if (!auto_enrollment_controller_)
614 auto_enrollment_controller_.reset(new AutoEnrollmentController());
615 return auto_enrollment_controller_.get();
616 }
617
618 void LoginDisplayHostImpl::StartWizard(OobeScreen first_screen) { 606 void LoginDisplayHostImpl::StartWizard(OobeScreen first_screen) {
619 DisableKeyboardOverscroll(); 607 DisableKeyboardOverscroll();
620 608
621 startup_sound_honors_spoken_feedback_ = false; 609 startup_sound_honors_spoken_feedback_ = false;
622 TryToPlayStartupSound(); 610 TryToPlayStartupSound();
623 611
624 // Keep parameters to restore if renderer crashes. 612 // Keep parameters to restore if renderer crashes.
625 restore_path_ = RESTORE_WIZARD; 613 restore_path_ = RESTORE_WIZARD;
626 first_screen_ = first_screen; 614 first_screen_ = first_screen;
627 is_showing_login_ = false; 615 is_showing_login_ = false;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 if (!signin_screen_controller_.get()) { 755 if (!signin_screen_controller_.get()) {
768 signin_screen_controller_.reset(new SignInScreenController( 756 signin_screen_controller_.reset(new SignInScreenController(
769 GetOobeUI(), webui_login_display_->delegate())); 757 GetOobeUI(), webui_login_display_->delegate()));
770 } 758 }
771 759
772 oobe_progress_bar_visible_ = !StartupUtils::IsDeviceRegistered(); 760 oobe_progress_bar_visible_ = !StartupUtils::IsDeviceRegistered();
773 SetOobeProgressBarVisible(oobe_progress_bar_visible_); 761 SetOobeProgressBarVisible(oobe_progress_bar_visible_);
774 SetStatusAreaVisible(true); 762 SetStatusAreaVisible(true);
775 existing_user_controller_->Init(users); 763 existing_user_controller_->Init(users);
776 764
777 // We might be here after a reboot that was triggered after OOBE was complete,
778 // so check for auto-enrollment again. This might catch a cached decision from
779 // a previous oobe flow, or might start a new check with the server.
780 GetAutoEnrollmentController()->Start();
781
782 // Initiate mobile config load. 765 // Initiate mobile config load.
783 MobileConfig::GetInstance(); 766 MobileConfig::GetInstance();
784 767
785 // Initiate device policy fetching. 768 // Initiate device policy fetching.
786 policy::BrowserPolicyConnectorChromeOS* connector = 769 policy::BrowserPolicyConnectorChromeOS* connector =
787 g_browser_process->platform_part()->browser_policy_connector_chromeos(); 770 g_browser_process->platform_part()->browser_policy_connector_chromeos();
788 connector->ScheduleServiceInitialization( 771 connector->ScheduleServiceInitialization(
789 kPolicyServiceInitializationDelayMilliseconds); 772 kPolicyServiceInitializationDelayMilliseconds);
790 773
791 CHECK(webui_login_display_); 774 CHECK(webui_login_display_);
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 // Chrome locale. Otherwise it will be lost if Chrome restarts. 1473 // Chrome locale. Otherwise it will be lost if Chrome restarts.
1491 // Don't need to schedule pref save because setting initial local 1474 // Don't need to schedule pref save because setting initial local
1492 // will enforce preference saving. 1475 // will enforce preference saving.
1493 prefs->SetString(prefs::kApplicationLocale, locale); 1476 prefs->SetString(prefs::kApplicationLocale, locale);
1494 StartupUtils::SetInitialLocale(locale); 1477 StartupUtils::SetInitialLocale(locale);
1495 1478
1496 TriggerShowLoginWizardFinish(locale, std::move(data)); 1479 TriggerShowLoginWizardFinish(locale, std::move(data));
1497 } 1480 }
1498 1481
1499 } // namespace chromeos 1482 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698