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 11 matching lines...) Expand all Loading... |
22 #include "chromeos/dbus/cryptohome_client.h" | 22 #include "chromeos/dbus/cryptohome_client.h" |
23 #include "chromeos/dbus/dbus_method_call_status.h" | 23 #include "chromeos/dbus/dbus_method_call_status.h" |
24 #include "chromeos/dbus/dbus_thread_manager.h" | 24 #include "chromeos/dbus/dbus_thread_manager.h" |
25 #include "chromeos/dbus/session_manager_client.h" | 25 #include "chromeos/dbus/session_manager_client.h" |
26 #include "google_apis/gaia/gaia_auth_util.h" | 26 #include "google_apis/gaia/gaia_auth_util.h" |
27 #include "google_apis/gaia/google_service_auth_error.h" | 27 #include "google_apis/gaia/google_service_auth_error.h" |
28 #include "policy/proto/device_management_backend.pb.h" | 28 #include "policy/proto/device_management_backend.pb.h" |
29 | 29 |
30 namespace chromeos { | 30 namespace chromeos { |
31 | 31 |
| 32 // static |
| 33 EnrollmentScreen* EnrollmentScreen::Get(ScreenManager* manager) { |
| 34 return static_cast<EnrollmentScreen*>( |
| 35 manager->GetScreen(WizardController::kEnrollmentScreenName)); |
| 36 } |
| 37 |
32 EnrollmentScreen::EnrollmentScreen( | 38 EnrollmentScreen::EnrollmentScreen( |
33 ScreenObserver* observer, | 39 ScreenObserver* observer, |
34 EnrollmentScreenActor* actor) | 40 EnrollmentScreenActor* actor) |
35 : WizardScreen(observer), | 41 : WizardScreen(observer), |
36 actor_(actor), | 42 actor_(actor), |
37 enrollment_mode_(EnrollmentScreenActor::ENROLLMENT_MODE_MANUAL), | 43 enrollment_mode_(EnrollmentScreenActor::ENROLLMENT_MODE_MANUAL), |
38 enrollment_failed_once_(false), | 44 enrollment_failed_once_(false), |
39 remora_token_sent_(false), | 45 remora_token_sent_(false), |
40 lockbox_init_duration_(0), | 46 lockbox_init_duration_(0), |
41 weak_ptr_factory_(this) { | 47 weak_ptr_factory_(this) { |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 sample = policy::kMetricEnrollmentAutoFailed; | 358 sample = policy::kMetricEnrollmentAutoFailed; |
353 UMA(sample); | 359 UMA(sample); |
354 } | 360 } |
355 | 361 |
356 void EnrollmentScreen::ShowSigninScreen() { | 362 void EnrollmentScreen::ShowSigninScreen() { |
357 actor_->Show(); | 363 actor_->Show(); |
358 actor_->ShowSigninScreen(); | 364 actor_->ShowSigninScreen(); |
359 } | 365 } |
360 | 366 |
361 } // namespace chromeos | 367 } // namespace chromeos |
OLD | NEW |