summaryrefslogtreecommitdiffstats
path: root/net/socket
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-11 23:35:06 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-11 23:35:06 +0000
commit594a40146a4e658c9ca8b1b0117229d40ea01fed (patch)
treef3585d131d583ce6dbdcc3e6395074799461fe5f /net/socket
parent0317b3677dcb8315ca64c4b85586b6a34b9916d0 (diff)
downloadchromium_src-594a40146a4e658c9ca8b1b0117229d40ea01fed.zip
chromium_src-594a40146a4e658c9ca8b1b0117229d40ea01fed.tar.gz
chromium_src-594a40146a4e658c9ca8b1b0117229d40ea01fed.tar.bz2
Change DeterministicMockTCPClientSocket to set the peer address from the connect data.
Review URL: https://chromiumcodereview.appspot.com/10704166 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146238 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket')
-rw-r--r--net/socket/socket_test_util.cc4
-rw-r--r--net/socket/socket_test_util.h12
2 files changed, 10 insertions, 6 deletions
diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc
index d51d5c6..ef6d38c 100644
--- a/net/socket/socket_test_util.cc
+++ b/net/socket/socket_test_util.cc
@@ -942,7 +942,9 @@ DeterministicMockTCPClientSocket::DeterministicMockTCPClientSocket(
read_buf_len_(0),
read_pending_(false),
data_(data),
- was_used_to_convey_data_(false) {}
+ was_used_to_convey_data_(false) {
+ peer_addr_ = data->connect_data().peer_addr;
+}
DeterministicMockTCPClientSocket::~DeterministicMockTCPClientSocket() {}
diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h
index c40ec4e..384452c 100644
--- a/net/socket/socket_test_util.h
+++ b/net/socket/socket_test_util.h
@@ -674,9 +674,10 @@ class MockTCPClientSocket : public MockClientSocket, public AsyncSocket {
bool was_used_to_convey_data_;
};
-class DeterministicMockTCPClientSocket : public MockClientSocket,
- public AsyncSocket,
- public base::SupportsWeakPtr<DeterministicMockTCPClientSocket> {
+class DeterministicMockTCPClientSocket
+ : public MockClientSocket,
+ public AsyncSocket,
+ public base::SupportsWeakPtr<DeterministicMockTCPClientSocket> {
public:
DeterministicMockTCPClientSocket(net::NetLog* net_log,
DeterministicSocketData* data);
@@ -780,8 +781,9 @@ class MockSSLClientSocket : public MockClientSocket, public AsyncSocket {
NextProto protocol_negotiated_;
};
-class MockUDPClientSocket : public DatagramClientSocket,
- public AsyncSocket {
+class MockUDPClientSocket
+ : public DatagramClientSocket,
+ public AsyncSocket {
public:
MockUDPClientSocket(SocketDataProvider* data, net::NetLog* net_log);
virtual ~MockUDPClientSocket();