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

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

Issue 8801005: base::Bind: Convert Socket::Read. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « net/socket/socket_test_util.cc ('k') | net/socket/socks5_client_socket.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 30 matching lines...) Expand all
41 SOCKS5ClientSocket(ClientSocketHandle* transport_socket, 41 SOCKS5ClientSocket(ClientSocketHandle* transport_socket,
42 const HostResolver::RequestInfo& req_info); 42 const HostResolver::RequestInfo& req_info);
43 43
44 // Deprecated constructor (http://crbug.com/37810) that takes a StreamSocket. 44 // Deprecated constructor (http://crbug.com/37810) that takes a StreamSocket.
45 SOCKS5ClientSocket(StreamSocket* transport_socket, 45 SOCKS5ClientSocket(StreamSocket* transport_socket,
46 const HostResolver::RequestInfo& req_info); 46 const HostResolver::RequestInfo& req_info);
47 47
48 // On destruction Disconnect() is called. 48 // On destruction Disconnect() is called.
49 virtual ~SOCKS5ClientSocket(); 49 virtual ~SOCKS5ClientSocket();
50 50
51 // StreamSocket methods: 51 // StreamSocket implementation.
52 52
53 // Does the SOCKS handshake and completes the protocol. 53 // Does the SOCKS handshake and completes the protocol.
54 virtual int Connect(OldCompletionCallback* callback) OVERRIDE; 54 virtual int Connect(OldCompletionCallback* callback) OVERRIDE;
55 virtual int Connect(const CompletionCallback& callback) OVERRIDE; 55 virtual int Connect(const CompletionCallback& callback) OVERRIDE;
56 virtual void Disconnect() OVERRIDE; 56 virtual void Disconnect() OVERRIDE;
57 virtual bool IsConnected() const OVERRIDE; 57 virtual bool IsConnected() const OVERRIDE;
58 virtual bool IsConnectedAndIdle() const OVERRIDE; 58 virtual bool IsConnectedAndIdle() const OVERRIDE;
59 virtual const BoundNetLog& NetLog() const OVERRIDE; 59 virtual const BoundNetLog& NetLog() const OVERRIDE;
60 virtual void SetSubresourceSpeculation() OVERRIDE; 60 virtual void SetSubresourceSpeculation() OVERRIDE;
61 virtual void SetOmniboxSpeculation() OVERRIDE; 61 virtual void SetOmniboxSpeculation() OVERRIDE;
62 virtual bool WasEverUsed() const OVERRIDE; 62 virtual bool WasEverUsed() const OVERRIDE;
63 virtual bool UsingTCPFastOpen() const OVERRIDE; 63 virtual bool UsingTCPFastOpen() const OVERRIDE;
64 virtual int64 NumBytesRead() const OVERRIDE; 64 virtual int64 NumBytesRead() const OVERRIDE;
65 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; 65 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE;
66 66
67 // Socket methods: 67 // Socket implementation.
68 virtual int Read(IOBuffer* buf, 68 virtual int Read(IOBuffer* buf,
69 int buf_len, 69 int buf_len,
70 OldCompletionCallback* callback) OVERRIDE; 70 OldCompletionCallback* callback) OVERRIDE;
71 virtual int Read(IOBuffer* buf,
72 int buf_len,
73 const CompletionCallback& callback) OVERRIDE;
71 virtual int Write(IOBuffer* buf, 74 virtual int Write(IOBuffer* buf,
72 int buf_len, 75 int buf_len,
73 OldCompletionCallback* callback) OVERRIDE; 76 OldCompletionCallback* callback) OVERRIDE;
74 77
75 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; 78 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
76 virtual bool SetSendBufferSize(int32 size) OVERRIDE; 79 virtual bool SetSendBufferSize(int32 size) OVERRIDE;
77 80
78 virtual int GetPeerAddress(AddressList* address) const OVERRIDE; 81 virtual int GetPeerAddress(AddressList* address) const OVERRIDE;
79 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; 82 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE;
80 83
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 HostResolver::RequestInfo host_request_info_; 158 HostResolver::RequestInfo host_request_info_;
156 159
157 BoundNetLog net_log_; 160 BoundNetLog net_log_;
158 161
159 DISALLOW_COPY_AND_ASSIGN(SOCKS5ClientSocket); 162 DISALLOW_COPY_AND_ASSIGN(SOCKS5ClientSocket);
160 }; 163 };
161 164
162 } // namespace net 165 } // namespace net
163 166
164 #endif // NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_ 167 #endif // NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_
OLDNEW
« no previous file with comments | « net/socket/socket_test_util.cc ('k') | net/socket/socks5_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698