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_STARTUP_UTILS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_STARTUP_UTILS_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_STARTUP_UTILS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_STARTUP_UTILS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 | 11 |
12 class PrefRegistrySimple; | 12 class PrefRegistrySimple; |
13 | 13 |
14 namespace chromeos { | 14 namespace chromeos { |
15 | 15 |
16 // Static utitliy methods used in startup time to get/change bits of device | 16 // Static utility methods used at startup time to get/change bits of device |
17 // state. | 17 // state. |
18 class StartupUtils { | 18 class StartupUtils { |
19 public: | 19 public: |
20 // Returns true if EULA has been accepted. | 20 // Returns true if EULA has been accepted. |
21 static bool IsEulaAccepted(); | 21 static bool IsEulaAccepted(); |
22 | 22 |
23 // Returns OOBE completion status. | 23 // Returns OOBE completion status. |
24 static bool IsOobeCompleted(); | 24 static bool IsOobeCompleted(); |
25 | 25 |
26 // Marks EULA status as accepted. | 26 // Marks EULA status as accepted. |
27 static void MarkEulaAccepted(); | 27 static void MarkEulaAccepted(); |
28 | 28 |
29 // Marks OOBE process as completed. | 29 // Marks OOBE process as completed. |
30 static void MarkOobeCompleted(); | 30 static void MarkOobeCompleted(); |
31 | 31 |
32 // Stores the next pending OOBE screen in case it will need to be resumed. | 32 // Stores the next pending OOBE screen in case it will need to be resumed. |
33 static void SaveOobePendingScreen(const std::string& screen); | 33 static void SaveOobePendingScreen(const std::string& screen); |
34 | 34 |
35 // Returns device registration completion status, i.e. second part of OOBE. | 35 // Returns device registration completion status, i.e. second part of OOBE. |
36 static bool IsDeviceRegistered(); | 36 static bool IsDeviceRegistered(); |
37 | 37 |
38 // Marks device registered. i.e. second part of OOBE is completed. | 38 // Marks device registered. i.e. second part of OOBE is completed. |
39 static void MarkDeviceRegistered(const base::Closure& done_callback); | 39 static void MarkDeviceRegistered(const base::Closure& done_callback); |
40 | 40 |
| 41 // Returns whether enrollment recovery is required. |
| 42 static bool IsEnrollmentRecoveryRequired(); |
| 43 |
| 44 // Mark a device as requiring enrollment recovery. |
| 45 static void MarkEnrollmentRecoveryRequired(); |
| 46 |
41 // Returns initial locale from local settings. | 47 // Returns initial locale from local settings. |
42 static std::string GetInitialLocale(); | 48 static std::string GetInitialLocale(); |
43 | 49 |
44 // Sets initial locale in local settings. | 50 // Sets initial locale in local settings. |
45 static void SetInitialLocale(const std::string& locale); | 51 static void SetInitialLocale(const std::string& locale); |
46 | 52 |
47 // Registers OOBE preferences. | 53 // Registers OOBE preferences. |
48 static void RegisterPrefs(PrefRegistrySimple* registry); | 54 static void RegisterPrefs(PrefRegistrySimple* registry); |
49 }; | 55 }; |
50 | 56 |
51 } // namespace chromeos | 57 } // namespace chromeos |
52 | 58 |
53 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_STARTUP_UTILS_H_ | 59 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_STARTUP_UTILS_H_ |
OLD | NEW |