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

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: 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
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..26dcfa35ccf8abf85c1397de3ed8516819d84bb4 100644
--- a/content/public/browser/resource_hints.h
+++ b/content/public/browser/resource_hints.h
@@ -6,6 +6,7 @@
#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"
@@ -17,6 +18,10 @@ class URLRequestContextGetter;
namespace content {
+// TODO(csharrison): A cleaner interface woulbe to use ResourceContext instead
+// of URLRequestContextGetter for these functions. The predictor will need to be
+// modified for this purpose to guarantee lifetime semantics.
+
// A Preconnect instance maintains state while a TCP/IP connection is made, and
// then released into the pool of available connections for future use.
@@ -34,6 +39,12 @@ CONTENT_EXPORT void PreconnectUrl(
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(net::URLRequestContextGetter* getter,
+ const GURL& url,
+ const net::CompletionCallback& callback);
+
} // namespace content
#endif // CONTENT_PUBLIC_BROWSER_RESOURCE_HINTS_H_
« content/browser/loader/resource_hints_impl.h ('K') | « content/content_browser.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698