Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Side by Side Diff: net/socket/socks5_client_socket.h

Issue 667923003: Standardize usage of virtual/override/final in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/socket/socket_test_util.h ('k') | net/socket/socks_client_socket.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_SOCKS5_CLIENT_SOCKET_H_ 5 #ifndef NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_
6 #define NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_ 6 #define NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 20 matching lines...) Expand all
31 // |req_info| contains the hostname and port to which the socket above will 31 // |req_info| contains the hostname and port to which the socket above will
32 // communicate to via the SOCKS layer. 32 // communicate to via the SOCKS layer.
33 // 33 //
34 // Although SOCKS 5 supports 3 different modes of addressing, we will 34 // Although SOCKS 5 supports 3 different modes of addressing, we will
35 // always pass it a hostname. This means the DNS resolving is done 35 // always pass it a hostname. This means the DNS resolving is done
36 // proxy side. 36 // proxy side.
37 SOCKS5ClientSocket(scoped_ptr<ClientSocketHandle> transport_socket, 37 SOCKS5ClientSocket(scoped_ptr<ClientSocketHandle> transport_socket,
38 const HostResolver::RequestInfo& req_info); 38 const HostResolver::RequestInfo& req_info);
39 39
40 // On destruction Disconnect() is called. 40 // On destruction Disconnect() is called.
41 virtual ~SOCKS5ClientSocket(); 41 ~SOCKS5ClientSocket() override;
42 42
43 // StreamSocket implementation. 43 // StreamSocket implementation.
44 44
45 // Does the SOCKS handshake and completes the protocol. 45 // Does the SOCKS handshake and completes the protocol.
46 virtual int Connect(const CompletionCallback& callback) override; 46 int Connect(const CompletionCallback& callback) override;
47 virtual void Disconnect() override; 47 void Disconnect() override;
48 virtual bool IsConnected() const override; 48 bool IsConnected() const override;
49 virtual bool IsConnectedAndIdle() const override; 49 bool IsConnectedAndIdle() const override;
50 virtual const BoundNetLog& NetLog() const override; 50 const BoundNetLog& NetLog() const override;
51 virtual void SetSubresourceSpeculation() override; 51 void SetSubresourceSpeculation() override;
52 virtual void SetOmniboxSpeculation() override; 52 void SetOmniboxSpeculation() override;
53 virtual bool WasEverUsed() const override; 53 bool WasEverUsed() const override;
54 virtual bool UsingTCPFastOpen() const override; 54 bool UsingTCPFastOpen() const override;
55 virtual bool WasNpnNegotiated() const override; 55 bool WasNpnNegotiated() const override;
56 virtual NextProto GetNegotiatedProtocol() const override; 56 NextProto GetNegotiatedProtocol() const override;
57 virtual bool GetSSLInfo(SSLInfo* ssl_info) override; 57 bool GetSSLInfo(SSLInfo* ssl_info) override;
58 58
59 // Socket implementation. 59 // Socket implementation.
60 virtual int Read(IOBuffer* buf, 60 int Read(IOBuffer* buf,
61 int buf_len, 61 int buf_len,
62 const CompletionCallback& callback) override; 62 const CompletionCallback& callback) override;
63 virtual int Write(IOBuffer* buf, 63 int Write(IOBuffer* buf,
64 int buf_len, 64 int buf_len,
65 const CompletionCallback& callback) override; 65 const CompletionCallback& callback) override;
66 66
67 virtual int SetReceiveBufferSize(int32 size) override; 67 int SetReceiveBufferSize(int32 size) override;
68 virtual int SetSendBufferSize(int32 size) override; 68 int SetSendBufferSize(int32 size) override;
69 69
70 virtual int GetPeerAddress(IPEndPoint* address) const override; 70 int GetPeerAddress(IPEndPoint* address) const override;
71 virtual int GetLocalAddress(IPEndPoint* address) const override; 71 int GetLocalAddress(IPEndPoint* address) const override;
72 72
73 private: 73 private:
74 enum State { 74 enum State {
75 STATE_GREET_WRITE, 75 STATE_GREET_WRITE,
76 STATE_GREET_WRITE_COMPLETE, 76 STATE_GREET_WRITE_COMPLETE,
77 STATE_GREET_READ, 77 STATE_GREET_READ,
78 STATE_GREET_READ_COMPLETE, 78 STATE_GREET_READ_COMPLETE,
79 STATE_HANDSHAKE_WRITE, 79 STATE_HANDSHAKE_WRITE,
80 STATE_HANDSHAKE_WRITE_COMPLETE, 80 STATE_HANDSHAKE_WRITE_COMPLETE,
81 STATE_HANDSHAKE_READ, 81 STATE_HANDSHAKE_READ,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 HostResolver::RequestInfo host_request_info_; 149 HostResolver::RequestInfo host_request_info_;
150 150
151 BoundNetLog net_log_; 151 BoundNetLog net_log_;
152 152
153 DISALLOW_COPY_AND_ASSIGN(SOCKS5ClientSocket); 153 DISALLOW_COPY_AND_ASSIGN(SOCKS5ClientSocket);
154 }; 154 };
155 155
156 } // namespace net 156 } // namespace net
157 157
158 #endif // NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_ 158 #endif // NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_
OLDNEW
« no previous file with comments | « net/socket/socket_test_util.h ('k') | net/socket/socks_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698