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

Side by Side Diff: content/browser/loader/resource_hints_impl.h

Issue 2004453002: Add a Dns preresolve interface in //content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@predictor_dns_browsertest
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_HINTS_IMPL_H_
6 #define CONTENT_BROWSER_LOADER_RESOURCE_HINTS_IMPL_H_
7
8 #include <set>
9
10 #include "base/macros.h"
11 #include "net/base/address_list.h"
12 #include "net/dns/host_resolver.h"
13 #include "net/dns/single_request_host_resolver.h"
14 #include "net/url_request/url_request_context_getter.h"
15
16 namespace content {
17
18 // Scoped to the ResourceDispatcherHostImpl.
Charlie Harrison 2016/05/20 16:30:26 I've added a more detailed comment here in the nex
19 class ResourceHintsController {
20 public:
21 ResourceHintsController();
22 ~ResourceHintsController();
23 int PreresolveUrl(net::URLRequestContextGetter* getter,
24 const GURL& url,
25 const net::CompletionCallback& callback);
26
27 private:
28 struct DnsRequest {
29 DnsRequest(net::HostResolver* resolver);
30 net::SingleRequestHostResolver resolver;
31 net::AddressList addresses;
32 };
33
34 void OnResolveComplete(DnsRequest* request,
35 const net::CompletionCallback& callback,
36 int result);
37
38 std::set<DnsRequest*> pending_dns_requests_;
39
40 DISALLOW_COPY_AND_ASSIGN(ResourceHintsController);
41 };
42
43 } // namespace content
44
45 #endif // CONTENT_BROWSER_LOADER_RESOURCE_HINTS_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/browser/loader/resource_hints_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698