OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ | 5 #ifndef NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ |
6 #define NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ | 6 #define NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <list> | 10 #include <list> |
11 | 11 |
(...skipping 28 matching lines...) Expand all Loading... |
40 public: | 40 public: |
41 // Create a socket on top of the |spdy_stream| by sending a SYN_STREAM | 41 // Create a socket on top of the |spdy_stream| by sending a SYN_STREAM |
42 // CONNECT frame for |endpoint|. After the SYN_REPLY is received, | 42 // CONNECT frame for |endpoint|. After the SYN_REPLY is received, |
43 // any data read/written to the socket will be transferred in data | 43 // any data read/written to the socket will be transferred in data |
44 // frames. | 44 // frames. |
45 SpdyProxyClientSocket(SpdyStream* spdy_stream, | 45 SpdyProxyClientSocket(SpdyStream* spdy_stream, |
46 const std::string& user_agent, | 46 const std::string& user_agent, |
47 const HostPortPair& endpoint, | 47 const HostPortPair& endpoint, |
48 const GURL& url, | 48 const GURL& url, |
49 const HostPortPair& proxy_server, | 49 const HostPortPair& proxy_server, |
50 HttpAuthController* auth_controller); | 50 HttpAuthCache* auth_cache, |
| 51 HttpAuthHandlerFactory* auth_handler_factory); |
| 52 |
51 | 53 |
52 // On destruction Disconnect() is called. | 54 // On destruction Disconnect() is called. |
53 virtual ~SpdyProxyClientSocket(); | 55 virtual ~SpdyProxyClientSocket(); |
54 | 56 |
| 57 const scoped_refptr<HttpAuthController>& auth_controller() { |
| 58 return auth_; |
| 59 } |
| 60 |
55 // ProxyClientSocket methods: | 61 // ProxyClientSocket methods: |
56 virtual const HttpResponseInfo* GetConnectResponseInfo() const OVERRIDE; | 62 virtual const HttpResponseInfo* GetConnectResponseInfo() const OVERRIDE; |
57 virtual int RestartWithAuth(const CompletionCallback& callback) OVERRIDE; | |
58 virtual const scoped_refptr<HttpAuthController>& GetAuthController() OVERRIDE; | |
59 | 63 |
60 // In the event of a non-200 response to the CONNECT request, this | 64 // In the event of a non-200 response to the CONNECT request, this |
61 // method may be called to return an HttpStream in order to read | 65 // method may be called to return an HttpStream in order to read |
62 // the response body. | 66 // the response body. |
63 virtual HttpStream* CreateConnectResponseStream() OVERRIDE; | 67 virtual HttpStream* CreateConnectResponseStream() OVERRIDE; |
64 | 68 |
65 // StreamSocket implementation. | 69 // StreamSocket implementation. |
66 virtual int Connect(const CompletionCallback& callback) OVERRIDE; | 70 virtual int Connect(const CompletionCallback& callback) OVERRIDE; |
67 virtual void Disconnect() OVERRIDE; | 71 virtual void Disconnect() OVERRIDE; |
68 virtual bool IsConnected() const OVERRIDE; | 72 virtual bool IsConnected() const OVERRIDE; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 base::WeakPtrFactory<SpdyProxyClientSocket> weak_factory_; | 167 base::WeakPtrFactory<SpdyProxyClientSocket> weak_factory_; |
164 | 168 |
165 const BoundNetLog net_log_; | 169 const BoundNetLog net_log_; |
166 | 170 |
167 DISALLOW_COPY_AND_ASSIGN(SpdyProxyClientSocket); | 171 DISALLOW_COPY_AND_ASSIGN(SpdyProxyClientSocket); |
168 }; | 172 }; |
169 | 173 |
170 } // namespace net | 174 } // namespace net |
171 | 175 |
172 #endif // NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ | 176 #endif // NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ |
OLD | NEW |