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

Side by Side Diff: net/socket/socks_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/socks5_client_socket.h ('k') | net/socket/socks_client_socket_pool.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_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 17 matching lines...) Expand all
28 class NET_EXPORT_PRIVATE SOCKSClientSocket : public StreamSocket { 28 class NET_EXPORT_PRIVATE SOCKSClientSocket : public StreamSocket {
29 public: 29 public:
30 // |req_info| contains the hostname and port to which the socket above will 30 // |req_info| contains the hostname and port to which the socket above will
31 // communicate to via the socks layer. For testing the referrer is optional. 31 // communicate to via the socks layer. For testing the referrer is optional.
32 SOCKSClientSocket(scoped_ptr<ClientSocketHandle> transport_socket, 32 SOCKSClientSocket(scoped_ptr<ClientSocketHandle> transport_socket,
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 ~SOCKSClientSocket() override;
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 int Connect(const CompletionCallback& callback) override;
44 virtual void Disconnect() override; 44 void Disconnect() override;
45 virtual bool IsConnected() const override; 45 bool IsConnected() const override;
46 virtual bool IsConnectedAndIdle() const override; 46 bool IsConnectedAndIdle() const override;
47 virtual const BoundNetLog& NetLog() const override; 47 const BoundNetLog& NetLog() const override;
48 virtual void SetSubresourceSpeculation() override; 48 void SetSubresourceSpeculation() override;
49 virtual void SetOmniboxSpeculation() override; 49 void SetOmniboxSpeculation() override;
50 virtual bool WasEverUsed() const override; 50 bool WasEverUsed() const override;
51 virtual bool UsingTCPFastOpen() const override; 51 bool UsingTCPFastOpen() const override;
52 virtual bool WasNpnNegotiated() const override; 52 bool WasNpnNegotiated() const override;
53 virtual NextProto GetNegotiatedProtocol() const override; 53 NextProto GetNegotiatedProtocol() const override;
54 virtual bool GetSSLInfo(SSLInfo* ssl_info) override; 54 bool GetSSLInfo(SSLInfo* ssl_info) override;
55 55
56 // Socket implementation. 56 // Socket implementation.
57 virtual int Read(IOBuffer* buf, 57 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 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 int SetReceiveBufferSize(int32 size) override;
65 virtual int SetSendBufferSize(int32 size) override; 65 int SetSendBufferSize(int32 size) override;
66 66
67 virtual int GetPeerAddress(IPEndPoint* address) const override; 67 int GetPeerAddress(IPEndPoint* address) const override;
68 virtual int GetLocalAddress(IPEndPoint* address) const override; 68 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
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_
OLDNEW
« no previous file with comments | « net/socket/socks5_client_socket.h ('k') | net/socket/socks_client_socket_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698