Chromium Code Reviews

Unified Diff: chrome/browser/chromeos/login/language_switch_menu.cc

Issue 3579011: Chrome OS: make language per user. (Closed)
Patch Set: spellfix Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: chrome/browser/chromeos/login/language_switch_menu.cc
diff --git a/chrome/browser/chromeos/login/language_switch_menu.cc b/chrome/browser/chromeos/login/language_switch_menu.cc
index 3d8bcbceb925c4cceb76ef3cdf9513c1e86041f1..c18d20da42d4925457a8c879dde0b1c298a28df1 100644
--- a/chrome/browser/chromeos/login/language_switch_menu.cc
+++ b/chrome/browser/chromeos/login/language_switch_menu.cc
@@ -78,8 +78,11 @@ void LanguageSwitchMenu::SetFirstLevelMenuWidth(int width) {
// static
void LanguageSwitchMenu::SwitchLanguage(const std::string& locale) {
- // Save new locale.
DCHECK(g_browser_process);
+ if (g_browser_process->GetApplicationLocale() == locale) {
+ return;
+ }
+ // Save new locale.
PrefService* prefs = g_browser_process->local_state();
// TODO(markusheintz): If the preference is managed and can not be changed by
// the user, changing the language should be disabled in the UI.
« no previous file with comments | « chrome/browser/chromeos/dom_ui/language_options_handler.cc ('k') | chrome/browser/chromeos/login/login_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine