Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: chrome/browser/chromeos/login/startup_utils.h

Issue 1308833004: Show Goodies page to new Chromebook users (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change delegate from interface to implementation Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 TimeDelta;
16 }
17
14 namespace chromeos { 18 namespace chromeos {
15 19
16 // Static utility methods used at startup time to get/change bits of device 20 // Static utility methods used at startup time to get/change bits of device
17 // state. 21 // state.
18 class StartupUtils { 22 class StartupUtils {
19 public: 23 public:
20 // Returns true if EULA has been accepted. 24 // Returns true if EULA has been accepted.
21 static bool IsEulaAccepted(); 25 static bool IsEulaAccepted();
22 26
23 // Returns OOBE completion status. 27 // Returns OOBE completion status.
24 static bool IsOobeCompleted(); 28 static bool IsOobeCompleted();
25 29
26 // Marks EULA status as accepted. 30 // Marks EULA status as accepted.
27 static void MarkEulaAccepted(); 31 static void MarkEulaAccepted();
28 32
29 // Marks OOBE process as completed. 33 // Marks OOBE process as completed.
30 static void MarkOobeCompleted(); 34 static void MarkOobeCompleted();
31 35
32 // Stores the next pending OOBE screen in case it will need to be resumed. 36 // Stores the next pending OOBE screen in case it will need to be resumed.
33 static void SaveOobePendingScreen(const std::string& screen); 37 static void SaveOobePendingScreen(const std::string& screen);
34 38
39 // Returns the time since the Oobe flag file was created.
40 static base::TimeDelta GetTimeSinceOobeFlagFileCreation();
41
35 // Returns device registration completion status, i.e. second part of OOBE. 42 // Returns device registration completion status, i.e. second part of OOBE.
36 static bool IsDeviceRegistered(); 43 static bool IsDeviceRegistered();
37 44
38 // Marks device registered. i.e. second part of OOBE is completed. 45 // Marks device registered. i.e. second part of OOBE is completed.
39 static void MarkDeviceRegistered(const base::Closure& done_callback); 46 static void MarkDeviceRegistered(const base::Closure& done_callback);
40 47
41 // Mark a device as requiring enrollment recovery. 48 // Mark a device as requiring enrollment recovery.
42 static void MarkEnrollmentRecoveryRequired(); 49 static void MarkEnrollmentRecoveryRequired();
43 50
44 // Returns initial locale from local settings. 51 // Returns initial locale from local settings.
45 static std::string GetInitialLocale(); 52 static std::string GetInitialLocale();
46 53
47 // Sets initial locale in local settings. 54 // Sets initial locale in local settings.
48 static void SetInitialLocale(const std::string& locale); 55 static void SetInitialLocale(const std::string& locale);
49 56
50 // Returns true if webview based signin flow has been activated. 57 // Returns true if webview based signin flow has been activated.
51 static bool IsWebviewSigninEnabled(); 58 static bool IsWebviewSigninEnabled();
52 59
53 // Registers OOBE preferences. 60 // Registers OOBE preferences.
54 static void RegisterPrefs(PrefRegistrySimple* registry); 61 static void RegisterPrefs(PrefRegistrySimple* registry);
55 }; 62 };
56 63
57 } // namespace chromeos 64 } // namespace chromeos
58 65
59 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_STARTUP_UTILS_H_ 66 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_STARTUP_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698