| OLD | NEW |
| 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/enrollment/enrollment_screen.h" | 5 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 void EnrollmentScreen::OnCancel() { | 231 void EnrollmentScreen::OnCancel() { |
| 232 if (AdvanceToNextAuth()) { | 232 if (AdvanceToNextAuth()) { |
| 233 Show(); | 233 Show(); |
| 234 return; | 234 return; |
| 235 } | 235 } |
| 236 | 236 |
| 237 UMA(policy::kMetricEnrollmentCancelled); | 237 UMA(policy::kMetricEnrollmentCancelled); |
| 238 if (elapsed_timer_) | 238 if (elapsed_timer_) |
| 239 UMA_ENROLLMENT_TIME(kMetricEnrollmentTimeCancel, elapsed_timer_); | 239 UMA_ENROLLMENT_TIME(kMetricEnrollmentTimeCancel, elapsed_timer_); |
| 240 | 240 |
| 241 const BaseScreenDelegate::ExitCodes exit_code = | 241 const ScreenExitCode exit_code = |
| 242 config_.is_forced() ? BaseScreenDelegate::ENTERPRISE_ENROLLMENT_BACK | 242 config_.is_forced() ? ScreenExitCode::ENTERPRISE_ENROLLMENT_BACK |
| 243 : BaseScreenDelegate::ENTERPRISE_ENROLLMENT_COMPLETED; | 243 : ScreenExitCode::ENTERPRISE_ENROLLMENT_COMPLETED; |
| 244 ClearAuth( | 244 ClearAuth( |
| 245 base::Bind(&EnrollmentScreen::Finish, base::Unretained(this), exit_code)); | 245 base::Bind(&EnrollmentScreen::Finish, base::Unretained(this), exit_code)); |
| 246 } | 246 } |
| 247 | 247 |
| 248 void EnrollmentScreen::OnConfirmationClosed() { | 248 void EnrollmentScreen::OnConfirmationClosed() { |
| 249 ClearAuth(base::Bind(&EnrollmentScreen::Finish, base::Unretained(this), | 249 ClearAuth(base::Bind(&EnrollmentScreen::Finish, base::Unretained(this), |
| 250 BaseScreenDelegate::ENTERPRISE_ENROLLMENT_COMPLETED)); | 250 ScreenExitCode::ENTERPRISE_ENROLLMENT_COMPLETED)); |
| 251 } | 251 } |
| 252 | 252 |
| 253 void EnrollmentScreen::OnAdJoined(const std::string& realm) { | 253 void EnrollmentScreen::OnAdJoined(const std::string& realm) { |
| 254 std::move(on_joined_callback_).Run(realm); | 254 std::move(on_joined_callback_).Run(realm); |
| 255 } | 255 } |
| 256 | 256 |
| 257 void EnrollmentScreen::OnAuthError(const GoogleServiceAuthError& error) { | 257 void EnrollmentScreen::OnAuthError(const GoogleServiceAuthError& error) { |
| 258 RecordEnrollmentErrorMetrics(); | 258 RecordEnrollmentErrorMetrics(); |
| 259 view_->ShowAuthError(error); | 259 view_->ShowAuthError(error); |
| 260 } | 260 } |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 if (elapsed_timer_) | 380 if (elapsed_timer_) |
| 381 UMA_ENROLLMENT_TIME(kMetricEnrollmentTimeFailure, elapsed_timer_); | 381 UMA_ENROLLMENT_TIME(kMetricEnrollmentTimeFailure, elapsed_timer_); |
| 382 } | 382 } |
| 383 | 383 |
| 384 void EnrollmentScreen::JoinDomain(OnDomainJoinedCallback on_joined_callback) { | 384 void EnrollmentScreen::JoinDomain(OnDomainJoinedCallback on_joined_callback) { |
| 385 on_joined_callback_ = std::move(on_joined_callback); | 385 on_joined_callback_ = std::move(on_joined_callback); |
| 386 view_->ShowAdJoin(); | 386 view_->ShowAdJoin(); |
| 387 } | 387 } |
| 388 | 388 |
| 389 } // namespace chromeos | 389 } // namespace chromeos |
| OLD | NEW |