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

Unified Diff: content/public/browser/resource_hints.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: Comment change 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/loader/resource_hints_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/resource_hints.h
diff --git a/content/public/browser/resource_hints.h b/content/public/browser/resource_hints.h
index 94355aef4551170152b6129617fb237512d1e67a..fdb7778374568c282902efdc7a9b488ff09fa52f 100644
--- a/content/public/browser/resource_hints.h
+++ b/content/public/browser/resource_hints.h
@@ -6,13 +6,14 @@
#define CONTENT_PUBLIC_BROWSER_RESOURCE_HINTS_H_
#include "content/common/content_export.h"
+#include "net/base/completion_callback.h"
#include "net/http/http_request_info.h"
#include "url/gurl.h"
class GURL;
-namespace net {
-class URLRequestContextGetter;
+namespace content {
+class ResourceContext;
}
namespace content {
@@ -27,13 +28,19 @@ namespace content {
// Note: This should only be called on the IO thread, with a valid
// URLRequestContextGetter.
CONTENT_EXPORT void PreconnectUrl(
- net::URLRequestContextGetter* getter,
+ content::ResourceContext* resource_context,
const GURL& url,
const GURL& first_party_for_cookies,
int count,
bool allow_credentials,
net::HttpRequestInfo::RequestMotivation motivation);
+// Issues a DNS request to |url|. Note that these requests are sent to the host
+// resolver with priority net::IDLE.
+CONTENT_EXPORT int PreresolveUrl(content::ResourceContext* resource_context,
+ const GURL& url,
+ const net::CompletionCallback& callback);
+
} // namespace content
#endif // CONTENT_PUBLIC_BROWSER_RESOURCE_HINTS_H_
« no previous file with comments | « content/browser/loader/resource_hints_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698