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

Unified Diff: chrome/browser/chromeos/dom_ui/language_options_handler.cc

Issue 5976005: show notification on locale change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/dom_ui/language_options_handler.cc
diff --git a/chrome/browser/chromeos/dom_ui/language_options_handler.cc b/chrome/browser/chromeos/dom_ui/language_options_handler.cc
index b4c1b19dc75bf6412ccff76ed9d02d92ec0d0363..da2e692764df365bb66b9351937fa5003681af3e 100644
--- a/chrome/browser/chromeos/dom_ui/language_options_handler.cc
+++ b/chrome/browser/chromeos/dom_ui/language_options_handler.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -289,18 +289,7 @@ void LanguageOptionsHandler::UiLanguageChangeCallback(
const std::string action = StringPrintf(
"LanguageOptions_UiLanguageChange_%s", language_code.c_str());
UserMetrics::RecordComputedAction(action);
-
- // We maintain kApplicationLocale property in both a global storage
- // and user's profile. Global property determines locale of login screen,
- // while user's profile determines his personal locale preference.
- PrefService* prefs[] = {
- g_browser_process->local_state(),
- dom_ui_->GetProfile()->GetPrefs()
- };
- for (size_t i = 0; i < arraysize(prefs); ++i) {
- prefs[i]->SetString(prefs::kApplicationLocale, language_code);
- prefs[i]->SavePersistentPrefs();
- }
+ dom_ui_->GetProfile()->ChangeApplicationLocale(language_code, false);
dom_ui_->CallJavascriptFunction(
L"options.LanguageOptions.uiLanguageSaved");
}

Powered by Google App Engine
This is Rietveld 408576698