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

Side by Side Diff: chrome/browser/chrome_browser_main_mac.mm

Issue 457103003: Merge ResourceBundle's InitSharedInstanceLocaleOnly with InitSharedInstanceWithLocale(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/ui/startup/bad_flags_prompt.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_browser_main_mac.h" 5 #include "chrome/browser/chrome_browser_main_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include <sys/sysctl.h> 8 #include <sys/sysctl.h>
9 9
10 #include "apps/app_shim/app_shim_host_manager_mac.h" 10 #include "apps/app_shim/app_shim_host_manager_mac.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // The browser process only wants to support the language Cocoa will use, 196 // The browser process only wants to support the language Cocoa will use,
197 // so force the app locale to be overriden with that value. 197 // so force the app locale to be overriden with that value.
198 l10n_util::OverrideLocaleWithCocoaLocale(); 198 l10n_util::OverrideLocaleWithCocoaLocale();
199 } 199 }
200 200
201 // Before we load the nib, we need to start up the resource bundle so we 201 // Before we load the nib, we need to start up the resource bundle so we
202 // have the strings avaiable for localization. 202 // have the strings avaiable for localization.
203 // TODO(markusheintz): Read preference pref::kApplicationLocale in order 203 // TODO(markusheintz): Read preference pref::kApplicationLocale in order
204 // to enforce the application locale. 204 // to enforce the application locale.
205 const std::string loaded_locale = 205 const std::string loaded_locale =
206 ResourceBundle::InitSharedInstanceWithLocale(std::string(), NULL); 206 ui::ResourceBundle::InitSharedInstanceWithLocale(
207 std::string(), NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
207 CHECK(!loaded_locale.empty()) << "Default locale could not be found"; 208 CHECK(!loaded_locale.empty()) << "Default locale could not be found";
208 209
209 base::FilePath resources_pack_path; 210 base::FilePath resources_pack_path;
210 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); 211 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
211 ResourceBundle::GetSharedInstance().AddDataPackFromPath( 212 ResourceBundle::GetSharedInstance().AddDataPackFromPath(
212 resources_pack_path, ui::SCALE_FACTOR_NONE); 213 resources_pack_path, ui::SCALE_FACTOR_NONE);
213 214
214 // This is a no-op if the KeystoneRegistration framework is not present. 215 // This is a no-op if the KeystoneRegistration framework is not present.
215 // The framework is only distributed with branded Google Chrome builds. 216 // The framework is only distributed with branded Google Chrome builds.
216 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone]; 217 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone];
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 MacStartupProfiler::POST_PROFILE_INIT); 282 MacStartupProfiler::POST_PROFILE_INIT);
282 ChromeBrowserMainPartsPosix::PostProfileInit(); 283 ChromeBrowserMainPartsPosix::PostProfileInit();
283 g_browser_process->metrics_service()->RecordBreakpadRegistration( 284 g_browser_process->metrics_service()->RecordBreakpadRegistration(
284 breakpad::IsCrashReporterEnabled()); 285 breakpad::IsCrashReporterEnabled());
285 } 286 }
286 287
287 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { 288 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
288 AppController* appController = [NSApp delegate]; 289 AppController* appController = [NSApp delegate];
289 [appController didEndMainMessageLoop]; 290 [appController didEndMainMessageLoop];
290 } 291 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/ui/startup/bad_flags_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698