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/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 const char * const kMetricEnrollmentTimeSuccess = | 52 const char * const kMetricEnrollmentTimeSuccess = |
53 "Enterprise.EnrollmentTime.Success"; | 53 "Enterprise.EnrollmentTime.Success"; |
54 | 54 |
55 } // namespace | 55 } // namespace |
56 | 56 |
57 namespace chromeos { | 57 namespace chromeos { |
58 | 58 |
59 // static | 59 // static |
60 EnrollmentScreen* EnrollmentScreen::Get(ScreenManager* manager) { | 60 EnrollmentScreen* EnrollmentScreen::Get(ScreenManager* manager) { |
61 return static_cast<EnrollmentScreen*>( | 61 return static_cast<EnrollmentScreen*>( |
62 manager->GetScreen(WizardController::kEnrollmentScreenName)); | 62 manager->GetScreen(OobeScreen::SCREEN_OOBE_ENROLLMENT)); |
63 } | 63 } |
64 | 64 |
65 EnrollmentScreen::EnrollmentScreen(BaseScreenDelegate* base_screen_delegate, | 65 EnrollmentScreen::EnrollmentScreen(BaseScreenDelegate* base_screen_delegate, |
66 EnrollmentScreenActor* actor) | 66 EnrollmentScreenActor* actor) |
67 : BaseScreen(base_screen_delegate, WizardController::kEnrollmentScreenName), | 67 : BaseScreen(base_screen_delegate, OobeScreen::SCREEN_OOBE_ENROLLMENT), |
68 actor_(actor), | 68 actor_(actor), |
69 weak_ptr_factory_(this) {} | 69 weak_ptr_factory_(this) {} |
70 | 70 |
71 EnrollmentScreen::~EnrollmentScreen() { | 71 EnrollmentScreen::~EnrollmentScreen() { |
72 DCHECK(!enrollment_helper_ || g_browser_process->IsShuttingDown()); | 72 DCHECK(!enrollment_helper_ || g_browser_process->IsShuttingDown()); |
73 } | 73 } |
74 | 74 |
75 void EnrollmentScreen::SetParameters( | 75 void EnrollmentScreen::SetParameters( |
76 const policy::EnrollmentConfig& enrollment_config, | 76 const policy::EnrollmentConfig& enrollment_config, |
77 pairing_chromeos::ControllerPairingController* shark_controller) { | 77 pairing_chromeos::ControllerPairingController* shark_controller) { |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 } | 339 } |
340 | 340 |
341 void EnrollmentScreen::RecordEnrollmentErrorMetrics() { | 341 void EnrollmentScreen::RecordEnrollmentErrorMetrics() { |
342 enrollment_failed_once_ = true; | 342 enrollment_failed_once_ = true; |
343 // TODO(drcrash): Maybe create multiple metrics (http://crbug.com/640313)? | 343 // TODO(drcrash): Maybe create multiple metrics (http://crbug.com/640313)? |
344 if (elapsed_timer_) | 344 if (elapsed_timer_) |
345 UMA_ENROLLMENT_TIME(kMetricEnrollmentTimeFailure, elapsed_timer_); | 345 UMA_ENROLLMENT_TIME(kMetricEnrollmentTimeFailure, elapsed_timer_); |
346 } | 346 } |
347 | 347 |
348 } // namespace chromeos | 348 } // namespace chromeos |
OLD | NEW |