Chromium Code Reviews| 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 base { | |
| 15 class FilePath; | |
| 16 class TimeDelta; | |
| 17 } | |
| 18 | |
| 14 namespace chromeos { | 19 namespace chromeos { |
| 15 | 20 |
| 16 // Static utility methods used at startup time to get/change bits of device | 21 // Static utility methods used at startup time to get/change bits of device |
| 17 // state. | 22 // state. |
| 18 class StartupUtils { | 23 class StartupUtils { |
| 19 public: | 24 public: |
| 20 // Returns true if EULA has been accepted. | 25 // Returns true if EULA has been accepted. |
| 21 static bool IsEulaAccepted(); | 26 static bool IsEulaAccepted(); |
| 22 | 27 |
| 23 // Returns OOBE completion status. | 28 // Returns OOBE completion status. |
| 24 static bool IsOobeCompleted(); | 29 static bool IsOobeCompleted(); |
| 25 | 30 |
| 26 // Marks EULA status as accepted. | 31 // Marks EULA status as accepted. |
| 27 static void MarkEulaAccepted(); | 32 static void MarkEulaAccepted(); |
| 28 | 33 |
| 29 // Marks OOBE process as completed. | 34 // Marks OOBE process as completed. |
| 30 static void MarkOobeCompleted(); | 35 static void MarkOobeCompleted(); |
| 31 | 36 |
| 32 // Stores the next pending OOBE screen in case it will need to be resumed. | 37 // Stores the next pending OOBE screen in case it will need to be resumed. |
| 33 static void SaveOobePendingScreen(const std::string& screen); | 38 static void SaveOobePendingScreen(const std::string& screen); |
| 34 | 39 |
| 40 // Path to flag file indicating oobe completion. | |
| 41 static base::FilePath GetOobeCompleteFlagPath(); | |
|
achuithb
2015/09/18 16:39:11
Don't need this any more, right?
Greg Levin
2015/09/18 18:49:28
Done.
| |
| 42 | |
| 43 // Returns the time since the Oobe flag file was created. | |
| 44 static base::TimeDelta GetTimeSinceOobeFileCreation(); | |
| 45 | |
| 35 // Returns device registration completion status, i.e. second part of OOBE. | 46 // Returns device registration completion status, i.e. second part of OOBE. |
| 36 static bool IsDeviceRegistered(); | 47 static bool IsDeviceRegistered(); |
| 37 | 48 |
| 38 // Marks device registered. i.e. second part of OOBE is completed. | 49 // Marks device registered. i.e. second part of OOBE is completed. |
| 39 static void MarkDeviceRegistered(const base::Closure& done_callback); | 50 static void MarkDeviceRegistered(const base::Closure& done_callback); |
| 40 | 51 |
| 41 // Mark a device as requiring enrollment recovery. | 52 // Mark a device as requiring enrollment recovery. |
| 42 static void MarkEnrollmentRecoveryRequired(); | 53 static void MarkEnrollmentRecoveryRequired(); |
| 43 | 54 |
| 44 // Returns initial locale from local settings. | 55 // Returns initial locale from local settings. |
| 45 static std::string GetInitialLocale(); | 56 static std::string GetInitialLocale(); |
| 46 | 57 |
| 47 // Sets initial locale in local settings. | 58 // Sets initial locale in local settings. |
| 48 static void SetInitialLocale(const std::string& locale); | 59 static void SetInitialLocale(const std::string& locale); |
| 49 | 60 |
| 50 // Returns true if webview based signin flow has been activated. | 61 // Returns true if webview based signin flow has been activated. |
| 51 static bool IsWebviewSigninEnabled(); | 62 static bool IsWebviewSigninEnabled(); |
| 52 | 63 |
| 53 // Registers OOBE preferences. | 64 // Registers OOBE preferences. |
| 54 static void RegisterPrefs(PrefRegistrySimple* registry); | 65 static void RegisterPrefs(PrefRegistrySimple* registry); |
| 55 }; | 66 }; |
| 56 | 67 |
| 57 } // namespace chromeos | 68 } // namespace chromeos |
| 58 | 69 |
| 59 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_STARTUP_UTILS_H_ | 70 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_STARTUP_UTILS_H_ |
| OLD | NEW |