| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_main_mac.h" | 5 #include "chrome/browser/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" |
| 11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
| 12 #include "base/mac/mac_util.h" | 12 #include "base/mac/mac_util.h" |
| 13 #include "base/memory/scoped_nsobject.h" | 13 #include "base/memory/scoped_nsobject.h" |
| 14 #include "base/path_service.h" | 14 #include "base/path_service.h" |
| 15 #include "crypto/nss_util.h" | |
| 16 #include "chrome/app/breakpad_mac.h" | 15 #include "chrome/app/breakpad_mac.h" |
| 17 #import "chrome/browser/app_controller_mac.h" | 16 #import "chrome/browser/app_controller_mac.h" |
| 18 #include "chrome/browser/browser_main_win.h" | 17 #include "chrome/browser/browser_main_win.h" |
| 19 #import "chrome/browser/chrome_browser_application_mac.h" | 18 #import "chrome/browser/chrome_browser_application_mac.h" |
| 20 #import "chrome/browser/mac/keystone_glue.h" | 19 #import "chrome/browser/mac/keystone_glue.h" |
| 21 #include "chrome/browser/metrics/metrics_service.h" | 20 #include "chrome/browser/metrics/metrics_service.h" |
| 22 #include "chrome/common/chrome_paths.h" | 21 #include "chrome/common/chrome_paths.h" |
| 23 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
| 24 #include "content/common/main_function_params.h" | 23 #include "content/common/main_function_params.h" |
| 25 #include "content/common/result_codes.h" | 24 #include "content/common/result_codes.h" |
| 26 #include "net/socket/client_socket_factory.h" | |
| 27 #include "ui/base/l10n/l10n_util_mac.h" | 25 #include "ui/base/l10n/l10n_util_mac.h" |
| 28 #include "ui/base/resource/resource_bundle.h" | 26 #include "ui/base/resource/resource_bundle.h" |
| 29 | 27 |
| 30 namespace content { | 28 namespace content { |
| 31 | 29 |
| 32 void DidEndMainMessageLoop() { | 30 void DidEndMainMessageLoop() { |
| 33 AppController* appController = [NSApp delegate]; | 31 AppController* appController = [NSApp delegate]; |
| 34 [appController didEndMainMessageLoop]; | 32 [appController didEndMainMessageLoop]; |
| 35 } | 33 } |
| 36 | 34 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 129 |
| 132 // This is a no-op if the KeystoneRegistration framework is not present. | 130 // This is a no-op if the KeystoneRegistration framework is not present. |
| 133 // The framework is only distributed with branded Google Chrome builds. | 131 // The framework is only distributed with branded Google Chrome builds. |
| 134 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone]; | 132 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone]; |
| 135 | 133 |
| 136 // Prevent Cocoa from turning command-line arguments into | 134 // Prevent Cocoa from turning command-line arguments into |
| 137 // |-application:openFiles:|, since we already handle them directly. | 135 // |-application:openFiles:|, since we already handle them directly. |
| 138 [[NSUserDefaults standardUserDefaults] | 136 [[NSUserDefaults standardUserDefaults] |
| 139 setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"]; | 137 setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"]; |
| 140 } | 138 } |
| 141 | |
| 142 void BrowserMainPartsMac::InitializeSSL() { | |
| 143 // Use NSS for SSL by default. | |
| 144 // The default client socket factory uses NSS for SSL by default on Mac. | |
| 145 if (parsed_command_line().HasSwitch(switches::kUseSystemSSL)) { | |
| 146 net::ClientSocketFactory::UseSystemSSL(); | |
| 147 } else { | |
| 148 // We want to be sure to init NSPR on the main thread. | |
| 149 crypto::EnsureNSPRInit(); | |
| 150 } | |
| 151 } | |
| OLD | NEW |