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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 11876044: Remove support for 'system' SSL on Mac (SecureTransport) and Win (SChannel) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/public/common/content_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "content/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/hi_res_timer_manager.h" 10 #include "base/hi_res_timer_manager.h"
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 #endif 272 #endif
273 273
274 if (parts_.get()) 274 if (parts_.get())
275 parts_->PreEarlyInitialization(); 275 parts_->PreEarlyInitialization();
276 276
277 #if defined(OS_WIN) 277 #if defined(OS_WIN)
278 net::EnsureWinsockInit(); 278 net::EnsureWinsockInit();
279 #endif 279 #endif
280 280
281 #if !defined(USE_OPENSSL) 281 #if !defined(USE_OPENSSL)
282 // Use NSS for SSL by default. 282 // We want to be sure to init NSPR on the main thread.
wtc 2013/01/15 23:50:22 It is useful to keep the "Use NSS for SSL" part of
Ryan Sleevi 2013/01/15 23:57:45 We still need to initialize NSPR for Crypto - inde
wtc 2013/01/16 00:36:03 Ah, you're right.
283 // The default client socket factory uses NSS for SSL by default on 283 crypto::EnsureNSPRInit();
284 // Windows and Mac.
285 bool init_nspr = false;
286 #if defined(OS_WIN) || defined(OS_MACOSX)
287 if (parsed_command_line_.HasSwitch(switches::kUseSystemSSL)) {
288 net::ClientSocketFactory::UseSystemSSL();
289 } else {
290 init_nspr = true;
291 }
292 UMA_HISTOGRAM_BOOLEAN("Chrome.CommandLineUseSystemSSL", !init_nspr);
293 #elif defined(USE_NSS)
294 init_nspr = true;
295 #endif
296 if (init_nspr) {
297 // We want to be sure to init NSPR on the main thread.
298 crypto::EnsureNSPRInit();
299 }
300 #endif // !defined(USE_OPENSSL) 284 #endif // !defined(USE_OPENSSL)
301 285
302 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) 286 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
303 SetupSandbox(parsed_command_line_); 287 SetupSandbox(parsed_command_line_);
304 #endif 288 #endif
305 289
306 if (parsed_command_line_.HasSwitch(switches::kEnableSSLCachedInfo)) 290 if (parsed_command_line_.HasSwitch(switches::kEnableSSLCachedInfo))
307 net::SSLConfigService::EnableCachedInfo(); 291 net::SSLConfigService::EnableCachedInfo();
308 292
309 // TODO(abarth): Should this move to InitializeNetworkOptions? This doesn't 293 // TODO(abarth): Should this move to InitializeNetworkOptions? This doesn't
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); 743 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type());
760 if (parameters_.ui_task) 744 if (parameters_.ui_task)
761 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task); 745 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task);
762 746
763 base::RunLoop run_loop; 747 base::RunLoop run_loop;
764 run_loop.Run(); 748 run_loop.Run();
765 #endif 749 #endif
766 } 750 }
767 751
768 } // namespace content 752 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698