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

Unified Diff: chrome/browser/browser_main_mac.mm

Issue 3073008: BrowserMain() refactoring, part 2.1. (Closed)
Patch Set: build fix Created 10 years, 5 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 | « chrome/browser/browser_main.cc ('k') | chrome/browser/browser_main_posix.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_main_mac.mm
diff --git a/chrome/browser/browser_main_mac.mm b/chrome/browser/browser_main_mac.mm
index 49dc4783bde32a7d8676d05291da275f1e6d8f64..3123a36933df242815a2db84c4231888cdd95351 100644
--- a/chrome/browser/browser_main_mac.mm
+++ b/chrome/browser/browser_main_mac.mm
@@ -13,6 +13,7 @@
#include "base/debug_util.h"
#include "base/file_path.h"
#include "base/mac_util.h"
+#include "base/nss_util.h"
#include "base/path_service.h"
#include "base/scoped_nsobject.h"
#include "chrome/app/breakpad_mac.h"
@@ -22,9 +23,11 @@
#import "chrome/browser/cocoa/keystone_glue.h"
#include "chrome/browser/metrics/metrics_service.h"
#include "chrome/common/chrome_paths.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/main_function_params.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/result_codes.h"
+#include "net/socket/ssl_client_socket_mac_factory.h"
void DidEndMainMessageLoop() {
AppController* appController = [NSApp delegate];
@@ -117,6 +120,19 @@ class BrowserMainPartsMac : public BrowserMainPartsPosix {
[[NSUserDefaults standardUserDefaults]
setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"];
}
+
+ private:
+ virtual void InitializeSSL() {
+ // Use NSS for SSL by default.
+ // The default client socket factory uses NSS for SSL by default on Mac.
+ if (parsed_command_line().HasSwitch(switches::kUseSystemSSL)) {
+ net::ClientSocketFactory::SetSSLClientSocketFactory(
+ net::SSLClientSocketMacFactory);
+ } else {
+ // We want to be sure to init NSPR on the main thread.
+ base::EnsureNSPRInit();
+ }
+ }
};
// static
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/browser/browser_main_posix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698