diff options
-rw-r--r-- | blimp/engine/session/blimp_engine_session.cc | 10 | ||||
-rw-r--r-- | blimp/net/tcp_transport_unittest.cc | 14 |
2 files changed, 5 insertions, 19 deletions
diff --git a/blimp/engine/session/blimp_engine_session.cc b/blimp/engine/session/blimp_engine_session.cc index d84afcf..3196722 100644 --- a/blimp/engine/session/blimp_engine_session.cc +++ b/blimp/engine/session/blimp_engine_session.cc @@ -31,6 +31,7 @@ #include "content/public/browser/render_view_host.h" #include "content/public/browser/render_widget_host.h" #include "content/public/browser/web_contents.h" +#include "net/base/ip_address.h" #include "net/base/net_errors.h" #include "ui/aura/client/default_capture_client.h" #include "ui/aura/env.h" @@ -66,13 +67,8 @@ class FocusRulesImpl : public wm::BaseFocusRules { DISALLOW_COPY_AND_ASSIGN(FocusRulesImpl); }; -net::IPAddressNumber GetIPv4AnyAddress() { - net::IPAddressNumber output; - output.push_back(0); - output.push_back(0); - output.push_back(0); - output.push_back(0); - return output; +net::IPAddress GetIPv4AnyAddress() { + return net::IPAddress(0, 0, 0, 0); } } // namespace diff --git a/blimp/net/tcp_transport_unittest.cc b/blimp/net/tcp_transport_unittest.cc index 148f56a..cef15d3 100644 --- a/blimp/net/tcp_transport_unittest.cc +++ b/blimp/net/tcp_transport_unittest.cc @@ -14,6 +14,7 @@ #include "blimp/net/tcp_engine_transport.h" #include "blimp/net/test_common.h" #include "net/base/address_list.h" +#include "net/base/ip_address.h" #include "net/base/ip_endpoint.h" #include "net/base/net_errors.h" #include "net/base/test_completion_callback.h" @@ -30,8 +31,7 @@ namespace { class TCPTransportTest : public testing::Test { protected: TCPTransportTest() { - net::IPEndPoint local_address; - ParseAddress("127.0.0.1", 0, &local_address); + net::IPEndPoint local_address(net::IPAddress(127, 0, 0, 1), 0); engine_.reset(new TCPEngineTransport(local_address, nullptr)); } @@ -41,16 +41,6 @@ class TCPTransportTest : public testing::Test { return net::AddressList(local_address); } - void ParseAddress(const std::string& ip_str, - uint16_t port, - net::IPEndPoint* address) { - net::IPAddressNumber ip_number; - bool rv = net::ParseIPLiteralToNumber(ip_str, &ip_number); - if (!rv) - return; - *address = net::IPEndPoint(ip_number, port); - } - base::MessageLoopForIO message_loop_; scoped_ptr<TCPEngineTransport> engine_; }; |