summaryrefslogtreecommitdiffstats
path: root/jingle
diff options
context:
space:
mode:
authorzhaoqin@chromium.org <zhaoqin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-08 00:11:42 +0000
committerzhaoqin@chromium.org <zhaoqin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-08 00:11:42 +0000
commita352869a59d48c3bd3a4a453d73c3392255275ef (patch)
tree1375d4e5900d6df89efd8780d82c5874245bef2a /jingle
parentdc67e1c39fc3d2373391db49465cc1011c23011d (diff)
downloadchromium_src-a352869a59d48c3bd3a4a453d73c3392255275ef.zip
chromium_src-a352869a59d48c3bd3a4a453d73c3392255275ef.tar.gz
chromium_src-a352869a59d48c3bd3a4a453d73c3392255275ef.tar.bz2
fixed issue 128383 - replace GetPeerAddress(AddressList* address) with GetPeerAddress(IPEndPoint* address)
R=szym@chromium.org BUG=128383 TEST=try bot Review URL: https://chromiumcodereview.appspot.com/10491007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141125 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'jingle')
-rw-r--r--jingle/glue/pseudotcp_adapter.cc6
-rw-r--r--jingle/glue/pseudotcp_adapter.h2
-rw-r--r--jingle/notifier/base/fake_ssl_client_socket.cc2
-rw-r--r--jingle/notifier/base/fake_ssl_client_socket.h2
-rw-r--r--jingle/notifier/base/fake_ssl_client_socket_unittest.cc8
-rw-r--r--jingle/notifier/base/proxy_resolving_client_socket.cc2
-rw-r--r--jingle/notifier/base/proxy_resolving_client_socket.h2
7 files changed, 12 insertions, 12 deletions
diff --git a/jingle/glue/pseudotcp_adapter.cc b/jingle/glue/pseudotcp_adapter.cc
index 40e99e3..65fd156 100644
--- a/jingle/glue/pseudotcp_adapter.cc
+++ b/jingle/glue/pseudotcp_adapter.cc
@@ -521,13 +521,13 @@ bool PseudoTcpAdapter::IsConnectedAndIdle() const {
return false;
}
-int PseudoTcpAdapter::GetPeerAddress(net::AddressList* address) const {
+int PseudoTcpAdapter::GetPeerAddress(net::IPEndPoint* address) const {
DCHECK(CalledOnValidThread());
// We don't have a meaningful peer address, but we can't return an
// error, so we return a INADDR_ANY instead.
- net::IPAddressNumber ip_address(4);
- *address = net::AddressList::CreateFromIPAddress(ip_address, 0);
+ net::IPAddressNumber ip_address(net::kIPv4AddressSize);
+ *address = net::IPEndPoint(ip_address, 0);
return net::OK;
}
diff --git a/jingle/glue/pseudotcp_adapter.h b/jingle/glue/pseudotcp_adapter.h
index eed2504..c0114a8 100644
--- a/jingle/glue/pseudotcp_adapter.h
+++ b/jingle/glue/pseudotcp_adapter.h
@@ -42,7 +42,7 @@ class PseudoTcpAdapter : public net::StreamSocket, base::NonThreadSafe {
virtual void Disconnect() OVERRIDE;
virtual bool IsConnected() const OVERRIDE;
virtual bool IsConnectedAndIdle() const OVERRIDE;
- virtual int GetPeerAddress(net::AddressList* address) const OVERRIDE;
+ virtual int GetPeerAddress(net::IPEndPoint* address) const OVERRIDE;
virtual int GetLocalAddress(net::IPEndPoint* address) const OVERRIDE;
virtual const net::BoundNetLog& NetLog() const OVERRIDE;
virtual void SetSubresourceSpeculation() OVERRIDE;
diff --git a/jingle/notifier/base/fake_ssl_client_socket.cc b/jingle/notifier/base/fake_ssl_client_socket.cc
index 7ca6afc..ec8fd26 100644
--- a/jingle/notifier/base/fake_ssl_client_socket.cc
+++ b/jingle/notifier/base/fake_ssl_client_socket.cc
@@ -302,7 +302,7 @@ bool FakeSSLClientSocket::IsConnectedAndIdle() const {
return handshake_completed_ && transport_socket_->IsConnectedAndIdle();
}
-int FakeSSLClientSocket::GetPeerAddress(net::AddressList* address) const {
+int FakeSSLClientSocket::GetPeerAddress(net::IPEndPoint* address) const {
return transport_socket_->GetPeerAddress(address);
}
diff --git a/jingle/notifier/base/fake_ssl_client_socket.h b/jingle/notifier/base/fake_ssl_client_socket.h
index a0ef858..7705a99 100644
--- a/jingle/notifier/base/fake_ssl_client_socket.h
+++ b/jingle/notifier/base/fake_ssl_client_socket.h
@@ -56,7 +56,7 @@ class FakeSSLClientSocket : public net::StreamSocket {
virtual void Disconnect() OVERRIDE;
virtual bool IsConnected() const OVERRIDE;
virtual bool IsConnectedAndIdle() const OVERRIDE;
- virtual int GetPeerAddress(net::AddressList* address) const OVERRIDE;
+ virtual int GetPeerAddress(net::IPEndPoint* address) const OVERRIDE;
virtual int GetLocalAddress(net::IPEndPoint* address) const OVERRIDE;
virtual const net::BoundNetLog& NetLog() const OVERRIDE;
virtual void SetSubresourceSpeculation() OVERRIDE;
diff --git a/jingle/notifier/base/fake_ssl_client_socket_unittest.cc b/jingle/notifier/base/fake_ssl_client_socket_unittest.cc
index 96472df..fddb693 100644
--- a/jingle/notifier/base/fake_ssl_client_socket_unittest.cc
+++ b/jingle/notifier/base/fake_ssl_client_socket_unittest.cc
@@ -56,7 +56,7 @@ class MockClientSocket : public net::StreamSocket {
MOCK_METHOD0(Disconnect, void());
MOCK_CONST_METHOD0(IsConnected, bool());
MOCK_CONST_METHOD0(IsConnectedAndIdle, bool());
- MOCK_CONST_METHOD1(GetPeerAddress, int(net::AddressList*));
+ MOCK_CONST_METHOD1(GetPeerAddress, int(net::IPEndPoint*));
MOCK_CONST_METHOD1(GetLocalAddress, int(net::IPEndPoint*));
MOCK_CONST_METHOD0(NetLog, const net::BoundNetLog&());
MOCK_METHOD0(SetSubresourceSpeculation, void());
@@ -270,12 +270,12 @@ TEST_F(FakeSSLClientSocketTest, PassThroughMethods) {
MockClientSocket* mock_client_socket = new MockClientSocket();
const int kReceiveBufferSize = 10;
const int kSendBufferSize = 20;
- net::AddressList address_list;
+ net::IPEndPoint ip_endpoint(net::IPAddressNumber(net::kIPv4AddressSize), 80);
const int kPeerAddress = 30;
net::BoundNetLog net_log;
EXPECT_CALL(*mock_client_socket, SetReceiveBufferSize(kReceiveBufferSize));
EXPECT_CALL(*mock_client_socket, SetSendBufferSize(kSendBufferSize));
- EXPECT_CALL(*mock_client_socket, GetPeerAddress(&address_list)).
+ EXPECT_CALL(*mock_client_socket, GetPeerAddress(&ip_endpoint)).
WillOnce(Return(kPeerAddress));
EXPECT_CALL(*mock_client_socket, NetLog()).WillOnce(ReturnRef(net_log));
EXPECT_CALL(*mock_client_socket, SetSubresourceSpeculation());
@@ -286,7 +286,7 @@ TEST_F(FakeSSLClientSocketTest, PassThroughMethods) {
fake_ssl_client_socket.SetReceiveBufferSize(kReceiveBufferSize);
fake_ssl_client_socket.SetSendBufferSize(kSendBufferSize);
EXPECT_EQ(kPeerAddress,
- fake_ssl_client_socket.GetPeerAddress(&address_list));
+ fake_ssl_client_socket.GetPeerAddress(&ip_endpoint));
EXPECT_EQ(&net_log, &fake_ssl_client_socket.NetLog());
fake_ssl_client_socket.SetSubresourceSpeculation();
fake_ssl_client_socket.SetOmniboxSpeculation();
diff --git a/jingle/notifier/base/proxy_resolving_client_socket.cc b/jingle/notifier/base/proxy_resolving_client_socket.cc
index 3c3d082c..9329c29 100644
--- a/jingle/notifier/base/proxy_resolving_client_socket.cc
+++ b/jingle/notifier/base/proxy_resolving_client_socket.cc
@@ -305,7 +305,7 @@ bool ProxyResolvingClientSocket::IsConnectedAndIdle() const {
}
int ProxyResolvingClientSocket::GetPeerAddress(
- net::AddressList* address) const {
+ net::IPEndPoint* address) const {
if (transport_.get() && transport_->socket())
return transport_->socket()->GetPeerAddress(address);
NOTREACHED();
diff --git a/jingle/notifier/base/proxy_resolving_client_socket.h b/jingle/notifier/base/proxy_resolving_client_socket.h
index 88b488a..0a0aebf 100644
--- a/jingle/notifier/base/proxy_resolving_client_socket.h
+++ b/jingle/notifier/base/proxy_resolving_client_socket.h
@@ -58,7 +58,7 @@ class ProxyResolvingClientSocket : public net::StreamSocket {
virtual void Disconnect() OVERRIDE;
virtual bool IsConnected() const OVERRIDE;
virtual bool IsConnectedAndIdle() const OVERRIDE;
- virtual int GetPeerAddress(net::AddressList* address) const OVERRIDE;
+ virtual int GetPeerAddress(net::IPEndPoint* address) const OVERRIDE;
virtual int GetLocalAddress(net::IPEndPoint* address) const OVERRIDE;
virtual const net::BoundNetLog& NetLog() const OVERRIDE;
virtual void SetSubresourceSpeculation() OVERRIDE;