OLD | NEW |
1 // Copyright (c) 2011 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> |
(...skipping 29 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 HttpAuthCache* auth_cache, | 50 HttpAuthController* auth_controller); |
51 HttpAuthHandlerFactory* auth_handler_factory); | |
52 | |
53 | 51 |
54 // On destruction Disconnect() is called. | 52 // On destruction Disconnect() is called. |
55 virtual ~SpdyProxyClientSocket(); | 53 virtual ~SpdyProxyClientSocket(); |
56 | 54 |
57 const scoped_refptr<HttpAuthController>& auth_controller() { | |
58 return auth_; | |
59 } | |
60 | |
61 // ProxyClientSocket methods: | 55 // ProxyClientSocket methods: |
62 virtual const HttpResponseInfo* GetConnectResponseInfo() const OVERRIDE; | 56 virtual const HttpResponseInfo* GetConnectResponseInfo() const OVERRIDE; |
| 57 virtual int RestartWithAuth(const CompletionCallback& callback) OVERRIDE; |
| 58 virtual const scoped_refptr<HttpAuthController>& GetAuthController() OVERRIDE; |
63 | 59 |
64 // In the event of a non-200 response to the CONNECT request, this | 60 // In the event of a non-200 response to the CONNECT request, this |
65 // method may be called to return an HttpStream in order to read | 61 // method may be called to return an HttpStream in order to read |
66 // the response body. | 62 // the response body. |
67 virtual HttpStream* CreateConnectResponseStream() OVERRIDE; | 63 virtual HttpStream* CreateConnectResponseStream() OVERRIDE; |
68 | 64 |
69 // StreamSocket implementation. | 65 // StreamSocket implementation. |
70 virtual int Connect(const CompletionCallback& callback) OVERRIDE; | 66 virtual int Connect(const CompletionCallback& callback) OVERRIDE; |
71 virtual void Disconnect() OVERRIDE; | 67 virtual void Disconnect() OVERRIDE; |
72 virtual bool IsConnected() const OVERRIDE; | 68 virtual bool IsConnected() const OVERRIDE; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 base::WeakPtrFactory<SpdyProxyClientSocket> weak_factory_; | 163 base::WeakPtrFactory<SpdyProxyClientSocket> weak_factory_; |
168 | 164 |
169 const BoundNetLog net_log_; | 165 const BoundNetLog net_log_; |
170 | 166 |
171 DISALLOW_COPY_AND_ASSIGN(SpdyProxyClientSocket); | 167 DISALLOW_COPY_AND_ASSIGN(SpdyProxyClientSocket); |
172 }; | 168 }; |
173 | 169 |
174 } // namespace net | 170 } // namespace net |
175 | 171 |
176 #endif // NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ | 172 #endif // NET_SPDY_SPDY_PROXY_CLIENT_SOCKET_H_ |
OLD | NEW |