Commit 740c2633 authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

mac: change initialization so locale set before local state

This likely leads to using the wrong locale for non-english systems.

BUG=819369
TEST=none

Change-Id: Ie432f038567f077ab10a18257b4b89c8a1a3282e
Reviewed-on: https://chromium-review.googlesource.com/951708Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542018}
parent 7c77464c
......@@ -75,10 +75,6 @@ ChromeBrowserMainPartsMac::~ChromeBrowserMainPartsMac() {
}
int ChromeBrowserMainPartsMac::PreEarlyInitialization() {
const int result = ChromeBrowserMainPartsPosix::PreEarlyInitialization();
if (result != content::RESULT_CODE_NORMAL_EXIT)
return result;
if (base::mac::WasLaunchedAsLoginItemRestoreState()) {
base::CommandLine* singleton_command_line =
base::CommandLine::ForCurrentProcess();
......@@ -103,11 +99,13 @@ int ChromeBrowserMainPartsMac::PreEarlyInitialization() {
// If ui_task is not NULL, the app is actually a browser_test.
if (!parameters().ui_task) {
// The browser process only wants to support the language Cocoa will use,
// so force the app locale to be overriden with that value.
// so force the app locale to be overriden with that value. This must
// happen before the ResourceBundle is loaded, which happens in
// ChromeBrowserMainParts::PreEarlyInitialization().
l10n_util::OverrideLocaleWithCocoaLocale();
}
return content::RESULT_CODE_NORMAL_EXIT;
return ChromeBrowserMainPartsPosix::PreEarlyInitialization();
}
void ChromeBrowserMainPartsMac::PreMainMessageLoopStart() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment