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

Side by Side Diff: jingle/notifier/base/proxy_resolving_client_socket.h

Issue 10389098: [Sync] Make ChromeAsyncSocket use only the hostname on connect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This StreamSocket implementation wraps a ClientSocketHandle that is created 5 // This StreamSocket implementation wraps a ClientSocketHandle that is created
6 // from the client socket pool after resolving proxies. 6 // from the client socket pool after resolving proxies.
7 7
8 #ifndef JINGLE_NOTIFIER_BASE_PROXY_RESOLVING_CLIENT_SOCKET_H_ 8 #ifndef JINGLE_NOTIFIER_BASE_PROXY_RESOLVING_CLIENT_SOCKET_H_
9 #define JINGLE_NOTIFIER_BASE_PROXY_RESOLVING_CLIENT_SOCKET_H_ 9 #define JINGLE_NOTIFIER_BASE_PROXY_RESOLVING_CLIENT_SOCKET_H_
10 #pragma once 10 #pragma once
(...skipping 16 matching lines...) Expand all
27 class ClientSocketHandle; 27 class ClientSocketHandle;
28 class HttpNetworkSession; 28 class HttpNetworkSession;
29 class URLRequestContextGetter; 29 class URLRequestContextGetter;
30 } // namespace net 30 } // namespace net
31 31
32 // TODO(sanjeevr): Move this to net/ 32 // TODO(sanjeevr): Move this to net/
33 namespace notifier { 33 namespace notifier {
34 34
35 class ProxyResolvingClientSocket : public net::StreamSocket { 35 class ProxyResolvingClientSocket : public net::StreamSocket {
36 public: 36 public:
37 // Constructs a new ProxyResolvingClientSocket. |socket_factory| is the 37 // Constructs a new ProxyResolvingClientSocket. |socket_factory| is
38 // ClientSocketFactory that will be used by the underlying HttpNetworkSession. 38 // the ClientSocketFactory that will be used by the underlying
39 // If |socket_factory| is NULL, the default socket factory 39 // HttpNetworkSession. If |socket_factory| is NULL, the default
40 // (net::ClientSocketFactory::GetDefaultFactory()) will be used. 40 // socket factory (net::ClientSocketFactory::GetDefaultFactory())
41 // will be used. |dest_host_port_pair| is the destination for this
42 // socket. The hostname must be non-empty and the port must be > 0.
41 ProxyResolvingClientSocket( 43 ProxyResolvingClientSocket(
42 net::ClientSocketFactory* socket_factory, 44 net::ClientSocketFactory* socket_factory,
43 const scoped_refptr<net::URLRequestContextGetter>& request_context_getter, 45 const scoped_refptr<net::URLRequestContextGetter>& request_context_getter,
44 const net::SSLConfig& ssl_config, 46 const net::SSLConfig& ssl_config,
45 const net::HostPortPair& dest_host_port_pair); 47 const net::HostPortPair& dest_host_port_pair);
46 virtual ~ProxyResolvingClientSocket(); 48 virtual ~ProxyResolvingClientSocket();
47 49
48 // net::StreamSocket implementation. 50 // net::StreamSocket implementation.
49 virtual int Read(net::IOBuffer* buf, int buf_len, 51 virtual int Read(net::IOBuffer* buf, int buf_len,
50 const net::CompletionCallback& callback) OVERRIDE; 52 const net::CompletionCallback& callback) OVERRIDE;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 net::BoundNetLog bound_net_log_; 96 net::BoundNetLog bound_net_log_;
95 base::WeakPtrFactory<ProxyResolvingClientSocket> weak_factory_; 97 base::WeakPtrFactory<ProxyResolvingClientSocket> weak_factory_;
96 98
97 // The callback passed to Connect(). 99 // The callback passed to Connect().
98 net::CompletionCallback user_connect_callback_; 100 net::CompletionCallback user_connect_callback_;
99 }; 101 };
100 102
101 } // namespace notifier 103 } // namespace notifier
102 104
103 #endif // JINGLE_NOTIFIER_BASE_PROXY_RESOLVING_CLIENT_SOCKET_H_ 105 #endif // JINGLE_NOTIFIER_BASE_PROXY_RESOLVING_CLIENT_SOCKET_H_
OLDNEW
« no previous file with comments | « jingle/notifier/base/chrome_async_socket_unittest.cc ('k') | jingle/notifier/base/proxy_resolving_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698