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

Side by Side Diff: chrome/browser/browser_main.cc

Issue 2322008: Use SSLClientSocketNSS on Mac OS X. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Add build/linux/system.gyp to the CL. Created 10 years, 6 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/browser_main.h" 5 #include "chrome/browser/browser_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // other platforms. For now, it's just a stub. This is a serious work in 106 // other platforms. For now, it's just a stub. This is a serious work in
107 // progress and should not be taken as an indication of a real refactoring. 107 // progress and should not be taken as an indication of a real refactoring.
108 108
109 #if defined(OS_WIN) 109 #if defined(OS_WIN)
110 #include <windows.h> 110 #include <windows.h>
111 #include <commctrl.h> 111 #include <commctrl.h>
112 #include <shellapi.h> 112 #include <shellapi.h>
113 113
114 #include "app/l10n_util_win.h" 114 #include "app/l10n_util_win.h"
115 #include "app/win_util.h" 115 #include "app/win_util.h"
116 #include "base/nss_util.h"
117 #include "base/registry.h" 116 #include "base/registry.h"
118 #include "base/win_util.h" 117 #include "base/win_util.h"
119 #include "chrome/browser/browser.h" 118 #include "chrome/browser/browser.h"
120 #include "chrome/browser/browser_trial.h" 119 #include "chrome/browser/browser_trial.h"
121 #include "chrome/browser/metrics/user_metrics.h" 120 #include "chrome/browser/metrics/user_metrics.h"
122 #include "chrome/browser/net/url_fixer_upper.h" 121 #include "chrome/browser/net/url_fixer_upper.h"
123 #include "chrome/browser/rlz/rlz.h" 122 #include "chrome/browser/rlz/rlz.h"
124 #include "chrome/browser/views/user_data_dir_dialog.h" 123 #include "chrome/browser/views/user_data_dir_dialog.h"
125 #include "chrome/common/env_vars.h" 124 #include "chrome/common/env_vars.h"
126 #include "chrome/common/sandbox_policy.h" 125 #include "chrome/common/sandbox_policy.h"
127 #include "chrome/installer/util/browser_distribution.h" 126 #include "chrome/installer/util/browser_distribution.h"
128 #include "chrome/installer/util/google_chrome_sxs_distribution.h" 127 #include "chrome/installer/util/google_chrome_sxs_distribution.h"
129 #include "chrome/installer/util/helper.h" 128 #include "chrome/installer/util/helper.h"
130 #include "chrome/installer/util/install_util.h" 129 #include "chrome/installer/util/install_util.h"
131 #include "chrome/installer/util/shell_util.h" 130 #include "chrome/installer/util/shell_util.h"
132 #include "chrome/installer/util/version.h" 131 #include "chrome/installer/util/version.h"
133 #include "net/base/net_util.h" 132 #include "net/base/net_util.h"
134 #include "net/base/sdch_manager.h" 133 #include "net/base/sdch_manager.h"
135 #include "net/base/winsock_init.h" 134 #include "net/base/winsock_init.h"
136 #include "net/socket/ssl_client_socket_nss_factory.h"
137 #include "printing/printed_document.h" 135 #include "printing/printed_document.h"
138 #include "sandbox/src/sandbox.h" 136 #include "sandbox/src/sandbox.h"
139 #endif // defined(OS_WIN) 137 #endif // defined(OS_WIN)
140 138
141 #if defined(OS_MACOSX) 139 #if defined(OS_MACOSX)
142 #include <Security/Security.h> 140 #include <Security/Security.h>
143 #include "chrome/browser/cocoa/install_from_dmg.h" 141 #include "chrome/browser/cocoa/install_from_dmg.h"
144 #endif 142 #endif
145 143
144 #if defined(OS_MACOSX) || defined(OS_WIN)
145 #include "base/nss_util.h"
146 #include "net/socket/ssl_client_socket_nss_factory.h"
147 #endif
148
146 #if defined(TOOLKIT_VIEWS) 149 #if defined(TOOLKIT_VIEWS)
147 #include "chrome/browser/views/chrome_views_delegate.h" 150 #include "chrome/browser/views/chrome_views_delegate.h"
148 #include "views/focus/accelerator_handler.h" 151 #include "views/focus/accelerator_handler.h"
149 #endif 152 #endif
150 153
151 #if defined(OS_CHROMEOS) 154 #if defined(OS_CHROMEOS)
152 #include "chrome/browser/chromeos/cros/cros_library.h" 155 #include "chrome/browser/chromeos/cros/cros_library.h"
153 #include "chrome/browser/chromeos/cros/screen_lock_library.h" 156 #include "chrome/browser/chromeos/cros/screen_lock_library.h"
154 #include "chrome/browser/chromeos/external_metrics.h" 157 #include "chrome/browser/chromeos/external_metrics.h"
155 #include "chrome/browser/chromeos/login/screen_locker.h" 158 #include "chrome/browser/chromeos/login/screen_locker.h"
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 is_spdy_trial = true; 753 is_spdy_trial = true;
751 net::HttpNetworkLayer::EnableSpdy("npn-http"); 754 net::HttpNetworkLayer::EnableSpdy("npn-http");
752 } else if (trial_grp == npn_spdy_grp) { 755 } else if (trial_grp == npn_spdy_grp) {
753 is_spdy_trial = true; 756 is_spdy_trial = true;
754 net::HttpNetworkLayer::EnableSpdy("npn"); 757 net::HttpNetworkLayer::EnableSpdy("npn");
755 } else { 758 } else {
756 CHECK(!is_spdy_trial); 759 CHECK(!is_spdy_trial);
757 } 760 }
758 } 761 }
759 762
763 #if defined(OS_MACOSX) || defined(OS_WIN)
760 #if defined(OS_WIN) 764 #if defined(OS_WIN)
761 if (!parsed_command_line.HasSwitch(switches::kUseSChannel) || 765 bool use_nss_for_ssl = !parsed_command_line.HasSwitch(switches::kUseSChannel);
766 #else
767 bool use_nss_for_ssl = parsed_command_line.HasSwitch(switches::kUseNSSForSSL);
768 #endif
769 if (use_nss_for_ssl ||
762 parsed_command_line.HasSwitch(switches::kUseSpdy) || 770 parsed_command_line.HasSwitch(switches::kUseSpdy) ||
763 is_spdy_trial) { 771 is_spdy_trial) {
764 net::ClientSocketFactory::SetSSLClientSocketFactory( 772 net::ClientSocketFactory::SetSSLClientSocketFactory(
765 net::SSLClientSocketNSSFactory); 773 net::SSLClientSocketNSSFactory);
766 // We want to be sure to init NSPR on the main thread. 774 // We want to be sure to init NSPR on the main thread.
767 base::EnsureNSPRInit(); 775 base::EnsureNSPRInit();
768 } 776 }
769 #endif 777 #endif
770 778
771 // Do platform-specific things (such as finishing initializing Cocoa) 779 // Do platform-specific things (such as finishing initializing Cocoa)
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 1312
1305 metrics->Stop(); 1313 metrics->Stop();
1306 1314
1307 // browser_shutdown takes care of deleting browser_process, so we need to 1315 // browser_shutdown takes care of deleting browser_process, so we need to
1308 // release it. 1316 // release it.
1309 ignore_result(browser_process.release()); 1317 ignore_result(browser_process.release());
1310 browser_shutdown::Shutdown(); 1318 browser_shutdown::Shutdown();
1311 1319
1312 return result_code; 1320 return result_code;
1313 } 1321 }
OLDNEW
« build/all.gyp ('K') | « build/linux/system.gyp ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698