| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 } | 101 } |
| 102 } | 102 } |
| 103 | 103 |
| 104 if (!layout.empty()) { | 104 if (!layout.empty()) { |
| 105 PrefService* prefs = g_browser_process->local_state(); | 105 PrefService* prefs = g_browser_process->local_state(); |
| 106 prefs->SetString(prefs::kHardwareKeyboardLayout, layout); | 106 prefs->SetString(prefs::kHardwareKeyboardLayout, layout); |
| 107 // This asks the file thread to save the prefs (i.e. doesn't block). | 107 // This asks the file thread to save the prefs (i.e. doesn't block). |
| 108 // The latest values of Local State reside in memory so we can safely | 108 // The latest values of Local State reside in memory so we can safely |
| 109 // get the value of kHardwareKeyboardLayout even if the data is not | 109 // get the value of kHardwareKeyboardLayout even if the data is not |
| 110 // yet saved to disk. | 110 // yet saved to disk. |
| 111 prefs->SavePersistentPrefs(); | 111 prefs->CommitPendingWrite(); |
| 112 } | 112 } |
| 113 } | 113 } |
| 114 | 114 |
| 115 #if defined(USE_AURA) | 115 #if defined(USE_AURA) |
| 116 ui::Layer* GetLayer(views::Widget* widget) { | 116 ui::Layer* GetLayer(views::Widget* widget) { |
| 117 return widget->GetNativeView()->layer(); | 117 return widget->GetNativeView()->layer(); |
| 118 } | 118 } |
| 119 #endif | 119 #endif |
| 120 | 120 |
| 121 } // namespace | 121 } // namespace |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 // user has changed to during OOBE. | 477 // user has changed to during OOBE. |
| 478 if (!timezone_name.empty()) { | 478 if (!timezone_name.empty()) { |
| 479 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( | 479 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( |
| 480 icu::UnicodeString::fromUTF8(timezone_name)); | 480 icu::UnicodeString::fromUTF8(timezone_name)); |
| 481 CHECK(timezone) << "Timezone could not be set for " << timezone_name; | 481 CHECK(timezone) << "Timezone could not be set for " << timezone_name; |
| 482 chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone); | 482 chromeos::system::TimezoneSettings::GetInstance()->SetTimezone(*timezone); |
| 483 } | 483 } |
| 484 } | 484 } |
| 485 | 485 |
| 486 } // namespace browser | 486 } // namespace browser |
| OLD | NEW |