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/login_display_host_impl.h" | 5 #include "chrome/browser/chromeos/login/login_display_host_impl.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/audio/sounds.h" | 9 #include "ash/audio/sounds.h" |
10 #include "ash/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 chromeos::StartupCustomizationDocument::GetInstance(); | 1157 chromeos::StartupCustomizationDocument::GetInstance(); |
1158 | 1158 |
1159 // Switch to initial locale if specified by customization | 1159 // Switch to initial locale if specified by customization |
1160 // and has not been set yet. We cannot call | 1160 // and has not been set yet. We cannot call |
1161 // chromeos::LanguageSwitchMenu::SwitchLanguage here before | 1161 // chromeos::LanguageSwitchMenu::SwitchLanguage here before |
1162 // EmitLoginPromptReady. | 1162 // EmitLoginPromptReady. |
1163 PrefService* prefs = g_browser_process->local_state(); | 1163 PrefService* prefs = g_browser_process->local_state(); |
1164 const std::string current_locale = | 1164 const std::string current_locale = |
1165 prefs->GetString(prefs::kApplicationLocale); | 1165 prefs->GetString(prefs::kApplicationLocale); |
1166 VLOG(1) << "Current locale: " << current_locale; | 1166 VLOG(1) << "Current locale: " << current_locale; |
1167 std::string locale = startup_manifest->initial_locale(); | 1167 std::string locale = startup_manifest->initial_locale_default(); |
1168 | 1168 |
1169 if (!current_locale.empty() || locale.empty()) { | 1169 if (!current_locale.empty() || locale.empty()) { |
1170 ShowLoginWizardFinish(first_screen_name, startup_manifest, display_host); | 1170 ShowLoginWizardFinish(first_screen_name, startup_manifest, display_host); |
1171 return; | 1171 return; |
1172 } | 1172 } |
1173 | 1173 |
1174 std::string layout = startup_manifest->keyboard_layout(); | 1174 std::string layout = startup_manifest->keyboard_layout(); |
1175 VLOG(1) << "Initial locale: " << locale << "keyboard layout " << layout; | 1175 VLOG(1) << "Initial locale: " << locale << "keyboard layout " << layout; |
1176 | 1176 |
1177 // Save initial locale from VPD/customization manifest as current | 1177 // Save initial locale from VPD/customization manifest as current |
(...skipping 17 matching lines...) Expand all Loading... |
1195 | 1195 |
1196 scoped_ptr<locale_util::SwitchLanguageCallback> callback( | 1196 scoped_ptr<locale_util::SwitchLanguageCallback> callback( |
1197 new locale_util::SwitchLanguageCallback( | 1197 new locale_util::SwitchLanguageCallback( |
1198 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); | 1198 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); |
1199 | 1199 |
1200 // Do not load locale keyboards here. | 1200 // Do not load locale keyboards here. |
1201 locale_util::SwitchLanguage(locale, false, callback.Pass()); | 1201 locale_util::SwitchLanguage(locale, false, callback.Pass()); |
1202 } | 1202 } |
1203 | 1203 |
1204 } // namespace chromeos | 1204 } // namespace chromeos |
OLD | NEW |