| 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/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 EnrollmentScreenActor::EnrollmentMode enrollment_mode, | 66 EnrollmentScreenActor::EnrollmentMode enrollment_mode, |
| 67 const std::string& management_domain, | 67 const std::string& management_domain, |
| 68 const std::string& user, | 68 const std::string& user, |
| 69 const std::string& auth_token, | 69 const std::string& auth_token, |
| 70 pairing_chromeos::ControllerPairingController* shark_controller, | 70 pairing_chromeos::ControllerPairingController* shark_controller, |
| 71 pairing_chromeos::HostPairingController* remora_controller) { | 71 pairing_chromeos::HostPairingController* remora_controller) { |
| 72 enrollment_mode_ = enrollment_mode; | 72 enrollment_mode_ = enrollment_mode; |
| 73 user_ = user.empty() ? user : gaia::CanonicalizeEmail(user); | 73 user_ = user.empty() ? user : gaia::CanonicalizeEmail(user); |
| 74 auth_token_ = auth_token; | 74 auth_token_ = auth_token; |
| 75 shark_controller_ = shark_controller; | 75 shark_controller_ = shark_controller; |
| 76 DCHECK(!remora_controller_); | 76 if (remora_controller_) |
| 77 remora_controller_->RemoveObserver(this); |
| 77 remora_controller_ = remora_controller; | 78 remora_controller_ = remora_controller; |
| 78 if (remora_controller_) | 79 if (remora_controller_) |
| 79 remora_controller_->AddObserver(this); | 80 remora_controller_->AddObserver(this); |
| 80 actor_->SetParameters(this, enrollment_mode_, management_domain); | 81 actor_->SetParameters(this, enrollment_mode_, management_domain); |
| 81 } | 82 } |
| 82 | 83 |
| 83 void EnrollmentScreen::PrepareToShow() { | 84 void EnrollmentScreen::PrepareToShow() { |
| 84 actor_->PrepareToShow(); | 85 actor_->PrepareToShow(); |
| 85 } | 86 } |
| 86 | 87 |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 sample = policy::kMetricEnrollmentAutoFailed; | 393 sample = policy::kMetricEnrollmentAutoFailed; |
| 393 UMA(sample); | 394 UMA(sample); |
| 394 } | 395 } |
| 395 | 396 |
| 396 void EnrollmentScreen::ShowSigninScreen() { | 397 void EnrollmentScreen::ShowSigninScreen() { |
| 397 actor_->Show(); | 398 actor_->Show(); |
| 398 actor_->ShowSigninScreen(); | 399 actor_->ShowSigninScreen(); |
| 399 } | 400 } |
| 400 | 401 |
| 401 } // namespace chromeos | 402 } // namespace chromeos |
| OLD | NEW |