OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_WRAPPER_H_ | 5 #ifndef NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_WRAPPER_H_ |
6 #define NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_WRAPPER_H_ | 6 #define NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_WRAPPER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 SSLClientSocketPool* ssl_pool, | 62 SSLClientSocketPool* ssl_pool, |
63 const scoped_refptr<TransportSocketParams>& transport_params, | 63 const scoped_refptr<TransportSocketParams>& transport_params, |
64 const scoped_refptr<SSLSocketParams>& ssl_params, | 64 const scoped_refptr<SSLSocketParams>& ssl_params, |
65 const std::string& user_agent, | 65 const std::string& user_agent, |
66 const HostPortPair& endpoint, | 66 const HostPortPair& endpoint, |
67 HttpAuthCache* http_auth_cache, | 67 HttpAuthCache* http_auth_cache, |
68 HttpAuthHandlerFactory* http_auth_handler_factory, | 68 HttpAuthHandlerFactory* http_auth_handler_factory, |
69 SpdySessionPool* spdy_session_pool, | 69 SpdySessionPool* spdy_session_pool, |
70 bool tunnel, | 70 bool tunnel, |
71 ProxyDelegate* proxy_delegate, | 71 ProxyDelegate* proxy_delegate, |
72 const BoundNetLog& net_log); | 72 const NetLogWithSource& net_log); |
73 | 73 |
74 // On destruction Disconnect() is called. | 74 // On destruction Disconnect() is called. |
75 ~HttpProxyClientSocketWrapper() override; | 75 ~HttpProxyClientSocketWrapper() override; |
76 | 76 |
77 // Returns load state while establishing a connection. Returns | 77 // Returns load state while establishing a connection. Returns |
78 // LOAD_STATE_IDLE at other times. | 78 // LOAD_STATE_IDLE at other times. |
79 LoadState GetConnectLoadState() const; | 79 LoadState GetConnectLoadState() const; |
80 | 80 |
81 std::unique_ptr<HttpResponseInfo> GetAdditionalErrorState(); | 81 std::unique_ptr<HttpResponseInfo> GetAdditionalErrorState(); |
82 | 82 |
83 // ProxyClientSocket implementation. | 83 // ProxyClientSocket implementation. |
84 const HttpResponseInfo* GetConnectResponseInfo() const override; | 84 const HttpResponseInfo* GetConnectResponseInfo() const override; |
85 HttpStream* CreateConnectResponseStream() override; | 85 HttpStream* CreateConnectResponseStream() override; |
86 int RestartWithAuth(const CompletionCallback& callback) override; | 86 int RestartWithAuth(const CompletionCallback& callback) override; |
87 const scoped_refptr<HttpAuthController>& GetAuthController() const override; | 87 const scoped_refptr<HttpAuthController>& GetAuthController() const override; |
88 bool IsUsingSpdy() const override; | 88 bool IsUsingSpdy() const override; |
89 NextProto GetProxyNegotiatedProtocol() const override; | 89 NextProto GetProxyNegotiatedProtocol() const override; |
90 | 90 |
91 // StreamSocket implementation. | 91 // StreamSocket implementation. |
92 int Connect(const CompletionCallback& callback) override; | 92 int Connect(const CompletionCallback& callback) override; |
93 void Disconnect() override; | 93 void Disconnect() override; |
94 bool IsConnected() const override; | 94 bool IsConnected() const override; |
95 bool IsConnectedAndIdle() const override; | 95 bool IsConnectedAndIdle() const override; |
96 const BoundNetLog& NetLog() const override; | 96 const NetLogWithSource& NetLog() const override; |
97 void SetSubresourceSpeculation() override; | 97 void SetSubresourceSpeculation() override; |
98 void SetOmniboxSpeculation() override; | 98 void SetOmniboxSpeculation() override; |
99 bool WasEverUsed() const override; | 99 bool WasEverUsed() const override; |
100 bool WasNpnNegotiated() const override; | 100 bool WasNpnNegotiated() const override; |
101 NextProto GetNegotiatedProtocol() const override; | 101 NextProto GetNegotiatedProtocol() const override; |
102 bool GetSSLInfo(SSLInfo* ssl_info) override; | 102 bool GetSSLInfo(SSLInfo* ssl_info) override; |
103 void GetConnectionAttempts(ConnectionAttempts* out) const override; | 103 void GetConnectionAttempts(ConnectionAttempts* out) const override; |
104 void ClearConnectionAttempts() override; | 104 void ClearConnectionAttempts() override; |
105 void AddConnectionAttempts(const ConnectionAttempts& attempts) override; | 105 void AddConnectionAttempts(const ConnectionAttempts& attempts) override; |
106 int64_t GetTotalReceivedBytes() const override; | 106 int64_t GetTotalReceivedBytes() const override; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 194 |
195 // Called when a connection is established. Also used when restarting with | 195 // Called when a connection is established. Also used when restarting with |
196 // AUTH, which will invoke this when ready to restart, after reconnecting | 196 // AUTH, which will invoke this when ready to restart, after reconnecting |
197 // if necessary. | 197 // if necessary. |
198 CompletionCallback connect_callback_; | 198 CompletionCallback connect_callback_; |
199 | 199 |
200 SpdyStreamRequest spdy_stream_request_; | 200 SpdyStreamRequest spdy_stream_request_; |
201 | 201 |
202 scoped_refptr<HttpAuthController> http_auth_controller_; | 202 scoped_refptr<HttpAuthController> http_auth_controller_; |
203 | 203 |
204 BoundNetLog net_log_; | 204 NetLogWithSource net_log_; |
205 | 205 |
206 base::OneShotTimer connect_timer_; | 206 base::OneShotTimer connect_timer_; |
207 | 207 |
208 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketWrapper); | 208 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketWrapper); |
209 }; | 209 }; |
210 | 210 |
211 } // namespace net | 211 } // namespace net |
212 | 212 |
213 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_WRAPPER_H_ | 213 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_WRAPPER_H_ |
OLD | NEW |