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

Unified Diff: net/socket/socks_client_socket.h

Issue 149076: reverting the change 19354, 19356 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/socket_test_util.cc ('k') | net/socket/socks_client_socket_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socks_client_socket.h
===================================================================
--- net/socket/socks_client_socket.h (revision 19356)
+++ net/socket/socks_client_socket.h (working copy)
@@ -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 @@
#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 @@
int DoHandshakeWrite();
int DoHandshakeWriteComplete(int result);
- const std::string BuildHandshakeWriteBuffer() const;
+ void BuildHandshakeWriteBuffer();
CompletionCallbackImpl<SOCKSClientSocket> io_callback_;
@@ -106,10 +102,12 @@
// 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.
@@ -129,5 +127,5 @@
} // namespace net
-#endif // NET_SOCKET_SOCKS_CLIENT_SOCKET_H_
+#endif // NET_BASE_SOCKS_CLIENT_SOCKET_H_
« no previous file with comments | « net/socket/socket_test_util.cc ('k') | net/socket/socks_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698