Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: chrome/browser/chromeos/login/login_display_host_impl.cc

Issue 144363006: Expand VPD initial_locale to a list of locales. Use the expanded VPD initial_locale on the OOBE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: After-review. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/customization_document_unittest.cc ('k') | chrome/browser/resources/chromeos/login/oobe.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698