| 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/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| 11 #include "base/prefs/pref_registry_simple.h" | |
| 12 #include "base/prefs/pref_service.h" | |
| 13 #include "base/sys_info.h" | 11 #include "base/sys_info.h" |
| 14 #include "base/threading/thread_restrictions.h" | 12 #include "base/threading/thread_restrictions.h" |
| 15 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
| 16 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 14 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 17 #include "chrome/common/chrome_paths.h" | 15 #include "chrome/common/chrome_paths.h" |
| 18 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
| 19 #include "chromeos/chromeos_switches.h" | 17 #include "chromeos/chromeos_switches.h" |
| 18 #include "components/prefs/pref_registry_simple.h" |
| 19 #include "components/prefs/pref_service.h" |
| 20 #include "components/web_resource/web_resource_pref_names.h" | 20 #include "components/web_resource/web_resource_pref_names.h" |
| 21 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
| 22 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
| 23 | 23 |
| 24 using content::BrowserThread; | 24 using content::BrowserThread; |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 // Saves boolean "Local State" preference and forces its persistence to disk. | 28 // Saves boolean "Local State" preference and forces its persistence to disk. |
| 29 void SaveBoolPreferenceForced(const char* pref_name, bool value) { | 29 void SaveBoolPreferenceForced(const char* pref_name, bool value) { |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 | 192 |
| 193 // static | 193 // static |
| 194 void StartupUtils::SetInitialLocale(const std::string& locale) { | 194 void StartupUtils::SetInitialLocale(const std::string& locale) { |
| 195 if (l10n_util::IsValidLocaleSyntax(locale)) | 195 if (l10n_util::IsValidLocaleSyntax(locale)) |
| 196 SaveStringPreferenceForced(prefs::kInitialLocale, locale); | 196 SaveStringPreferenceForced(prefs::kInitialLocale, locale); |
| 197 else | 197 else |
| 198 NOTREACHED(); | 198 NOTREACHED(); |
| 199 } | 199 } |
| 200 | 200 |
| 201 } // namespace chromeos | 201 } // namespace chromeos |
| OLD | NEW |