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

Unified Diff: content/browser/loader/resource_handler.h

Issue 129173002: Adds the new URLRequest::OnBeforeNetworkStart hook to the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@defer_1_net
Patch Set: Created 6 years, 11 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/browser/loader/resource_handler.h
diff --git a/content/browser/loader/resource_handler.h b/content/browser/loader/resource_handler.h
index af8aebdb855c6c54fd178253dc2fcd1f68e50cdf..0b942bbe3657c45e34ed87f9d1dc43a6f95a431e 100644
--- a/content/browser/loader/resource_handler.h
+++ b/content/browser/loader/resource_handler.h
@@ -73,6 +73,15 @@ class CONTENT_EXPORT ResourceHandler
// until someone calls ResourceDispatcherHost::StartDeferredRequest().
virtual bool OnWillStart(int request_id, const GURL& url, bool* defer) = 0;
+ // Called before the net::URLRequest for |request_id| (whose url is |url|}
+ // uses the network for the first time to load the resource. If the handler
+ // returns false, then the request is cancelled. Otherwise if the return value
+ // is true, the ResourceHandler can delay the request from starting by setting
+ // |*defer = true|. Call controller()->Resume() to continue if deferred.
+ virtual bool OnBeforeNetworkStart(int request_id,
+ const GURL& url,
+ bool* defer) = 0;
+
// Data will be read for the response. Upon success, this method places the
// size and address of the buffer where the data is to be written in its
// out-params. This call will be followed by either OnReadCompleted or

Powered by Google App Engine
This is Rietveld 408576698