| 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> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 | 11 |
| 10 #include "base/basictypes.h" | 12 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 14 #include "base/timer/timer.h" | 16 #include "base/timer/timer.h" |
| 15 #include "net/base/completion_callback.h" | 17 #include "net/base/completion_callback.h" |
| 16 #include "net/base/host_port_pair.h" | 18 #include "net/base/host_port_pair.h" |
| 17 #include "net/base/load_timing_info.h" | 19 #include "net/base/load_timing_info.h" |
| 18 #include "net/http/http_auth_controller.h" | 20 #include "net/http/http_auth_controller.h" |
| 19 #include "net/http/proxy_client_socket.h" | 21 #include "net/http/proxy_client_socket.h" |
| 20 #include "net/log/net_log.h" | 22 #include "net/log/net_log.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 void AddConnectionAttempts(const ConnectionAttempts& attempts) override; | 105 void AddConnectionAttempts(const ConnectionAttempts& attempts) override; |
| 104 int64_t GetTotalReceivedBytes() const override; | 106 int64_t GetTotalReceivedBytes() const override; |
| 105 | 107 |
| 106 // Socket implementation. | 108 // Socket implementation. |
| 107 int Read(IOBuffer* buf, | 109 int Read(IOBuffer* buf, |
| 108 int buf_len, | 110 int buf_len, |
| 109 const CompletionCallback& callback) override; | 111 const CompletionCallback& callback) override; |
| 110 int Write(IOBuffer* buf, | 112 int Write(IOBuffer* buf, |
| 111 int buf_len, | 113 int buf_len, |
| 112 const CompletionCallback& callback) override; | 114 const CompletionCallback& callback) override; |
| 113 int SetReceiveBufferSize(int32 size) override; | 115 int SetReceiveBufferSize(int32_t size) override; |
| 114 int SetSendBufferSize(int32 size) override; | 116 int SetSendBufferSize(int32_t size) override; |
| 115 int GetPeerAddress(IPEndPoint* address) const override; | 117 int GetPeerAddress(IPEndPoint* address) const override; |
| 116 int GetLocalAddress(IPEndPoint* address) const override; | 118 int GetLocalAddress(IPEndPoint* address) const override; |
| 117 | 119 |
| 118 private: | 120 private: |
| 119 enum State { | 121 enum State { |
| 120 STATE_BEGIN_CONNECT, | 122 STATE_BEGIN_CONNECT, |
| 121 STATE_TCP_CONNECT, | 123 STATE_TCP_CONNECT, |
| 122 STATE_TCP_CONNECT_COMPLETE, | 124 STATE_TCP_CONNECT_COMPLETE, |
| 123 STATE_SSL_CONNECT, | 125 STATE_SSL_CONNECT, |
| 124 STATE_SSL_CONNECT_COMPLETE, | 126 STATE_SSL_CONNECT_COMPLETE, |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 BoundNetLog net_log_; | 205 BoundNetLog net_log_; |
| 204 | 206 |
| 205 base::OneShotTimer connect_timer_; | 207 base::OneShotTimer connect_timer_; |
| 206 | 208 |
| 207 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketWrapper); | 209 DISALLOW_COPY_AND_ASSIGN(HttpProxyClientSocketWrapper); |
| 208 }; | 210 }; |
| 209 | 211 |
| 210 } // namespace net | 212 } // namespace net |
| 211 | 213 |
| 212 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_WRAPPER_H_ | 214 #endif // NET_HTTP_HTTP_PROXY_CLIENT_SOCKET_WRAPPER_H_ |
| OLD | NEW |