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 #include "chrome/browser/chromeos/login/startup_utils.h" | 5 #include "chrome/browser/chromeos/login/startup_utils.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/chromeos/chromeos_version.h" | 8 #include "base/chromeos/chromeos_version.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/prefs/pref_registry_simple.h" | 10 #include "base/prefs/pref_registry_simple.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 } | 55 } |
56 | 56 |
57 } // namespace | 57 } // namespace |
58 | 58 |
59 namespace chromeos { | 59 namespace chromeos { |
60 | 60 |
61 // static | 61 // static |
62 void StartupUtils::RegisterPrefs(PrefRegistrySimple* registry) { | 62 void StartupUtils::RegisterPrefs(PrefRegistrySimple* registry) { |
63 registry->RegisterBooleanPref(kOobeComplete, false); | 63 registry->RegisterBooleanPref(kOobeComplete, false); |
64 registry->RegisterIntegerPref(kDeviceRegistered, -1); | 64 registry->RegisterIntegerPref(kDeviceRegistered, -1); |
65 registry->RegisterBooleanPref(prefs::kEulaAccepted, false); | |
66 registry->RegisterStringPref(kInitialLocale, "en-US"); | 65 registry->RegisterStringPref(kInitialLocale, "en-US"); |
67 } | 66 } |
68 | 67 |
69 // static | 68 // static |
70 bool StartupUtils::IsEulaAccepted() { | 69 bool StartupUtils::IsEulaAccepted() { |
71 return g_browser_process->local_state()->GetBoolean(prefs::kEulaAccepted); | 70 return g_browser_process->local_state()->GetBoolean(prefs::kEulaAccepted); |
72 } | 71 } |
73 | 72 |
74 // static | 73 // static |
75 bool StartupUtils::IsOobeCompleted() { | 74 bool StartupUtils::IsOobeCompleted() { |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 159 |
161 // static | 160 // static |
162 void StartupUtils::SetInitialLocale(const std::string& locale) { | 161 void StartupUtils::SetInitialLocale(const std::string& locale) { |
163 if (l10n_util::IsValidLocaleSyntax(locale)) | 162 if (l10n_util::IsValidLocaleSyntax(locale)) |
164 SaveStringPreferenceForced(kInitialLocale, locale); | 163 SaveStringPreferenceForced(kInitialLocale, locale); |
165 else | 164 else |
166 NOTREACHED(); | 165 NOTREACHED(); |
167 } | 166 } |
168 | 167 |
169 } // namespace chromeos | 168 } // namespace chromeos |
OLD | NEW |