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

Unified Diff: chrome/browser/local_discovery/service_discovery_client_mac.mm

Issue 1534583002: Migrate Local Discovery from net::IPAddressNumber to net::IPAddress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
Index: chrome/browser/local_discovery/service_discovery_client_mac.mm
diff --git a/chrome/browser/local_discovery/service_discovery_client_mac.mm b/chrome/browser/local_discovery/service_discovery_client_mac.mm
index 1c7cd4a22c5699e2fed5836bb07ca59ea9c7e0cc..0dbbb42dcf6a65d25ecc5b93a8abb43ef2ab6dac 100644
--- a/chrome/browser/local_discovery/service_discovery_client_mac.mm
+++ b/chrome/browser/local_discovery/service_discovery_client_mac.mm
@@ -14,7 +14,7 @@
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
#include "base/threading/thread.h"
-#include "net/base/ip_address_number.h"
+#include "net/base/ip_address.h"
#include "net/base/ip_endpoint.h"
using local_discovery::ServiceWatcherImplMac;
@@ -352,12 +352,13 @@ void ServiceResolverImplMac::NetServiceContainer::OnResolveUpdate(
if (end_point.FromSockAddr(socket, length)) {
service_description_.address =
net::HostPortPair::FromIPEndPoint(end_point);
- service_description_.ip_address = end_point.address();
+ service_description_.ip_address = net::IPAddress(
eroman 2015/12/21 20:47:33 net::IPAddress::address() needs to (eventually) re
martijnc 2016/01/27 22:50:52 Done.
+ &end_point.address().front(), end_point.address().size());
break;
}
}
- if (service_description_.address.host().empty()) {
+ if (!service_description_.address.host().size()) {
VLOG(1) << "Service IP is not resolved: " << service_name_;
callback_runner_->PostTask(
FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698