Elim cr-checkbox
[chromium-blink-merge.git] / chrome / browser / chromeos / login / startup_utils.h
blob637c23e8bd517f6183c73c7c1f53b9fb324eb882
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_
8 #include <string>
10 #include "base/callback.h"
12 class PrefRegistrySimple;
14 namespace chromeos {
16 // Static utility methods used at startup time to get/change bits of device
17 // state.
18 class StartupUtils {
19 public:
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 webview based signin flow has been activated.
51 static bool IsWebviewSigninEnabled();
53 // Registers OOBE preferences.
54 static void RegisterPrefs(PrefRegistrySimple* registry);
57 } // namespace chromeos
59 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_STARTUP_UTILS_H_