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

Unified Diff: chrome/browser/browser_main_win.cc

Issue 4139010: The UI language rather than the locale is now used to pick Chrome's language ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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
« no previous file with comments | « base/win/i18n_unittest.cc ('k') | chrome/chrome_installer.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_main_win.cc
===================================================================
--- chrome/browser/browser_main_win.cc (revision 66182)
+++ chrome/browser/browser_main_win.cc (working copy)
@@ -11,6 +11,7 @@
#include <algorithm>
#include "app/l10n_util.h"
+#include "app/l10n_util_win.h"
#include "app/win_util.h"
#include "base/command_line.h"
#include "base/environment.h"
@@ -26,6 +27,7 @@
#include "chrome/browser/views/uninstall_view.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/env_vars.h"
+#include "chrome/common/main_function_params.h"
#include "chrome/common/result_codes.h"
#include "chrome/installer/util/helper.h"
#include "chrome/installer/util/install_util.h"
@@ -217,6 +219,13 @@
virtual void PreMainMessageLoopStart() {
OleInitialize(NULL);
+
+ // If we're running tests (ui_task is non-null), then the ResourceBundle
+ // has already been initialized.
+ if (!parameters().ui_task) {
+ // Override the configured locale with the user's preferred UI language.
+ l10n_util::OverrideLocaleWithUILanguageList();
+ }
}
private:
« no previous file with comments | « base/win/i18n_unittest.cc ('k') | chrome/chrome_installer.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698