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

Side by Side Diff: net/base/client_socket_factory.cc

Issue 4013: Port more unit tests in net/http/ (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 12 years, 3 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/base/client_socket_factory.h ('k') | net/base/x509_certificate.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/base/client_socket_factory.h" 5 #include "net/base/client_socket_factory.h"
6 6
7 #include "base/basictypes.h"
7 #include "base/singleton.h" 8 #include "base/singleton.h"
9 // TODO(port): Enable when ssl_client socket is ported.
10 #if defined(OS_WIN)
8 #include "net/base/ssl_client_socket.h" 11 #include "net/base/ssl_client_socket.h"
12 #endif
9 #include "net/base/tcp_client_socket.h" 13 #include "net/base/tcp_client_socket.h"
10 14
11 namespace net { 15 namespace net {
12 16
13 class DefaultClientSocketFactory : public ClientSocketFactory { 17 class DefaultClientSocketFactory : public ClientSocketFactory {
14 public: 18 public:
15 virtual ClientSocket* CreateTCPClientSocket( 19 virtual ClientSocket* CreateTCPClientSocket(
16 const AddressList& addresses) { 20 const AddressList& addresses) {
17 return new TCPClientSocket(addresses); 21 return new TCPClientSocket(addresses);
18 } 22 }
19 23
24 // TODO(port): Enable when ssl_client socket is ported.
25 #if defined(OS_WIN)
20 virtual ClientSocket* CreateSSLClientSocket( 26 virtual ClientSocket* CreateSSLClientSocket(
21 ClientSocket* transport_socket, 27 ClientSocket* transport_socket,
22 const std::string& hostname) { 28 const std::string& hostname) {
23 return new SSLClientSocket(transport_socket, hostname); 29 return new SSLClientSocket(transport_socket, hostname);
24 } 30 }
31 #endif
25 }; 32 };
26 33
27 // static 34 // static
28 ClientSocketFactory* ClientSocketFactory::GetDefaultFactory() { 35 ClientSocketFactory* ClientSocketFactory::GetDefaultFactory() {
29 return Singleton<DefaultClientSocketFactory>::get(); 36 return Singleton<DefaultClientSocketFactory>::get();
30 } 37 }
31 38
32 } // namespace net 39 } // namespace net
33 40
OLDNEW
« no previous file with comments | « net/base/client_socket_factory.h ('k') | net/base/x509_certificate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698