From 3dd6f5e0807447194b12c7adc9a730d81738a0a6 Mon Sep 17 00:00:00 2001 From: "wtc@chromium.org" Date: Tue, 1 Jun 2010 20:28:03 +0000 Subject: Use SSLClientSocketNSS on Mac OS X. By default, chrome still uses SSLClientSocketMac. Specify the --use-nss-for-ssl command-line option to use SSLClientSocketNSS. The nss.gyp in src/net/third_party/nss is renamed ssl.gyp to avoid a naming conflict with the nss.gyp in src/third_party/nss. The GYP generator for Xcode project files disallows same-named .gyp files. SSL client authentication doesn't work yet. R=mark BUG=30689 TEST=No build and test failures on Mac and Windows. Review URL: http://codereview.chromium.org/2322008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48650 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/browser_main.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'chrome/browser') diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index b777843..2d959c3 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -113,7 +113,6 @@ #include "app/l10n_util_win.h" #include "app/win_util.h" -#include "base/nss_util.h" #include "base/registry.h" #include "base/win_util.h" #include "chrome/browser/browser.h" @@ -133,7 +132,6 @@ #include "net/base/net_util.h" #include "net/base/sdch_manager.h" #include "net/base/winsock_init.h" -#include "net/socket/ssl_client_socket_nss_factory.h" #include "printing/printed_document.h" #include "sandbox/src/sandbox.h" #endif // defined(OS_WIN) @@ -143,6 +141,11 @@ #include "chrome/browser/cocoa/install_from_dmg.h" #endif +#if defined(OS_MACOSX) || defined(OS_WIN) +#include "base/nss_util.h" +#include "net/socket/ssl_client_socket_nss_factory.h" +#endif + #if defined(TOOLKIT_VIEWS) #include "chrome/browser/views/chrome_views_delegate.h" #include "views/focus/accelerator_handler.h" @@ -757,8 +760,13 @@ int BrowserMain(const MainFunctionParams& parameters) { } } +#if defined(OS_MACOSX) || defined(OS_WIN) #if defined(OS_WIN) - if (!parsed_command_line.HasSwitch(switches::kUseSChannel) || + bool use_nss_for_ssl = !parsed_command_line.HasSwitch(switches::kUseSChannel); +#else + bool use_nss_for_ssl = parsed_command_line.HasSwitch(switches::kUseNSSForSSL); +#endif + if (use_nss_for_ssl || parsed_command_line.HasSwitch(switches::kUseSpdy) || is_spdy_trial) { net::ClientSocketFactory::SetSSLClientSocketFactory( -- cgit v1.1