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

Side by Side Diff: chrome/browser/chromeos/login/arc_kiosk_controller.cc

Issue 2944553003: cros: Enable Ext4 migration in ARC kiosk mode. (Closed)
Patch Set: Add UMA. Created 3 years, 6 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/arc_kiosk_controller.h" 5 #include "chrome/browser/chromeos/login/arc_kiosk_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "base/timer/timer.h" 9 #include "base/timer/timer.h"
10 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" 10 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h"
11 #include "chrome/browser/chromeos/login/auth/chrome_login_performer.h" 11 #include "chrome/browser/chromeos/login/auth/chrome_login_performer.h"
12 #include "chrome/browser/chromeos/login/screens/encryption_migration_screen.h"
12 #include "chrome/browser/chromeos/login/ui/login_display_host.h" 13 #include "chrome/browser/chromeos/login/ui/login_display_host.h"
13 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" 14 #include "chrome/browser/chromeos/login/ui/webui_login_view.h"
15 #include "chrome/browser/chromeos/login/wizard_controller.h"
14 #include "chrome/browser/lifetime/application_lifetime.h" 16 #include "chrome/browser/lifetime/application_lifetime.h"
15 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" 18 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
17 #include "chromeos/login/auth/user_context.h" 19 #include "chromeos/login/auth/user_context.h"
18 #include "components/session_manager/core/session_manager.h" 20 #include "components/session_manager/core/session_manager.h"
19 #include "components/signin/core/account_id/account_id.h" 21 #include "components/signin/core/account_id/account_id.h"
20 22
21 namespace chromeos { 23 namespace chromeos {
22 24
23 // ARC Kiosk splash screen minimum show time. 25 // ARC Kiosk splash screen minimum show time.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 LOG(ERROR) << "Policy load failed. Will now shut down"; 94 LOG(ERROR) << "Policy load failed. Will now shut down";
93 KioskAppLaunchError::Save(KioskAppLaunchError::POLICY_LOAD_FAILED); 95 KioskAppLaunchError::Save(KioskAppLaunchError::POLICY_LOAD_FAILED);
94 CleanUp(); 96 CleanUp();
95 chrome::AttemptUserExit(); 97 chrome::AttemptUserExit();
96 } 98 }
97 99
98 void ArcKioskController::SetAuthFlowOffline(bool offline) { 100 void ArcKioskController::SetAuthFlowOffline(bool offline) {
99 NOTREACHED(); 101 NOTREACHED();
100 } 102 }
101 103
104 void ArcKioskController::OnOldEncryptionDetected(
105 const UserContext& user_context,
106 bool has_incomplete_migration) {
107 host_->StartWizard(OobeScreen::SCREEN_ENCRYPTION_MIGRATION);
108
109 EncryptionMigrationScreen* migration_screen =
110 static_cast<EncryptionMigrationScreen*>(
111 host_->GetWizardController()->current_screen());
112 DCHECK(migration_screen);
113 migration_screen->SetUserContext(user_context);
114 migration_screen->SetupInitialView();
115 }
116
102 void ArcKioskController::OnProfilePrepared(Profile* profile, 117 void ArcKioskController::OnProfilePrepared(Profile* profile,
103 bool browser_launched) { 118 bool browser_launched) {
104 DVLOG(1) << "Profile loaded... Starting app launch."; 119 DVLOG(1) << "Profile loaded... Starting app launch.";
105 profile_ = profile; 120 profile_ = profile;
106 // This object could be deleted any time after successfully reporting 121 // This object could be deleted any time after successfully reporting
107 // a profile load, so invalidate the delegate now. 122 // a profile load, so invalidate the delegate now.
108 UserSessionManager::GetInstance()->DelegateDeleted(this); 123 UserSessionManager::GetInstance()->DelegateDeleted(this);
109 ArcKioskAppService::Get(profile_)->SetDelegate(this); 124 ArcKioskAppService::Get(profile_)->SetDelegate(this);
110 arc_kiosk_splash_screen_view_->UpdateArcKioskState( 125 arc_kiosk_splash_screen_view_->UpdateArcKioskState(
111 ArcKioskSplashScreenView::ArcKioskState::WAITING_APP_LAUNCH); 126 ArcKioskSplashScreenView::ArcKioskState::WAITING_APP_LAUNCH);
(...skipping 15 matching lines...) Expand all
127 CloseSplashScreen(); 142 CloseSplashScreen();
128 } 143 }
129 144
130 void ArcKioskController::OnCancelArcKioskLaunch() { 145 void ArcKioskController::OnCancelArcKioskLaunch() {
131 KioskAppLaunchError::Save(KioskAppLaunchError::USER_CANCEL); 146 KioskAppLaunchError::Save(KioskAppLaunchError::USER_CANCEL);
132 CleanUp(); 147 CleanUp();
133 chrome::AttemptUserExit(); 148 chrome::AttemptUserExit();
134 } 149 }
135 150
136 } // namespace chromeos 151 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698