| OLD | NEW |
| 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 Loading... |
| 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 ResourceBundle::InitSharedInstanceWithLocale(std::string(), NULL, true); |
| 207 CHECK(!loaded_locale.empty()) << "Default locale could not be found"; | 207 CHECK(!loaded_locale.empty()) << "Default locale could not be found"; |
| 208 | 208 |
| 209 base::FilePath resources_pack_path; | 209 base::FilePath resources_pack_path; |
| 210 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); | 210 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
| 211 ResourceBundle::GetSharedInstance().AddDataPackFromPath( | 211 ResourceBundle::GetSharedInstance().AddDataPackFromPath( |
| 212 resources_pack_path, ui::SCALE_FACTOR_NONE); | 212 resources_pack_path, ui::SCALE_FACTOR_NONE); |
| 213 | 213 |
| 214 // This is a no-op if the KeystoneRegistration framework is not present. | 214 // This is a no-op if the KeystoneRegistration framework is not present. |
| 215 // The framework is only distributed with branded Google Chrome builds. | 215 // The framework is only distributed with branded Google Chrome builds. |
| 216 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone]; | 216 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone]; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 MacStartupProfiler::POST_PROFILE_INIT); | 281 MacStartupProfiler::POST_PROFILE_INIT); |
| 282 ChromeBrowserMainPartsPosix::PostProfileInit(); | 282 ChromeBrowserMainPartsPosix::PostProfileInit(); |
| 283 g_browser_process->metrics_service()->RecordBreakpadRegistration( | 283 g_browser_process->metrics_service()->RecordBreakpadRegistration( |
| 284 breakpad::IsCrashReporterEnabled()); | 284 breakpad::IsCrashReporterEnabled()); |
| 285 } | 285 } |
| 286 | 286 |
| 287 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { | 287 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { |
| 288 AppController* appController = [NSApp delegate]; | 288 AppController* appController = [NSApp delegate]; |
| 289 [appController didEndMainMessageLoop]; | 289 [appController didEndMainMessageLoop]; |
| 290 } | 290 } |
| OLD | NEW |