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_SOCKET_SOCKS_CLIENT_SOCKET_H_ | 5 #ifndef NET_SOCKET_SOCKS_CLIENT_SOCKET_H_ |
6 #define NET_SOCKET_SOCKS_CLIENT_SOCKET_H_ | 6 #define NET_SOCKET_SOCKS_CLIENT_SOCKET_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 const HostResolver::RequestInfo& req_info, | 33 const HostResolver::RequestInfo& req_info, |
34 RequestPriority priority, | 34 RequestPriority priority, |
35 HostResolver* host_resolver); | 35 HostResolver* host_resolver); |
36 | 36 |
37 // On destruction Disconnect() is called. | 37 // On destruction Disconnect() is called. |
38 virtual ~SOCKSClientSocket(); | 38 virtual ~SOCKSClientSocket(); |
39 | 39 |
40 // StreamSocket implementation. | 40 // StreamSocket implementation. |
41 | 41 |
42 // Does the SOCKS handshake and completes the protocol. | 42 // Does the SOCKS handshake and completes the protocol. |
43 virtual int Connect(const CompletionCallback& callback) OVERRIDE; | 43 virtual int Connect(const CompletionCallback& callback) override; |
44 virtual void Disconnect() OVERRIDE; | 44 virtual void Disconnect() override; |
45 virtual bool IsConnected() const OVERRIDE; | 45 virtual bool IsConnected() const override; |
46 virtual bool IsConnectedAndIdle() const OVERRIDE; | 46 virtual bool IsConnectedAndIdle() const override; |
47 virtual const BoundNetLog& NetLog() const OVERRIDE; | 47 virtual const BoundNetLog& NetLog() const override; |
48 virtual void SetSubresourceSpeculation() OVERRIDE; | 48 virtual void SetSubresourceSpeculation() override; |
49 virtual void SetOmniboxSpeculation() OVERRIDE; | 49 virtual void SetOmniboxSpeculation() override; |
50 virtual bool WasEverUsed() const OVERRIDE; | 50 virtual bool WasEverUsed() const override; |
51 virtual bool UsingTCPFastOpen() const OVERRIDE; | 51 virtual bool UsingTCPFastOpen() const override; |
52 virtual bool WasNpnNegotiated() const OVERRIDE; | 52 virtual bool WasNpnNegotiated() const override; |
53 virtual NextProto GetNegotiatedProtocol() const OVERRIDE; | 53 virtual NextProto GetNegotiatedProtocol() const override; |
54 virtual bool GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; | 54 virtual bool GetSSLInfo(SSLInfo* ssl_info) override; |
55 | 55 |
56 // Socket implementation. | 56 // Socket implementation. |
57 virtual int Read(IOBuffer* buf, | 57 virtual int Read(IOBuffer* buf, |
58 int buf_len, | 58 int buf_len, |
59 const CompletionCallback& callback) OVERRIDE; | 59 const CompletionCallback& callback) override; |
60 virtual int Write(IOBuffer* buf, | 60 virtual int Write(IOBuffer* buf, |
61 int buf_len, | 61 int buf_len, |
62 const CompletionCallback& callback) OVERRIDE; | 62 const CompletionCallback& callback) override; |
63 | 63 |
64 virtual int SetReceiveBufferSize(int32 size) OVERRIDE; | 64 virtual int SetReceiveBufferSize(int32 size) override; |
65 virtual int SetSendBufferSize(int32 size) OVERRIDE; | 65 virtual int SetSendBufferSize(int32 size) override; |
66 | 66 |
67 virtual int GetPeerAddress(IPEndPoint* address) const OVERRIDE; | 67 virtual int GetPeerAddress(IPEndPoint* address) const override; |
68 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; | 68 virtual int GetLocalAddress(IPEndPoint* address) const override; |
69 | 69 |
70 private: | 70 private: |
71 FRIEND_TEST_ALL_PREFIXES(SOCKSClientSocketTest, CompleteHandshake); | 71 FRIEND_TEST_ALL_PREFIXES(SOCKSClientSocketTest, CompleteHandshake); |
72 FRIEND_TEST_ALL_PREFIXES(SOCKSClientSocketTest, SOCKS4AFailedDNS); | 72 FRIEND_TEST_ALL_PREFIXES(SOCKSClientSocketTest, SOCKS4AFailedDNS); |
73 FRIEND_TEST_ALL_PREFIXES(SOCKSClientSocketTest, SOCKS4AIfDomainInIPv6); | 73 FRIEND_TEST_ALL_PREFIXES(SOCKSClientSocketTest, SOCKS4AIfDomainInIPv6); |
74 | 74 |
75 enum State { | 75 enum State { |
76 STATE_RESOLVE_HOST, | 76 STATE_RESOLVE_HOST, |
77 STATE_RESOLVE_HOST_COMPLETE, | 77 STATE_RESOLVE_HOST_COMPLETE, |
78 STATE_HANDSHAKE_WRITE, | 78 STATE_HANDSHAKE_WRITE, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 RequestPriority priority_; | 131 RequestPriority priority_; |
132 | 132 |
133 BoundNetLog net_log_; | 133 BoundNetLog net_log_; |
134 | 134 |
135 DISALLOW_COPY_AND_ASSIGN(SOCKSClientSocket); | 135 DISALLOW_COPY_AND_ASSIGN(SOCKSClientSocket); |
136 }; | 136 }; |
137 | 137 |
138 } // namespace net | 138 } // namespace net |
139 | 139 |
140 #endif // NET_SOCKET_SOCKS_CLIENT_SOCKET_H_ | 140 #endif // NET_SOCKET_SOCKS_CLIENT_SOCKET_H_ |
OLD | NEW |