| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/base_login_display_host.h" | 5 #include "chrome/browser/chromeos/login/base_login_display_host.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/threading/thread_restrictions.h" | 10 #include "base/threading/thread_restrictions.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 } | 74 } |
| 75 } | 75 } |
| 76 | 76 |
| 77 if (!layout.empty()) { | 77 if (!layout.empty()) { |
| 78 PrefService* prefs = g_browser_process->local_state(); | 78 PrefService* prefs = g_browser_process->local_state(); |
| 79 prefs->SetString(prefs::kHardwareKeyboardLayout, layout); | 79 prefs->SetString(prefs::kHardwareKeyboardLayout, layout); |
| 80 // This asks the file thread to save the prefs (i.e. doesn't block). | 80 // This asks the file thread to save the prefs (i.e. doesn't block). |
| 81 // The latest values of Local State reside in memory so we can safely | 81 // The latest values of Local State reside in memory so we can safely |
| 82 // get the value of kHardwareKeyboardLayout even if the data is not | 82 // get the value of kHardwareKeyboardLayout even if the data is not |
| 83 // yet saved to disk. | 83 // yet saved to disk. |
| 84 prefs->SavePersistentPrefs(); | 84 prefs->CommitPendingWrite(); |
| 85 } | 85 } |
| 86 } | 86 } |
| 87 | 87 |
| 88 } // namespace | 88 } // namespace |
| 89 | 89 |
| 90 namespace chromeos { | 90 namespace chromeos { |
| 91 | 91 |
| 92 // static | 92 // static |
| 93 LoginDisplayHost* BaseLoginDisplayHost::default_host_ = NULL; | 93 LoginDisplayHost* BaseLoginDisplayHost::default_host_ = NULL; |
| 94 | 94 |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 // user has changed to during OOBE. | 350 // user has changed to during OOBE. |
| 351 if (!timezone_name.empty()) { | 351 if (!timezone_name.empty()) { |
| 352 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( | 352 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( |
| 353 icu::UnicodeString::fromUTF8(timezone_name)); | 353 icu::UnicodeString::fromUTF8(timezone_name)); |
| 354 CHECK(timezone) << "Timezone could not be set for " << timezone_name; | 354 CHECK(timezone) << "Timezone could not be set for " << timezone_name; |
| 355 chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone); | 355 chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone); |
| 356 } | 356 } |
| 357 } | 357 } |
| 358 | 358 |
| 359 } // namespace browser | 359 } // namespace browser |
| OLD | NEW |