diff options
author | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-02 15:09:16 +0000 |
---|---|---|
committer | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-02 15:09:16 +0000 |
commit | b19c3e1e7d172f793e9bd54adb7b1f4ac09835d7 (patch) | |
tree | 52b118c66eeb3b7e8d1ec7d81183390b70469982 /chrome/browser/browser_main_mac.mm | |
parent | 7b57f6c31e7f1b645ab9e2fd77608f4e696f7319 (diff) | |
download | chromium_src-b19c3e1e7d172f793e9bd54adb7b1f4ac09835d7.zip chromium_src-b19c3e1e7d172f793e9bd54adb7b1f4ac09835d7.tar.gz chromium_src-b19c3e1e7d172f793e9bd54adb7b1f4ac09835d7.tar.bz2 |
Tweak how we force the locale from the browser, this allow browser_tests to startup without doing the cocoa locale force (since it isn't valid there).
BUG=none
TEST=ntp tips, history times stamps, etc. all still in the right locale
Review URL: http://codereview.chromium.org/449076
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33571 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main_mac.mm')
-rw-r--r-- | chrome/browser/browser_main_mac.mm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/chrome/browser/browser_main_mac.mm b/chrome/browser/browser_main_mac.mm index c621b97..f325713 100644 --- a/chrome/browser/browser_main_mac.mm +++ b/chrome/browser/browser_main_mac.mm @@ -33,18 +33,20 @@ void WillInitializeMainMessageLoop(const MainFunctionParams& parameters) { // Initialize NSApplication using the custom subclass. [BrowserCrApplication sharedApplication]; - // Before we load the nib, we need to start up the resource bundle so we have - // the strings avaiable for localization. + // If ui_task is not NULL, the app is actually a browser_test, so startup is + // handled outside of BrowserMain (which is what called this). 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. + l10n_util::OverrideLocaleWithCocoaLocale(); + + // Before we load the nib, we need to start up the resource bundle so we + // have the strings avaiable for localization. ResourceBundle::InitSharedInstance(std::wstring()); } // Now load the nib. [NSBundle loadNibNamed:@"MainMenu" owner:NSApp]; - // The browser process only wants to support the language Cocoa will use, so - // force the app locale to be overriden with that value. - l10n_util::OverrideLocaleWithCocoaLocale(); - // This is a no-op if the KeystoneRegistration framework is not present. // The framework is only distributed with branded Google Chrome builds. [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone]; |