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

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

Issue 1535573002: 1) Add initialization error page; 2) Add connection error page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clear the enrollment related local state when the enrollment succeeds or an error occurs. Created 5 years 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 (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 <stdlib.h> 8 #include <stdlib.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 10
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 ShowLoginScreen(LoginScreenContext()); 609 ShowLoginScreen(LoginScreenContext());
610 } 610 }
611 611
612 void WizardController::OnUpdateCompleted() { 612 void WizardController::OnUpdateCompleted() {
613 const bool is_shark = g_browser_process->platform_part() 613 const bool is_shark = g_browser_process->platform_part()
614 ->browser_policy_connector_chromeos() 614 ->browser_policy_connector_chromeos()
615 ->GetDeviceCloudPolicyManager() 615 ->GetDeviceCloudPolicyManager()
616 ->IsSharkRequisition(); 616 ->IsSharkRequisition();
617 if (is_shark || IsBootstrappingMaster()) { 617 if (is_shark || IsBootstrappingMaster()) {
618 ShowControllerPairingScreen(); 618 ShowControllerPairingScreen();
619 } else if (IsBootstrappingSlave()) { 619 } else if (IsBootstrappingSlave() && shark_controller_detected_) {
dzhioev (left Google) 2015/12/17 23:33:32 What is this change needed for?
xdai1 2015/12/17 23:49:08 The idea is that we should not show the host pairi
620 ShowHostPairingScreen(); 620 ShowHostPairingScreen();
621 } else { 621 } else {
622 ShowAutoEnrollmentCheckScreen(); 622 ShowAutoEnrollmentCheckScreen();
623 } 623 }
624 } 624 }
625 625
626 void WizardController::OnEulaAccepted() { 626 void WizardController::OnEulaAccepted() {
627 time_eula_accepted_ = base::Time::Now(); 627 time_eula_accepted_ = base::Time::Now();
628 StartupUtils::MarkEulaAccepted(); 628 StartupUtils::MarkEulaAccepted();
629 InitiateMetricsReportingChange( 629 InitiateMetricsReportingChange(
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 bool WizardController::SetOnTimeZoneResolvedForTesting( 1319 bool WizardController::SetOnTimeZoneResolvedForTesting(
1320 const base::Closure& callback) { 1320 const base::Closure& callback) {
1321 if (timezone_resolved_) 1321 if (timezone_resolved_)
1322 return false; 1322 return false;
1323 1323
1324 on_timezone_resolved_for_testing_ = callback; 1324 on_timezone_resolved_for_testing_ = callback;
1325 return true; 1325 return true;
1326 } 1326 }
1327 1327
1328 bool WizardController::IsHostPairingOobe() const { 1328 bool WizardController::IsHostPairingOobe() const {
1329 return IsRemoraRequisition() && 1329 return (IsRemoraRequisition() || IsBootstrappingSlave()) &&
1330 (base::CommandLine::ForCurrentProcess()->HasSwitch( 1330 (base::CommandLine::ForCurrentProcess()->HasSwitch(
1331 switches::kHostPairingOobe) || 1331 switches::kHostPairingOobe) ||
1332 shark_controller_detected_); 1332 shark_controller_detected_);
1333 } 1333 }
1334 1334
1335 void WizardController::MaybeStartListeningForSharkConnection() { 1335 void WizardController::MaybeStartListeningForSharkConnection() {
1336 if (!IsRemoraRequisition() && !IsBootstrappingSlave()) 1336 if (!IsRemoraRequisition() && !IsBootstrappingSlave())
1337 return; 1337 return;
1338 1338
1339 // We shouldn't be here if we are running pairing OOBE already. 1339 // We shouldn't be here if we are running pairing OOBE already.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT; 1384 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT;
1385 } 1385 }
1386 1386
1387 EnrollmentScreen* screen = EnrollmentScreen::Get(this); 1387 EnrollmentScreen* screen = EnrollmentScreen::Get(this);
1388 screen->SetParameters(effective_config, shark_controller_.get()); 1388 screen->SetParameters(effective_config, shark_controller_.get());
1389 SetStatusAreaVisible(true); 1389 SetStatusAreaVisible(true);
1390 SetCurrentScreen(screen); 1390 SetCurrentScreen(screen);
1391 } 1391 }
1392 1392
1393 } // namespace chromeos 1393 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698