OLD | NEW |
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 #ifndef NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ | 5 #ifndef NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ |
6 #define NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ | 6 #define NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 const HostPortPair& proxy_server, | 45 const HostPortPair& proxy_server, |
46 HttpAuthCache* http_auth_cache, | 46 HttpAuthCache* http_auth_cache, |
47 HttpAuthHandlerFactory* http_auth_handler_factory, | 47 HttpAuthHandlerFactory* http_auth_handler_factory, |
48 bool tunnel, | 48 bool tunnel, |
49 bool using_spdy, | 49 bool using_spdy, |
50 NextProto protocol_negotiated, | 50 NextProto protocol_negotiated, |
51 ProxyDelegate* proxy_delegate, | 51 ProxyDelegate* proxy_delegate, |
52 bool is_https_proxy); | 52 bool is_https_proxy); |
53 | 53 |
54 // On destruction Disconnect() is called. | 54 // On destruction Disconnect() is called. |
55 virtual ~HttpProxyClientSocket(); | 55 ~HttpProxyClientSocket() override; |
56 | 56 |
57 // ProxyClientSocket implementation. | 57 // ProxyClientSocket implementation. |
58 virtual const HttpResponseInfo* GetConnectResponseInfo() const override; | 58 const HttpResponseInfo* GetConnectResponseInfo() const override; |
59 virtual HttpStream* CreateConnectResponseStream() override; | 59 HttpStream* CreateConnectResponseStream() override; |
60 virtual int RestartWithAuth(const CompletionCallback& callback) override; | 60 int RestartWithAuth(const CompletionCallback& callback) override; |
61 virtual const scoped_refptr<HttpAuthController>& GetAuthController() const | 61 const scoped_refptr<HttpAuthController>& GetAuthController() const override; |
62 override; | 62 bool IsUsingSpdy() const override; |
63 virtual bool IsUsingSpdy() const override; | 63 NextProto GetProtocolNegotiated() const override; |
64 virtual NextProto GetProtocolNegotiated() const override; | |
65 | 64 |
66 // StreamSocket implementation. | 65 // StreamSocket implementation. |
67 virtual int Connect(const CompletionCallback& callback) override; | 66 int Connect(const CompletionCallback& callback) override; |
68 virtual void Disconnect() override; | 67 void Disconnect() override; |
69 virtual bool IsConnected() const override; | 68 bool IsConnected() const override; |
70 virtual bool IsConnectedAndIdle() const override; | 69 bool IsConnectedAndIdle() const override; |
71 virtual const BoundNetLog& NetLog() const override; | 70 const BoundNetLog& NetLog() const override; |
72 virtual void SetSubresourceSpeculation() override; | 71 void SetSubresourceSpeculation() override; |
73 virtual void SetOmniboxSpeculation() override; | 72 void SetOmniboxSpeculation() override; |
74 virtual bool WasEverUsed() const override; | 73 bool WasEverUsed() const override; |
75 virtual bool UsingTCPFastOpen() const override; | 74 bool UsingTCPFastOpen() const override; |
76 virtual bool WasNpnNegotiated() const override; | 75 bool WasNpnNegotiated() const override; |
77 virtual NextProto GetNegotiatedProtocol() const override; | 76 NextProto GetNegotiatedProtocol() const override; |
78 virtual bool GetSSLInfo(SSLInfo* ssl_info) override; | 77 bool GetSSLInfo(SSLInfo* ssl_info) override; |
79 | 78 |
80 // Socket implementation. | 79 // Socket implementation. |
81 virtual int Read(IOBuffer* buf, | 80 int Read(IOBuffer* buf, |
82 int buf_len, | 81 int buf_len, |
83 const CompletionCallback& callback) override; | 82 const CompletionCallback& callback) override; |
84 virtual int Write(IOBuffer* buf, | 83 int Write(IOBuffer* buf, |
85 int buf_len, | 84 int buf_len, |
86 const CompletionCallback& callback) override; | 85 const CompletionCallback& callback) override; |
87 virtual int SetReceiveBufferSize(int32 size) override; | 86 int SetReceiveBufferSize(int32 size) override; |
88 virtual int SetSendBufferSize(int32 size) override; | 87 int SetSendBufferSize(int32 size) override; |
89 virtual int GetPeerAddress(IPEndPoint* address) const override; | 88 int GetPeerAddress(IPEndPoint* address) const override; |
90 virtual int GetLocalAddress(IPEndPoint* address) const override; | 89 int GetLocalAddress(IPEndPoint* address) const override; |
91 | 90 |
92 private: | 91 private: |
93 enum State { | 92 enum State { |
94 STATE_NONE, | 93 STATE_NONE, |
95 STATE_GENERATE_AUTH_TOKEN, | 94 STATE_GENERATE_AUTH_TOKEN, |
96 STATE_GENERATE_AUTH_TOKEN_COMPLETE, | 95 STATE_GENERATE_AUTH_TOKEN_COMPLETE, |
97 STATE_SEND_REQUEST, | 96 STATE_SEND_REQUEST, |
98 STATE_SEND_REQUEST_COMPLETE, | 97 STATE_SEND_REQUEST_COMPLETE, |
99 STATE_READ_HEADERS, | 98 STATE_READ_HEADERS, |
100 STATE_READ_HEADERS_COMPLETE, | 99 STATE_READ_HEADERS_COMPLETE, |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 ProxyDelegate* proxy_delegate_; | 170 ProxyDelegate* proxy_delegate_; |
172 | 171 |
173 const BoundNetLog net_log_; | 172 const BoundNetLog net_log_; |
174 | 173 |
175 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocket); | 174 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocket); |
176 }; | 175 }; |
177 | 176 |
178 } // namespace net | 177 } // namespace net |
179 | 178 |
180 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ | 179 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_H_ |
OLD | NEW |