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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_STARTUP_UTILS_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_STARTUP_UTILS_H_
10 #include "base/callback.h"
12 class PrefRegistrySimple
;
16 // Static utility methods used at startup time to get/change bits of device
20 // Returns true if EULA has been accepted.
21 static bool IsEulaAccepted();
23 // Returns OOBE completion status.
24 static bool IsOobeCompleted();
26 // Marks EULA status as accepted.
27 static void MarkEulaAccepted();
29 // Marks OOBE process as completed.
30 static void MarkOobeCompleted();
32 // Stores the next pending OOBE screen in case it will need to be resumed.
33 static void SaveOobePendingScreen(const std::string
& screen
);
35 // Returns device registration completion status, i.e. second part of OOBE.
36 static bool IsDeviceRegistered();
38 // Marks device registered. i.e. second part of OOBE is completed.
39 static void MarkDeviceRegistered(const base::Closure
& done_callback
);
41 // Mark a device as requiring enrollment recovery.
42 static void MarkEnrollmentRecoveryRequired();
44 // Returns initial locale from local settings.
45 static std::string
GetInitialLocale();
47 // Sets initial locale in local settings.
48 static void SetInitialLocale(const std::string
& locale
);
50 // Returns true if it is allowed to activate the new version of OOBE.
51 static bool IsNewOobeAllowed();
53 // Returns true if the new version of OOBE has been activated.
54 static bool IsNewOobeActivated();
56 // Returns true if it is allowed to activate webview based signin flow.
57 static bool IsWebviewSigninAllowed();
59 // Returns true if webview based signin flow has been activated.
60 static bool IsWebviewSigninEnabled();
62 // Set enabled state for webview based signin flow if allowed. Returns true if
63 // it is allowed to activate webview based signin flow.
64 static bool EnableWebviewSignin(bool is_enabled
);
66 // Registers OOBE preferences.
67 static void RegisterPrefs(PrefRegistrySimple
* registry
);
70 } // namespace chromeos
72 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_STARTUP_UTILS_H_