| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 if (delegate_) | 139 if (delegate_) |
| 140 delegate_->AddNetworkRequested(onc_spec); | 140 delegate_->AddNetworkRequested(onc_spec); |
| 141 } | 141 } |
| 142 | 142 |
| 143 void HostPairingScreen::EnrollHostRequested(const std::string& auth_token) { | 143 void HostPairingScreen::EnrollHostRequested(const std::string& auth_token) { |
| 144 policy::EnrollmentConfig enrollment_config = | 144 policy::EnrollmentConfig enrollment_config = |
| 145 g_browser_process->platform_part() | 145 g_browser_process->platform_part() |
| 146 ->browser_policy_connector_chromeos() | 146 ->browser_policy_connector_chromeos() |
| 147 ->GetPrescribedEnrollmentConfig(); | 147 ->GetPrescribedEnrollmentConfig(); |
| 148 enrollment_helper_ = EnterpriseEnrollmentHelper::Create( | 148 enrollment_helper_ = EnterpriseEnrollmentHelper::Create( |
| 149 this, enrollment_config, std::string()); | 149 this, this, enrollment_config, std::string()); |
| 150 enrollment_helper_->EnrollUsingToken(auth_token); | 150 enrollment_helper_->EnrollUsingToken(auth_token); |
| 151 remora_controller_->OnEnrollmentStatusChanged( | 151 remora_controller_->OnEnrollmentStatusChanged( |
| 152 HostPairingController::ENROLLMENT_STATUS_ENROLLING); | 152 HostPairingController::ENROLLMENT_STATUS_ENROLLING); |
| 153 } | 153 } |
| 154 | 154 |
| 155 void HostPairingScreen::OnActorDestroyed(HostPairingScreenActor* actor) { | 155 void HostPairingScreen::OnActorDestroyed(HostPairingScreenActor* actor) { |
| 156 if (actor_ == actor) | 156 if (actor_ == actor) |
| 157 actor_ = NULL; | 157 actor_ = NULL; |
| 158 } | 158 } |
| 159 | 159 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 enrollment_helper_.reset(); | 193 enrollment_helper_.reset(); |
| 194 } | 194 } |
| 195 | 195 |
| 196 void HostPairingScreen::OnAnyEnrollmentError() { | 196 void HostPairingScreen::OnAnyEnrollmentError() { |
| 197 enrollment_helper_->ClearAuth(base::Bind(&HostPairingScreen::OnAuthCleared, | 197 enrollment_helper_->ClearAuth(base::Bind(&HostPairingScreen::OnAuthCleared, |
| 198 weak_ptr_factory_.GetWeakPtr())); | 198 weak_ptr_factory_.GetWeakPtr())); |
| 199 remora_controller_->OnEnrollmentStatusChanged( | 199 remora_controller_->OnEnrollmentStatusChanged( |
| 200 HostPairingController::ENROLLMENT_STATUS_FAILURE); | 200 HostPairingController::ENROLLMENT_STATUS_FAILURE); |
| 201 } | 201 } |
| 202 | 202 |
| 203 void HostPairingScreen::JoinDomain(OnDomainJoinedCallback on_joined_callback) { |
| 204 NOTREACHED(); |
| 205 } |
| 206 |
| 203 } // namespace chromeos | 207 } // namespace chromeos |
| OLD | NEW |