| 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // Checks whether screen show time should be tracked with UMA. | 94 // Checks whether screen show time should be tracked with UMA. |
| 95 static bool IsOOBEStepToTrack(const std::string& screen_id); | 95 static bool IsOOBEStepToTrack(const std::string& screen_id); |
| 96 | 96 |
| 97 // Skips any screens that may normally be shown after login (registration, | 97 // Skips any screens that may normally be shown after login (registration, |
| 98 // Terms of Service, user image selection). | 98 // Terms of Service, user image selection). |
| 99 static void SkipPostLoginScreensForTesting(); | 99 static void SkipPostLoginScreensForTesting(); |
| 100 | 100 |
| 101 // Checks whether OOBE should start enrollment automatically. | 101 // Checks whether OOBE should start enrollment automatically. |
| 102 static bool ShouldAutoStartEnrollment(); | 102 static bool ShouldAutoStartEnrollment(); |
| 103 | 103 |
| 104 // Checks whether OOBE should recover enrollment. | 104 // Checks whether OOBE should recover enrollment. Note that this flips to |
| 105 // false once device policy has been restored as a part of recovery. |
| 105 static bool ShouldRecoverEnrollment(); | 106 static bool ShouldRecoverEnrollment(); |
| 106 | 107 |
| 108 // Obtains domain the device used to be enrolled to from install attributes. |
| 109 static std::string GetEnrollmentRecoveryDomain(); |
| 110 |
| 107 // Shows the first screen defined by |first_screen_name| or by default | 111 // Shows the first screen defined by |first_screen_name| or by default |
| 108 // if the parameter is empty. Takes ownership of |screen_parameters|. | 112 // if the parameter is empty. Takes ownership of |screen_parameters|. |
| 109 void Init(const std::string& first_screen_name, | 113 void Init(const std::string& first_screen_name, |
| 110 scoped_ptr<base::DictionaryValue> screen_parameters); | 114 scoped_ptr<base::DictionaryValue> screen_parameters); |
| 111 | 115 |
| 112 // Advances to screen defined by |screen_name| and shows it. | 116 // Advances to screen defined by |screen_name| and shows it. |
| 113 void AdvanceToScreen(const std::string& screen_name); | 117 void AdvanceToScreen(const std::string& screen_name); |
| 114 | 118 |
| 115 // Advances to login screen. Should be used in for testing only. | 119 // Advances to login screen. Should be used in for testing only. |
| 116 void SkipToLoginForTesting(const LoginScreenContext& context); | 120 void SkipToLoginForTesting(const LoginScreenContext& context); |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 OobeDisplay* oobe_display_; | 370 OobeDisplay* oobe_display_; |
| 367 | 371 |
| 368 // State of Usage stat/error reporting checkbox on EULA screen | 372 // State of Usage stat/error reporting checkbox on EULA screen |
| 369 // during wizard lifetime. | 373 // during wizard lifetime. |
| 370 bool usage_statistics_reporting_; | 374 bool usage_statistics_reporting_; |
| 371 | 375 |
| 372 // If true then update check is cancelled and enrollment is started after | 376 // If true then update check is cancelled and enrollment is started after |
| 373 // EULA is accepted. | 377 // EULA is accepted. |
| 374 bool skip_update_enroll_after_eula_; | 378 bool skip_update_enroll_after_eula_; |
| 375 | 379 |
| 380 // Whether enrollment will be or has been recovered in the current wizard |
| 381 // instance. |
| 382 bool enrollment_recovery_; |
| 383 |
| 376 // Time when the EULA was accepted. Used to measure the duration from the EULA | 384 // Time when the EULA was accepted. Used to measure the duration from the EULA |
| 377 // acceptance until the Sign-In screen is displayed. | 385 // acceptance until the Sign-In screen is displayed. |
| 378 base::Time time_eula_accepted_; | 386 base::Time time_eula_accepted_; |
| 379 | 387 |
| 380 // Time when OOBE was started. Used to measure the total time from boot to | 388 // Time when OOBE was started. Used to measure the total time from boot to |
| 381 // user Sign-In completed. | 389 // user Sign-In completed. |
| 382 base::Time time_oobe_started_; | 390 base::Time time_oobe_started_; |
| 383 | 391 |
| 384 ObserverList<Observer> observer_list_; | 392 ObserverList<Observer> observer_list_; |
| 385 | 393 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 412 base::Closure on_timezone_resolved_for_testing_; | 420 base::Closure on_timezone_resolved_for_testing_; |
| 413 | 421 |
| 414 base::WeakPtrFactory<WizardController> weak_factory_; | 422 base::WeakPtrFactory<WizardController> weak_factory_; |
| 415 | 423 |
| 416 DISALLOW_COPY_AND_ASSIGN(WizardController); | 424 DISALLOW_COPY_AND_ASSIGN(WizardController); |
| 417 }; | 425 }; |
| 418 | 426 |
| 419 } // namespace chromeos | 427 } // namespace chromeos |
| 420 | 428 |
| 421 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ | 429 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ |
| OLD | NEW |