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

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: 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
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 // Use NSS for SSL by default.
wtc 2013/01/15 23:26:35 Remove "by default", which means "if --use-system-
283 // The default client socket factory uses NSS for SSL by default on 283 // We want to be sure to init NSPR on the main thread.
284 // Windows and Mac. 284 crypto::EnsureNSPRInit();
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) 285 #endif // !defined(USE_OPENSSL)
301 286
302 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) 287 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
303 SetupSandbox(parsed_command_line_); 288 SetupSandbox(parsed_command_line_);
304 #endif 289 #endif
305 290
306 if (parsed_command_line_.HasSwitch(switches::kEnableSSLCachedInfo)) 291 if (parsed_command_line_.HasSwitch(switches::kEnableSSLCachedInfo))
307 net::SSLConfigService::EnableCachedInfo(); 292 net::SSLConfigService::EnableCachedInfo();
308 293
309 // TODO(abarth): Should this move to InitializeNetworkOptions? This doesn't 294 // 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()); 744 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type());
760 if (parameters_.ui_task) 745 if (parameters_.ui_task)
761 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task); 746 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task);
762 747
763 base::RunLoop run_loop; 748 base::RunLoop run_loop;
764 run_loop.Run(); 749 run_loop.Run();
765 #endif 750 #endif
766 } 751 }
767 752
768 } // namespace content 753 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/common/content_switches.h » ('j') | net/socket/client_socket_factory.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698