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

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

Issue 2894783003: Make Hands-Off Zero-Touch Enrollment compatibile with tests (Closed)
Patch Set: Make Hands-Off Zero-Touch Enrollment compatibile with tests Created 3 years, 7 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
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.h ('k') | chrome/common/pref_names.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/wizard_controller.h" 5 #include "chrome/browser/chromeos/login/wizard_controller.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 screen_id == OobeScreen::SCREEN_OOBE_EULA || 1367 screen_id == OobeScreen::SCREEN_OOBE_EULA ||
1368 screen_id == OobeScreen::SCREEN_SPECIAL_LOGIN || 1368 screen_id == OobeScreen::SCREEN_SPECIAL_LOGIN ||
1369 screen_id == OobeScreen::SCREEN_WRONG_HWID); 1369 screen_id == OobeScreen::SCREEN_WRONG_HWID);
1370 } 1370 }
1371 1371
1372 // static 1372 // static
1373 void WizardController::SkipPostLoginScreensForTesting() { 1373 void WizardController::SkipPostLoginScreensForTesting() {
1374 skip_post_login_screens_ = true; 1374 skip_post_login_screens_ = true;
1375 } 1375 }
1376 1376
1377 // static
1378 bool WizardController::UsingHandsOffEnrollment() {
1379 return policy::DeviceCloudPolicyManagerChromeOS::
1380 GetZeroTouchEnrollmentMode() ==
1381 policy::ZeroTouchEnrollmentMode::HANDS_OFF;
1382 }
1383
1377 void WizardController::OnLocalStateInitialized(bool /* succeeded */) { 1384 void WizardController::OnLocalStateInitialized(bool /* succeeded */) {
1378 if (GetLocalState()->GetInitializationStatus() != 1385 if (GetLocalState()->GetInitializationStatus() !=
1379 PrefService::INITIALIZATION_STATUS_ERROR) { 1386 PrefService::INITIALIZATION_STATUS_ERROR) {
1380 return; 1387 return;
1381 } 1388 }
1382 GetErrorScreen()->SetUIState(NetworkError::UI_STATE_LOCAL_STATE_ERROR); 1389 GetErrorScreen()->SetUIState(NetworkError::UI_STATE_LOCAL_STATE_ERROR);
1383 host_->SetStatusAreaVisible(false); 1390 host_->SetStatusAreaVisible(false);
1384 ShowErrorScreen(); 1391 ShowErrorScreen();
1385 } 1392 }
1386 1393
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 SetCurrentScreen(screen); 1547 SetCurrentScreen(screen);
1541 } 1548 }
1542 1549
1543 AutoEnrollmentController* WizardController::GetAutoEnrollmentController() { 1550 AutoEnrollmentController* WizardController::GetAutoEnrollmentController() {
1544 if (!auto_enrollment_controller_) 1551 if (!auto_enrollment_controller_)
1545 auto_enrollment_controller_ = base::MakeUnique<AutoEnrollmentController>(); 1552 auto_enrollment_controller_ = base::MakeUnique<AutoEnrollmentController>();
1546 return auto_enrollment_controller_.get(); 1553 return auto_enrollment_controller_.get();
1547 } 1554 }
1548 1555
1549 } // namespace chromeos 1556 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.h ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698