| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // have the strings avaiable for localization. | 88 // have the strings avaiable for localization. |
| 89 // TODO(markusheintz): Read preference pref::kApplicationLocale in order | 89 // TODO(markusheintz): Read preference pref::kApplicationLocale in order |
| 90 // to enforce the application locale. | 90 // to enforce the application locale. |
| 91 const std::string loaded_locale = | 91 const std::string loaded_locale = |
| 92 ResourceBundle::InitSharedInstanceWithLocale(std::string(), NULL); | 92 ResourceBundle::InitSharedInstanceWithLocale(std::string(), NULL); |
| 93 CHECK(!loaded_locale.empty()) << "Default locale could not be found"; | 93 CHECK(!loaded_locale.empty()) << "Default locale could not be found"; |
| 94 | 94 |
| 95 FilePath resources_pack_path; | 95 FilePath resources_pack_path; |
| 96 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); | 96 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
| 97 ResourceBundle::GetSharedInstance().AddDataPack( | 97 ResourceBundle::GetSharedInstance().AddDataPack( |
| 98 resources_pack_path, ui::ResourceHandle::kScaleFactor100x); | 98 resources_pack_path, ui::SCALE_FACTOR_100P); |
| 99 } | 99 } |
| 100 | 100 |
| 101 // This is a no-op if the KeystoneRegistration framework is not present. | 101 // This is a no-op if the KeystoneRegistration framework is not present. |
| 102 // The framework is only distributed with branded Google Chrome builds. | 102 // The framework is only distributed with branded Google Chrome builds. |
| 103 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone]; | 103 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone]; |
| 104 | 104 |
| 105 // Disk image installation is sort of a first-run task, so it shares the | 105 // Disk image installation is sort of a first-run task, so it shares the |
| 106 // kNoFirstRun switch. | 106 // kNoFirstRun switch. |
| 107 // | 107 // |
| 108 // This needs to be done after the resource bundle is initialized (for | 108 // This needs to be done after the resource bundle is initialized (for |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 const int kKeychainReauthorizeMaxTries = 2; | 146 const int kKeychainReauthorizeMaxTries = 2; |
| 147 | 147 |
| 148 chrome::browser::mac::KeychainReauthorizeIfNeeded( | 148 chrome::browser::mac::KeychainReauthorizeIfNeeded( |
| 149 keychain_reauthorize_pref, kKeychainReauthorizeMaxTries); | 149 keychain_reauthorize_pref, kKeychainReauthorizeMaxTries); |
| 150 } | 150 } |
| 151 | 151 |
| 152 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { | 152 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { |
| 153 AppController* appController = [NSApp delegate]; | 153 AppController* appController = [NSApp delegate]; |
| 154 [appController didEndMainMessageLoop]; | 154 [appController didEndMainMessageLoop]; |
| 155 } | 155 } |
| OLD | NEW |