summaryrefslogtreecommitdiffstats
path: root/net/socket/socks_client_socket.h
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-27 18:20:07 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-27 18:20:07 +0000
commit37a955a80fe1ebb08570dda4eba2e30861e9256d (patch)
tree8c63d89aca3ef5c7a53a7897a6677a4126b134ed /net/socket/socks_client_socket.h
parentb77656d8e282ad9b2055c912c4631a84c542497b (diff)
downloadchromium_src-37a955a80fe1ebb08570dda4eba2e30861e9256d.zip
chromium_src-37a955a80fe1ebb08570dda4eba2e30861e9256d.tar.gz
chromium_src-37a955a80fe1ebb08570dda4eba2e30861e9256d.tar.bz2
Reverting 19466.
Review URL: http://codereview.chromium.org/150003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19468 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/socks_client_socket.h')
-rw-r--r--net/socket/socks_client_socket.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/net/socket/socks_client_socket.h b/net/socket/socks_client_socket.h
index 295000a..03925ba 100644
--- a/net/socket/socks_client_socket.h
+++ b/net/socket/socks_client_socket.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_SOCKET_SOCKS_CLIENT_SOCKET_H_
-#define NET_SOCKET_SOCKS_CLIENT_SOCKET_H_
+#ifndef NET_BASE_SOCKS_CLIENT_SOCKET_H_
+#define NET_BASE_SOCKS_CLIENT_SOCKET_H_
#include <string>
@@ -54,10 +54,6 @@ class SOCKSClientSocket : public ClientSocket {
#endif
private:
- FRIEND_TEST(SOCKSClientSocketTest, CompleteHandshake);
- FRIEND_TEST(SOCKSClientSocketTest, SOCKS4AFailedDNS);
- FRIEND_TEST(SOCKSClientSocketTest, SOCKS4AIfDomainInIPv6);
-
enum State {
STATE_RESOLVE_HOST,
STATE_RESOLVE_HOST_COMPLETE,
@@ -89,7 +85,7 @@ class SOCKSClientSocket : public ClientSocket {
int DoHandshakeWrite();
int DoHandshakeWriteComplete(int result);
- const std::string BuildHandshakeWriteBuffer() const;
+ void BuildHandshakeWriteBuffer();
CompletionCallbackImpl<SOCKSClientSocket> io_callback_;
@@ -106,18 +102,20 @@ class SOCKSClientSocket : public ClientSocket {
// SOCKS handshake data. The length contains the expected size to
// read or write.
scoped_refptr<IOBuffer> handshake_buf_;
+ int handshake_buf_len_;
// While writing, this buffer stores the complete write handshake data.
// While reading, it stores the handshake information received so far.
- std::string buffer_;
+ scoped_array<char> buffer_;
+ int buffer_len_;
// This becomes true when the SOCKS handshake has completed and the
// overlying connection is free to communicate.
bool completed_handshake_;
// These contain the bytes sent / received by the SOCKS handshake.
- size_t bytes_sent_;
- size_t bytes_received_;
+ int bytes_sent_;
+ int bytes_received_;
// Used to resolve the hostname to which the SOCKS proxy will connect.
SingleRequestHostResolver resolver_;
@@ -129,5 +127,5 @@ class SOCKSClientSocket : public ClientSocket {
} // namespace net
-#endif // NET_SOCKET_SOCKS_CLIENT_SOCKET_H_
+#endif // NET_BASE_SOCKS_CLIENT_SOCKET_H_