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

Unified Diff: components/network_hints/browser/network_hints_message_filter.cc

Issue 2214693002: First step to remove SingleRequestHostResolver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: single Created 4 years, 4 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/predictor.cc ('k') | content/browser/loader/resource_hints_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/network_hints/browser/network_hints_message_filter.cc
diff --git a/components/network_hints/browser/network_hints_message_filter.cc b/components/network_hints/browser/network_hints_message_filter.cc
index 20f8342cc958f1ecb99ca71da798d7c901e628bc..60ea5749ef4041d56dfce6d1c6a7fc00dcf8b6b2 100644
--- a/components/network_hints/browser/network_hints_message_filter.cc
+++ b/components/network_hints/browser/network_hints_message_filter.cc
@@ -12,7 +12,6 @@
#include "net/base/address_list.h"
#include "net/base/net_errors.h"
#include "net/dns/host_resolver.h"
-#include "net/dns/single_request_host_resolver.h"
#include "url/gurl.h"
namespace network_hints {
@@ -41,12 +40,10 @@ class DnsLookupRequest {
// separating it from real navigations in the observer's callback, and
// lets the HostResolver know it can be de-prioritized.
resolve_info.set_is_speculative(true);
- return resolver_.Resolve(
- resolve_info,
- net::DEFAULT_PRIORITY,
- &addresses_,
+ return resolver_->Resolve(
+ resolve_info, net::DEFAULT_PRIORITY, &addresses_,
base::Bind(&DnsLookupRequest::OnLookupFinished, base::Owned(this)),
- net::BoundNetLog());
+ &request_, net::BoundNetLog());
}
private:
@@ -55,7 +52,8 @@ class DnsLookupRequest {
}
const std::string hostname_;
- net::SingleRequestHostResolver resolver_;
+ net::HostResolver* resolver_;
+ std::unique_ptr<net::HostResolver::Request> request_;
net::AddressList addresses_;
DISALLOW_COPY_AND_ASSIGN(DnsLookupRequest);
« no previous file with comments | « chrome/browser/net/predictor.cc ('k') | content/browser/loader/resource_hints_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698