| 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 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/debugger.h" | 10 #include "base/debug/debugger.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // have the strings avaiable for localization. | 131 // have the strings avaiable for localization. |
| 132 // TODO(markusheintz): Read preference pref::kApplicationLocale in order | 132 // TODO(markusheintz): Read preference pref::kApplicationLocale in order |
| 133 // to enforce the application locale. | 133 // to enforce the application locale. |
| 134 const std::string loaded_locale = | 134 const std::string loaded_locale = |
| 135 ResourceBundle::InitSharedInstanceWithLocale(std::string(), NULL); | 135 ResourceBundle::InitSharedInstanceWithLocale(std::string(), NULL); |
| 136 CHECK(!loaded_locale.empty()) << "Default locale could not be found"; | 136 CHECK(!loaded_locale.empty()) << "Default locale could not be found"; |
| 137 | 137 |
| 138 FilePath resources_pack_path; | 138 FilePath resources_pack_path; |
| 139 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); | 139 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
| 140 ResourceBundle::GetSharedInstance().AddDataPack( | 140 ResourceBundle::GetSharedInstance().AddDataPack( |
| 141 resources_pack_path, ui::ResourceHandle::kScaleFactor100x); | 141 resources_pack_path, ui::SCALE_FACTOR_100P); |
| 142 } | 142 } |
| 143 | 143 |
| 144 // This is a no-op if the KeystoneRegistration framework is not present. | 144 // This is a no-op if the KeystoneRegistration framework is not present. |
| 145 // The framework is only distributed with branded Google Chrome builds. | 145 // The framework is only distributed with branded Google Chrome builds. |
| 146 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone]; | 146 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone]; |
| 147 | 147 |
| 148 // Disk image installation is sort of a first-run task, so it shares the | 148 // Disk image installation is sort of a first-run task, so it shares the |
| 149 // kNoFirstRun switch. | 149 // kNoFirstRun switch. |
| 150 // | 150 // |
| 151 // This needs to be done after the resource bundle is initialized (for | 151 // This needs to be done after the resource bundle is initialized (for |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 // interrupted for any reason), there will be a second chance. Once this | 185 // interrupted for any reason), there will be a second chance. Once this |
| 186 // step completes successfully, it should never have to run again. | 186 // step completes successfully, it should never have to run again. |
| 187 chrome::browser::mac::KeychainReauthorizeIfNeeded( | 187 chrome::browser::mac::KeychainReauthorizeIfNeeded( |
| 188 kKeychainReauthorizeAtLaunchPref, kKeychainReauthorizeAtLaunchMaxTries); | 188 kKeychainReauthorizeAtLaunchPref, kKeychainReauthorizeAtLaunchMaxTries); |
| 189 } | 189 } |
| 190 | 190 |
| 191 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { | 191 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { |
| 192 AppController* appController = [NSApp delegate]; | 192 AppController* appController = [NSApp delegate]; |
| 193 [appController didEndMainMessageLoop]; | 193 [appController didEndMainMessageLoop]; |
| 194 } | 194 } |
| OLD | NEW |