| 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 class PrefRegistrySimple; | 10 class PrefRegistrySimple; |
| 11 | 11 |
| 12 namespace chromeos { | 12 namespace chromeos { |
| 13 | 13 |
| 14 // Static utitliy methods used in startup time to get/change bits of device | 14 // Static utitliy methods used in startup time to get/change bits of device |
| 15 // state. | 15 // state. |
| 16 class StartupUtils { | 16 class StartupUtils { |
| 17 public: | 17 public: |
| 18 // Returns true if EULA has been accepted. | 18 // Returns true if EULA has been accepted. |
| 19 static bool IsEulaAccepted(); | 19 static bool IsEulaAccepted(); |
| 20 | 20 |
| 21 // Returns OOBE completion status. | 21 // Returns OOBE completion status. |
| 22 static bool IsOobeCompleted(); | 22 static bool IsOobeCompleted(); |
| 23 | 23 |
| 24 // Marks EULA status as accepted. | 24 // Marks EULA status as accepted. |
| 25 static void MarkEulaAccepted(); | 25 static void MarkEulaAccepted(); |
| 26 | 26 |
| 27 // Marks OOBE process as completed. | 27 // Marks OOBE process as completed. |
| 28 static void MarkOobeCompleted(); | 28 static void MarkOobeCompleted(); |
| 29 | 29 |
| 30 // Stores the next pending OOBE stage in case it will need to be resumed. |
| 31 static void SaveOobePendingStage(const std::string& stage); |
| 32 |
| 30 // Returns device registration completion status, i.e. second part of OOBE. | 33 // Returns device registration completion status, i.e. second part of OOBE. |
| 31 static bool IsDeviceRegistered(); | 34 static bool IsDeviceRegistered(); |
| 32 | 35 |
| 33 // Marks device registered. i.e. second part of OOBE is completed. | 36 // Marks device registered. i.e. second part of OOBE is completed. |
| 34 static void MarkDeviceRegistered(); | 37 static void MarkDeviceRegistered(); |
| 35 | 38 |
| 36 // Returns initial locale from local settings. | 39 // Returns initial locale from local settings. |
| 37 static std::string GetInitialLocale(); | 40 static std::string GetInitialLocale(); |
| 38 | 41 |
| 39 // Sets initial locale in local settings. | 42 // Sets initial locale in local settings. |
| 40 static void SetInitialLocale(const std::string& locale); | 43 static void SetInitialLocale(const std::string& locale); |
| 41 | 44 |
| 42 // Registers OOBE preferences. | 45 // Registers OOBE preferences. |
| 43 static void RegisterPrefs(PrefRegistrySimple* registry); | 46 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 44 }; | 47 }; |
| 45 | 48 |
| 46 } // namespace chromeos | 49 } // namespace chromeos |
| 47 | 50 |
| 48 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_STARTUP_UTILS_H_ | 51 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_STARTUP_UTILS_H_ |
| OLD | NEW |