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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
180 } | 180 } |
181 | 181 |
182 void HostPairingScreen::OnAuthError(const GoogleServiceAuthError& error) { | 182 void HostPairingScreen::OnAuthError(const GoogleServiceAuthError& error) { |
183 enrollment_error_string_ = view_->GetErrorStringFromAuthError(error); | 183 enrollment_error_string_ = view_->GetErrorStringFromAuthError(error); |
184 enrollment_error_code_ = | 184 enrollment_error_code_ = |
185 GetEnrollmentErrorCode(HostPairingController::ErrorCode::AUTH_ERROR, | 185 GetEnrollmentErrorCode(HostPairingController::ErrorCode::AUTH_ERROR, |
186 static_cast<int>(error.state())); | 186 static_cast<int>(error.state())); |
187 OnAnyEnrollmentError(); | 187 OnAnyEnrollmentError(); |
188 } | 188 } |
189 | 189 |
190 void HostPairingScreen::OnMultipleLicensesAvailable( | |
191 const EnrollmentLicenseMap& licenses) { | |
192 LOG(ERROR) << "Host-paired enrollment is not yet compatible " | |
emaxx
2017/07/21 12:57:29
nit: #include "base/logging.h"
emaxx
2017/07/21 12:57:29
nit: Is this a TODO, or should a separate bug be f
Denis Kuznetsov (DE-MUC)
2017/07/25 21:51:05
This is an outdated branch. It was a plan that use
| |
193 << "with Mixed Licenses Enrollment Flow"; | |
194 enrollment_error_string_ = view_->GetErrorStringFromOtherError( | |
195 EnterpriseEnrollmentHelper::OTHER_ERROR_FATAL); | |
196 enrollment_error_code_ = GetEnrollmentErrorCode( | |
197 HostPairingController::ErrorCode::OTHER_ERROR, | |
198 static_cast<int>(EnterpriseEnrollmentHelper::OTHER_ERROR_FATAL)); | |
199 OnAnyEnrollmentError(); | |
200 } | |
201 | |
190 void HostPairingScreen::OnEnrollmentError(policy::EnrollmentStatus status) { | 202 void HostPairingScreen::OnEnrollmentError(policy::EnrollmentStatus status) { |
191 enrollment_error_string_ = view_->GetErrorStringFromEnrollmentError(status); | 203 enrollment_error_string_ = view_->GetErrorStringFromEnrollmentError(status); |
192 enrollment_error_code_ = | 204 enrollment_error_code_ = |
193 GetEnrollmentErrorCode(HostPairingController::ErrorCode::ENROLL_ERROR, | 205 GetEnrollmentErrorCode(HostPairingController::ErrorCode::ENROLL_ERROR, |
194 static_cast<int>(status.status())); | 206 static_cast<int>(status.status())); |
195 OnAnyEnrollmentError(); | 207 OnAnyEnrollmentError(); |
196 } | 208 } |
197 | 209 |
198 void HostPairingScreen::OnOtherError( | 210 void HostPairingScreen::OnOtherError( |
199 EnterpriseEnrollmentHelper::OtherError error) { | 211 EnterpriseEnrollmentHelper::OtherError error) { |
(...skipping 29 matching lines...) Expand all Loading... | |
229 void HostPairingScreen::OnAnyEnrollmentError() { | 241 void HostPairingScreen::OnAnyEnrollmentError() { |
230 enrollment_helper_->ClearAuth(base::Bind(&HostPairingScreen::OnAuthCleared, | 242 enrollment_helper_->ClearAuth(base::Bind(&HostPairingScreen::OnAuthCleared, |
231 weak_ptr_factory_.GetWeakPtr())); | 243 weak_ptr_factory_.GetWeakPtr())); |
232 remora_controller_->SetErrorCodeAndMessage(enrollment_error_code_, | 244 remora_controller_->SetErrorCodeAndMessage(enrollment_error_code_, |
233 enrollment_error_string_); | 245 enrollment_error_string_); |
234 remora_controller_->OnEnrollmentStatusChanged( | 246 remora_controller_->OnEnrollmentStatusChanged( |
235 HostPairingController::ENROLLMENT_STATUS_FAILURE); | 247 HostPairingController::ENROLLMENT_STATUS_FAILURE); |
236 } | 248 } |
237 | 249 |
238 } // namespace chromeos | 250 } // namespace chromeos |
OLD | NEW |