Chromium Code Reviews| Index: net/dns/mojo_host_resolver_impl.cc |
| diff --git a/net/dns/mojo_host_resolver_impl.cc b/net/dns/mojo_host_resolver_impl.cc |
| index 13f61d51dd4d60d727e90313e153fc35a890f9be..dd759fb0388265436dcfaa78af2461f530a2adac 100644 |
| --- a/net/dns/mojo_host_resolver_impl.cc |
| +++ b/net/dns/mojo_host_resolver_impl.cc |
| @@ -11,7 +11,6 @@ |
| #include "net/base/net_errors.h" |
| #include "net/base/network_interfaces.h" |
| #include "net/dns/host_resolver.h" |
| -#include "net/dns/mojo_host_type_converters.h" |
| namespace net { |
| @@ -57,11 +56,10 @@ MojoHostResolverImpl::~MojoHostResolverImpl() { |
| } |
| void MojoHostResolverImpl::Resolve( |
| - interfaces::HostResolverRequestInfoPtr request_info, |
| + std::unique_ptr<HostResolver::RequestInfo> request_info, |
| interfaces::HostResolverRequestClientPtr client) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| - HostResolver::RequestInfo host_request_info = |
| - request_info->To<net::HostResolver::RequestInfo>(); |
| + HostResolver::RequestInfo& host_request_info = *request_info; |
|
eroman
2016/06/24 18:48:09
Can you instead delete this line and just directly
Sam McNally
2016/06/27 01:41:31
Done.
|
| if (host_request_info.is_my_ip_address()) { |
| // The proxy resolver running inside a sandbox may not be able to get the |
| // correct host name. Instead, fill it ourself if the request is for our own |
| @@ -124,11 +122,7 @@ void MojoHostResolverImpl::Job::OnResolveDone(int result) { |
| for (const auto& address : result_) { |
| DVLOG(1) << address.ToString(); |
| } |
| - if (result == OK) |
| - client_->ReportResult(result, interfaces::AddressList::From(result_)); |
| - else |
| - client_->ReportResult(result, nullptr); |
| - |
| + client_->ReportResult(result, result_); |
| resolver_service_->DeleteJob(this); |
| } |