Commit 594a4014 authored by rch@chromium.org's avatar rch@chromium.org

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
parent 0317b367
...@@ -942,7 +942,9 @@ DeterministicMockTCPClientSocket::DeterministicMockTCPClientSocket( ...@@ -942,7 +942,9 @@ DeterministicMockTCPClientSocket::DeterministicMockTCPClientSocket(
read_buf_len_(0), read_buf_len_(0),
read_pending_(false), read_pending_(false),
data_(data), data_(data),
was_used_to_convey_data_(false) {} was_used_to_convey_data_(false) {
peer_addr_ = data->connect_data().peer_addr;
}
DeterministicMockTCPClientSocket::~DeterministicMockTCPClientSocket() {} DeterministicMockTCPClientSocket::~DeterministicMockTCPClientSocket() {}
......
...@@ -674,7 +674,8 @@ class MockTCPClientSocket : public MockClientSocket, public AsyncSocket { ...@@ -674,7 +674,8 @@ class MockTCPClientSocket : public MockClientSocket, public AsyncSocket {
bool was_used_to_convey_data_; bool was_used_to_convey_data_;
}; };
class DeterministicMockTCPClientSocket : public MockClientSocket, class DeterministicMockTCPClientSocket
: public MockClientSocket,
public AsyncSocket, public AsyncSocket,
public base::SupportsWeakPtr<DeterministicMockTCPClientSocket> { public base::SupportsWeakPtr<DeterministicMockTCPClientSocket> {
public: public:
...@@ -780,7 +781,8 @@ class MockSSLClientSocket : public MockClientSocket, public AsyncSocket { ...@@ -780,7 +781,8 @@ class MockSSLClientSocket : public MockClientSocket, public AsyncSocket {
NextProto protocol_negotiated_; NextProto protocol_negotiated_;
}; };
class MockUDPClientSocket : public DatagramClientSocket, class MockUDPClientSocket
: public DatagramClientSocket,
public AsyncSocket { public AsyncSocket {
public: public:
MockUDPClientSocket(SocketDataProvider* data, net::NetLog* net_log); MockUDPClientSocket(SocketDataProvider* data, net::NetLog* net_log);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment