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/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 static WizardController* default_controller() { | 61 static WizardController* default_controller() { |
62 return default_controller_; | 62 return default_controller_; |
63 } | 63 } |
64 | 64 |
65 // Whether to skip any screens that may normally be shown after login | 65 // Whether to skip any screens that may normally be shown after login |
66 // (registration, Terms of Service, user image selection). | 66 // (registration, Terms of Service, user image selection). |
67 static bool skip_post_login_screens() { | 67 static bool skip_post_login_screens() { |
68 return skip_post_login_screens_; | 68 return skip_post_login_screens_; |
69 } | 69 } |
70 | 70 |
71 // Returns true if EULA has been accepted. | |
72 static bool IsEulaAccepted(); | |
73 | |
74 // Returns OOBE completion status. | |
75 static bool IsOobeCompleted(); | |
76 | |
77 // Marks EULA status as accepted. | |
78 static void MarkEulaAccepted(); | |
79 | |
80 // Marks OOBE process as completed. | |
81 static void MarkOobeCompleted(); | |
82 | |
83 // Returns device registration completion status, i.e. second part of OOBE. | |
84 static bool IsDeviceRegistered(); | |
85 | |
86 // Marks device registered. i.e. second part of OOBE is completed. | |
87 static void MarkDeviceRegistered(); | |
88 | |
89 // Returns initial locale from local settings. | |
90 static std::string GetInitialLocale(); | |
91 | |
92 // Sets delays to zero. MUST be used only for tests. | 71 // Sets delays to zero. MUST be used only for tests. |
93 static void SetZeroDelays(); | 72 static void SetZeroDelays(); |
94 | 73 |
95 // If true zero delays have been enabled (for browser tests). | 74 // If true zero delays have been enabled (for browser tests). |
96 static bool IsZeroDelayEnabled(); | 75 static bool IsZeroDelayEnabled(); |
97 | 76 |
98 // Sets initial locale in local settings. | |
99 static void SetInitialLocale(const std::string& locale); | |
100 | |
101 // Registers OOBE preferences. | |
102 static void RegisterPrefs(PrefRegistrySimple* registry); | |
103 | |
104 // Skips any screens that may normally be shown after login (registration, | 77 // Skips any screens that may normally be shown after login (registration, |
105 // Terms of Service, user image selection). | 78 // Terms of Service, user image selection). |
106 static void SkipPostLoginScreensForTesting(); | 79 static void SkipPostLoginScreensForTesting(); |
107 | 80 |
108 // Shows the first screen defined by |first_screen_name| or by default | 81 // Shows the first screen defined by |first_screen_name| or by default |
109 // if the parameter is empty. Takes ownership of |screen_parameters|. | 82 // if the parameter is empty. Takes ownership of |screen_parameters|. |
110 void Init(const std::string& first_screen_name, | 83 void Init(const std::string& first_screen_name, |
111 base::DictionaryValue* screen_parameters); | 84 base::DictionaryValue* screen_parameters); |
112 | 85 |
113 // Advances to screen defined by |screen_name| and shows it. | 86 // Advances to screen defined by |screen_name| and shows it. |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, Accelerators); | 291 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, Accelerators); |
319 friend class WizardControllerFlowTest; | 292 friend class WizardControllerFlowTest; |
320 friend class WizardInProcessBrowserTest; | 293 friend class WizardInProcessBrowserTest; |
321 | 294 |
322 DISALLOW_COPY_AND_ASSIGN(WizardController); | 295 DISALLOW_COPY_AND_ASSIGN(WizardController); |
323 }; | 296 }; |
324 | 297 |
325 } // namespace chromeos | 298 } // namespace chromeos |
326 | 299 |
327 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ | 300 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ |
OLD | NEW |