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/client_socket_factory.cc

Issue 6339012: More net/ method ordering. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More done while waiting for previous patch to clear Created 9 years, 10 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/client_socket.cc ('k') | net/socket/dns_cert_provenance_checker.cc » ('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 "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "net/socket/client_socket_handle.h" 9 #include "net/socket/client_socket_handle.h"
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 return g_ssl_factory(transport_socket, host_and_port, ssl_config, 72 return g_ssl_factory(transport_socket, host_and_port, ssl_config,
73 ssl_host_info, cert_verifier, dns_cert_checker); 73 ssl_host_info, cert_verifier, dns_cert_checker);
74 } 74 }
75 }; 75 };
76 76
77 static base::LazyInstance<DefaultClientSocketFactory> 77 static base::LazyInstance<DefaultClientSocketFactory>
78 g_default_client_socket_factory(base::LINKER_INITIALIZED); 78 g_default_client_socket_factory(base::LINKER_INITIALIZED);
79 79
80 } // namespace 80 } // namespace
81 81
82 // static
83 ClientSocketFactory* ClientSocketFactory::GetDefaultFactory() {
84 return g_default_client_socket_factory.Pointer();
85 }
86
87 // static
88 void ClientSocketFactory::SetSSLClientSocketFactory(
89 SSLClientSocketFactory factory) {
90 g_ssl_factory = factory;
91 }
92
93 // Deprecated function (http://crbug.com/37810) that takes a ClientSocket. 82 // Deprecated function (http://crbug.com/37810) that takes a ClientSocket.
94 SSLClientSocket* ClientSocketFactory::CreateSSLClientSocket( 83 SSLClientSocket* ClientSocketFactory::CreateSSLClientSocket(
95 ClientSocket* transport_socket, 84 ClientSocket* transport_socket,
96 const HostPortPair& host_and_port, 85 const HostPortPair& host_and_port,
97 const SSLConfig& ssl_config, 86 const SSLConfig& ssl_config,
98 SSLHostInfo* ssl_host_info, 87 SSLHostInfo* ssl_host_info,
99 CertVerifier* cert_verifier) { 88 CertVerifier* cert_verifier) {
100 ClientSocketHandle* socket_handle = new ClientSocketHandle(); 89 ClientSocketHandle* socket_handle = new ClientSocketHandle();
101 socket_handle->set_socket(transport_socket); 90 socket_handle->set_socket(transport_socket);
102 return CreateSSLClientSocket(socket_handle, host_and_port, ssl_config, 91 return CreateSSLClientSocket(socket_handle, host_and_port, ssl_config,
103 ssl_host_info, cert_verifier, 92 ssl_host_info, cert_verifier,
104 NULL /* DnsCertProvenanceChecker */); 93 NULL /* DnsCertProvenanceChecker */);
105 } 94 }
106 95
96 // static
97 ClientSocketFactory* ClientSocketFactory::GetDefaultFactory() {
98 return g_default_client_socket_factory.Pointer();
99 }
100
101 // static
102 void ClientSocketFactory::SetSSLClientSocketFactory(
103 SSLClientSocketFactory factory) {
104 g_ssl_factory = factory;
105 }
106
107 } // namespace net 107 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/client_socket.cc ('k') | net/socket/dns_cert_provenance_checker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698