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

Side by Side Diff: chrome/browser/chromeos/login/screens/host_pairing_screen.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: We don't need to set enrollment related local state for a host device since Enrollment Screen doesn… 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 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/screens/host_pairing_screen.h" 5 #include "chrome/browser/chromeos/login/screens/host_pairing_screen.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/chromeos/login/startup_utils.h" 9 #include "chrome/browser/chromeos/login/startup_utils.h"
10 #include "chrome/browser/chromeos/login/wizard_controller.h" 10 #include "chrome/browser/chromeos/login/wizard_controller.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 actor_->Hide(); 61 actor_->Hide();
62 } 62 }
63 63
64 std::string HostPairingScreen::GetName() const { 64 std::string HostPairingScreen::GetName() const {
65 return WizardController::kHostPairingScreenName; 65 return WizardController::kHostPairingScreenName;
66 } 66 }
67 67
68 void HostPairingScreen::PairingStageChanged(Stage new_stage) { 68 void HostPairingScreen::PairingStageChanged(Stage new_stage) {
69 std::string desired_page; 69 std::string desired_page;
70 switch (new_stage) { 70 switch (new_stage) {
71 case HostPairingController::STAGE_INITIALIZATION_ERROR: {
72 desired_page = kPageIntializationError;
73 break;
74 }
71 case HostPairingController::STAGE_WAITING_FOR_CONTROLLER: 75 case HostPairingController::STAGE_WAITING_FOR_CONTROLLER:
72 case HostPairingController::STAGE_WAITING_FOR_CONTROLLER_AFTER_UPDATE: { 76 case HostPairingController::STAGE_WAITING_FOR_CONTROLLER_AFTER_UPDATE: {
73 desired_page = kPageWelcome; 77 desired_page = kPageWelcome;
74 break; 78 break;
75 } 79 }
76 case HostPairingController::STAGE_WAITING_FOR_CODE_CONFIRMATION: { 80 case HostPairingController::STAGE_WAITING_FOR_CODE_CONFIRMATION: {
77 desired_page = kPageCodeConfirmation; 81 desired_page = kPageCodeConfirmation;
78 context_.SetString(kContextKeyConfirmationCode, 82 context_.SetString(kContextKeyConfirmationCode,
79 remora_controller_->GetConfirmationCode()); 83 remora_controller_->GetConfirmationCode());
80 break; 84 break;
81 } 85 }
86 case HostPairingController::STAGE_CONTROLLER_CONNECTION_ERROR: {
87 desired_page = kPageConnectionError;
88 break;
89 }
82 case HostPairingController::STAGE_SETUP_BASIC_CONFIGURATION: { 90 case HostPairingController::STAGE_SETUP_BASIC_CONFIGURATION: {
83 desired_page = kPageSetupBasicConfiguration; 91 desired_page = kPageSetupBasicConfiguration;
84 break; 92 break;
85 } 93 }
86 case HostPairingController::STAGE_SETUP_NETWORK_ERROR: { 94 case HostPairingController::STAGE_SETUP_NETWORK_ERROR: {
87 desired_page = kPageSetupNetworkError; 95 desired_page = kPageSetupNetworkError;
88 break; 96 break;
89 } 97 }
90 case HostPairingController::STAGE_WAITING_FOR_CREDENTIALS: { 98 case HostPairingController::STAGE_WAITING_FOR_CREDENTIALS: {
91 desired_page = kPageEnrollmentIntroduction; 99 desired_page = kPageEnrollmentIntroduction;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 } 201 }
194 202
195 void HostPairingScreen::OnAnyEnrollmentError() { 203 void HostPairingScreen::OnAnyEnrollmentError() {
196 enrollment_helper_->ClearAuth(base::Bind(&HostPairingScreen::OnAuthCleared, 204 enrollment_helper_->ClearAuth(base::Bind(&HostPairingScreen::OnAuthCleared,
197 weak_ptr_factory_.GetWeakPtr())); 205 weak_ptr_factory_.GetWeakPtr()));
198 remora_controller_->OnEnrollmentStatusChanged( 206 remora_controller_->OnEnrollmentStatusChanged(
199 HostPairingController::ENROLLMENT_STATUS_FAILURE); 207 HostPairingController::ENROLLMENT_STATUS_FAILURE);
200 } 208 }
201 209
202 } // namespace chromeos 210 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | chrome/browser/chromeos/login/screens/host_pairing_screen_actor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698