Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: chrome/browser/browser_main.cc

Issue 573041: Add the ssl_client_socket_nss_factory.h header and declare... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Sync with the current trunk. Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_main.cc
===================================================================
--- chrome/browser/browser_main.cc (revision 38473)
+++ chrome/browser/browser_main.cc (working copy)
@@ -65,7 +65,6 @@
#include "net/base/cookie_monster.h"
#include "net/base/net_module.h"
#include "net/http/http_network_session.h"
-#include "net/socket/client_socket_factory.h"
#include "net/socket/client_socket_pool_base.h"
#if defined(OS_POSIX)
@@ -97,6 +96,7 @@
#include <shellapi.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"
@@ -114,7 +114,7 @@
#include "net/base/net_util.h"
#include "net/base/sdch_manager.h"
#include "net/base/winsock_init.h"
-#include "net/http/http_network_layer.h"
+#include "net/socket/ssl_client_socket_nss_factory.h"
#include "printing/printed_document.h"
#include "sandbox/src/sandbox.h"
#endif // defined(OS_WIN)
@@ -397,6 +397,16 @@
net::EnsureWinsockInit();
#endif // defined(OS_WIN)
+#if defined(OS_WIN)
+ if (parsed_command_line.HasSwitch(switches::kUseNSSForSSL) ||
+ parsed_command_line.HasSwitch(switches::kUseSpdy)) {
+ net::ClientSocketFactory::SetSSLClientSocketFactory(
+ net::SSLClientSocketNSSFactory);
+ // We want to be sure to init NSPR on the main thread.
+ base::EnsureNSPRInit();
+ }
+#endif
+
// Do platform-specific things (such as finishing initializing Cocoa)
// prior to instantiating the message loop. This could be turned into a
// broadcast notification.
@@ -719,14 +729,6 @@
}
}
-#if defined(OS_WIN)
- if (parsed_command_line.HasSwitch(switches::kUseNSSForSSL) ||
- parsed_command_line.HasSwitch(switches::kUseSpdy)) {
- net::ClientSocketFactory::SetSSLClientSocketFactory(
- net::SSLClientSocketNSSFactory);
- }
-#endif
-
// Try to create/load the profile.
ProfileManager* profile_manager = browser_process->profile_manager();
Profile* profile = profile_manager->GetDefaultProfile(user_data_dir);
« no previous file with comments | « no previous file | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698