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

Side by Side Diff: net/socket/ssl_client_socket_nss_factory.cc

Issue 3846005: Revert 62918 - net: clean up SSLHostInfo construction.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 2 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 | « net/socket/ssl_client_socket_nss_factory.h ('k') | net/socket/ssl_client_socket_pool.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) 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 "net/socket/client_socket_factory.h" 5 #include "net/socket/client_socket_factory.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "net/socket/ssl_client_socket_nss.h" 8 #include "net/socket/ssl_client_socket_nss.h"
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include "net/socket/ssl_client_socket_win.h" 10 #include "net/socket/ssl_client_socket_win.h"
11 #endif 11 #endif
12 12
13 // This file is only used on platforms where NSS is not the system SSL 13 // This file is only used on platforms where NSS is not the system SSL
14 // library. When compiled, this file is the only object module that pulls 14 // library. When compiled, this file is the only object module that pulls
15 // in the dependency on NSPR and NSS. This allows us to control which 15 // in the dependency on NSPR and NSS. This allows us to control which
16 // projects depend on NSPR and NSS on those platforms. 16 // projects depend on NSPR and NSS on those platforms.
17 17
18 namespace net { 18 namespace net {
19 19
20 SSLClientSocket* SSLClientSocketNSSFactory( 20 SSLClientSocket* SSLClientSocketNSSFactory(
21 ClientSocketHandle* transport_socket, 21 ClientSocketHandle* transport_socket,
22 const std::string& hostname, 22 const std::string& hostname,
23 const SSLConfig& ssl_config, 23 const SSLConfig& ssl_config) {
24 SSLHostInfo* ssl_host_info) {
25 scoped_ptr<SSLHostInfo> shi(ssl_host_info);
26 // TODO(wtc): SSLClientSocketNSS can't do SSL client authentication using 24 // TODO(wtc): SSLClientSocketNSS can't do SSL client authentication using
27 // CryptoAPI yet (http://crbug.com/37560), so we fall back on 25 // CryptoAPI yet (http://crbug.com/37560), so we fall back on
28 // SSLClientSocketWin. 26 // SSLClientSocketWin.
29 #if defined(OS_WIN) 27 #if defined(OS_WIN)
30 if (ssl_config.send_client_cert) 28 if (ssl_config.send_client_cert)
31 return new SSLClientSocketWin(transport_socket, hostname, ssl_config); 29 return new SSLClientSocketWin(transport_socket, hostname, ssl_config);
32 #endif 30 #endif
33 31
34 return new SSLClientSocketNSS(transport_socket, hostname, ssl_config, 32 return new SSLClientSocketNSS(transport_socket, hostname, ssl_config);
35 shi.release());
36 } 33 }
37 34
38 } // namespace net 35 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_nss_factory.h ('k') | net/socket/ssl_client_socket_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698