Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1664)

Unified Diff: chrome/browser/net/dns_probe_service.cc

Issue 1807663002: Migrate chrome/browser/net/* to net::IPAddress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/net/dns_probe_runner.cc ('k') | chrome/browser/net/dns_probe_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/dns_probe_service.cc
diff --git a/chrome/browser/net/dns_probe_service.cc b/chrome/browser/net/dns_probe_service.cc
index fcec99818e59ea7a0b10b02586f89c9283a7215d..9718dbbc044f34ef5fe95990d02d589588ec4b2c 100644
--- a/chrome/browser/net/dns_probe_service.cc
+++ b/chrome/browser/net/dns_probe_service.cc
@@ -9,6 +9,7 @@
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
#include "base/strings/string_number_conversions.h"
+#include "net/base/ip_address.h"
#include "net/base/ip_endpoint.h"
#include "net/dns/dns_client.h"
#include "net/dns/dns_config_service.h"
@@ -19,7 +20,7 @@ using base::StringToInt;
using error_page::DnsProbeStatus;
using net::DnsClient;
using net::DnsConfig;
-using net::IPAddressNumber;
+using net::IPAddress;
using net::ParseIPLiteralToNumber;
using net::NetworkChangeNotifier;
@@ -38,10 +39,10 @@ const char kGooglePublicDns1[] = "8.8.8.8";
const char kGooglePublicDns2[] = "8.8.4.4";
net::IPEndPoint MakeDnsEndPoint(const std::string& dns_ip_literal) {
- IPAddressNumber dns_ip_number;
- bool rv = ParseIPLiteralToNumber(dns_ip_literal, &dns_ip_number);
+ IPAddress dns_ip_address;
+ bool rv = dns_ip_address.AssignFromIPLiteral(dns_ip_literal);
eroman 2016/03/15 22:30:17 We can probably replace this whole thing with some
martijnc 2016/03/16 20:01:04 Done. Seems a good idea to avoid the AssignFromIPl
DCHECK(rv);
- return net::IPEndPoint(dns_ip_number, net::dns_protocol::kDefaultPort);
+ return net::IPEndPoint(dns_ip_address, net::dns_protocol::kDefaultPort);
}
DnsProbeStatus EvaluateResults(DnsProbeRunner::Result system_result,
« no previous file with comments | « chrome/browser/net/dns_probe_runner.cc ('k') | chrome/browser/net/dns_probe_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698