| OLD | NEW | 
|---|
| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 72     case HostPairingController::STAGE_WAITING_FOR_CONTROLLER_AFTER_UPDATE: { | 72     case HostPairingController::STAGE_WAITING_FOR_CONTROLLER_AFTER_UPDATE: { | 
| 73       desired_page = kPageWelcome; | 73       desired_page = kPageWelcome; | 
| 74       break; | 74       break; | 
| 75     } | 75     } | 
| 76     case HostPairingController::STAGE_WAITING_FOR_CODE_CONFIRMATION: { | 76     case HostPairingController::STAGE_WAITING_FOR_CODE_CONFIRMATION: { | 
| 77       desired_page = kPageCodeConfirmation; | 77       desired_page = kPageCodeConfirmation; | 
| 78       context_.SetString(kContextKeyConfirmationCode, | 78       context_.SetString(kContextKeyConfirmationCode, | 
| 79                          remora_controller_->GetConfirmationCode()); | 79                          remora_controller_->GetConfirmationCode()); | 
| 80       break; | 80       break; | 
| 81     } | 81     } | 
|  | 82     case HostPairingController::STAGE_SETUP_BASIC_CONFIGURATION: { | 
|  | 83       desired_page = kPageSetupBasicConfiguration; | 
|  | 84       break; | 
|  | 85     } | 
|  | 86     case HostPairingController::STAGE_SETUP_NETWORK_ERROR: { | 
|  | 87       desired_page = kPageSetupNetworkError; | 
|  | 88       break; | 
|  | 89     } | 
| 82     case HostPairingController::STAGE_WAITING_FOR_CREDENTIALS: { | 90     case HostPairingController::STAGE_WAITING_FOR_CREDENTIALS: { | 
| 83       desired_page = kPageEnrollmentIntroduction; | 91       desired_page = kPageEnrollmentIntroduction; | 
| 84       break; | 92       break; | 
| 85     } | 93     } | 
| 86     case HostPairingController::STAGE_ENROLLING: { | 94     case HostPairingController::STAGE_ENROLLING: { | 
| 87       desired_page = kPageEnrollment; | 95       desired_page = kPageEnrollment; | 
| 88       context_.SetString(kContextKeyEnrollmentDomain, | 96       context_.SetString(kContextKeyEnrollmentDomain, | 
| 89                          remora_controller_->GetEnrollmentDomain()); | 97                          remora_controller_->GetEnrollmentDomain()); | 
| 90       break; | 98       break; | 
| 91     } | 99     } | 
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 185 } | 193 } | 
| 186 | 194 | 
| 187 void HostPairingScreen::OnAnyEnrollmentError() { | 195 void HostPairingScreen::OnAnyEnrollmentError() { | 
| 188   enrollment_helper_->ClearAuth(base::Bind(&HostPairingScreen::OnAuthCleared, | 196   enrollment_helper_->ClearAuth(base::Bind(&HostPairingScreen::OnAuthCleared, | 
| 189                                            weak_ptr_factory_.GetWeakPtr())); | 197                                            weak_ptr_factory_.GetWeakPtr())); | 
| 190   remora_controller_->OnEnrollmentStatusChanged( | 198   remora_controller_->OnEnrollmentStatusChanged( | 
| 191       HostPairingController::ENROLLMENT_STATUS_FAILURE); | 199       HostPairingController::ENROLLMENT_STATUS_FAILURE); | 
| 192 } | 200 } | 
| 193 | 201 | 
| 194 }  // namespace chromeos | 202 }  // namespace chromeos | 
| OLD | NEW | 
|---|