summaryrefslogtreecommitdiffstats
path: root/blimp
diff options
context:
space:
mode:
authormartijn <martijn@martijnc.be>2016-02-25 12:17:22 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-25 20:19:45 +0000
commitbb30e6e5e322c24fffcd12ce6498ece955c40bb8 (patch)
tree0e53f4e5e89d7757c83e3d925f86c664fda88889 /blimp
parentcb97b6a175c61a3538d724f1214d537b40df573a (diff)
downloadchromium_src-bb30e6e5e322c24fffcd12ce6498ece955c40bb8.zip
chromium_src-bb30e6e5e322c24fffcd12ce6498ece955c40bb8.tar.gz
chromium_src-bb30e6e5e322c24fffcd12ce6498ece955c40bb8.tar.bz2
Migrate blimp/* to net::IPAddress.
BUG=496258 Review URL: https://codereview.chromium.org/1718333002 Cr-Commit-Position: refs/heads/master@{#377653}
Diffstat (limited to 'blimp')
-rw-r--r--blimp/engine/session/blimp_engine_session.cc10
-rw-r--r--blimp/net/tcp_transport_unittest.cc14
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_;
};