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. 4 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_STARTUP_UTILS_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_STARTUP_UTILS_H_ 7 8 #include <string> 9 10 #include "base/callback.h" 11 12 class PrefRegistrySimple; 13 14 namespace chromeos { 15 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(); 22 23 // Returns OOBE completion status. 24 static bool IsOobeCompleted(); 25 26 // Marks EULA status as accepted. 27 static void MarkEulaAccepted(); 28 29 // Marks OOBE process as completed. 30 static void MarkOobeCompleted(); 31 32 // Stores the next pending OOBE screen in case it will need to be resumed. 33 static void SaveOobePendingScreen(const std::string& screen); 34 35 // Returns device registration completion status, i.e. second part of OOBE. 36 static bool IsDeviceRegistered(); 37 38 // Marks device registered. i.e. second part of OOBE is completed. 39 static void MarkDeviceRegistered(const base::Closure& done_callback); 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 47 // Returns initial locale from local settings. 48 static std::string GetInitialLocale(); 49 50 // Sets initial locale in local settings. 51 static void SetInitialLocale(const std::string& locale); 52 53 // Registers OOBE preferences. 54 static void RegisterPrefs(PrefRegistrySimple* registry); 55 }; 56 57 } // namespace chromeos 58 59 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_STARTUP_UTILS_H_ 60