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

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

Issue 10332130: Use defer out-params instead of ResourceDispatcherHostImpl::PauseRequest(...true) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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/browser/renderer_host/resource_handler.h
===================================================================
--- content/browser/renderer_host/resource_handler.h (revision 137742)
+++ content/browser/renderer_host/resource_handler.h (working copy)
@@ -51,9 +51,12 @@
bool* defer) = 0;
// Response headers and meta data are available. If the handler returns
- // false, then the request is cancelled.
+ // false, then the request is cancelled. Set |*defer| to true to defer
+ // processing of the response. Call ResourceDispatcherHostImpl::
+ // ResumeDeferredRequest to continue processing the response.
virtual bool OnResponseStarted(int request_id,
- content::ResourceResponse* response) = 0;
+ content::ResourceResponse* response,
+ bool* defer) = 0;
// Called before the net::URLRequest for |request_id| (whose url is |url|) is
// to be started. If the handler returns false, then the request is
@@ -79,8 +82,11 @@
// Data (*bytes_read bytes) was written into the buffer provided by
// OnWillRead. A return value of false cancels the request, true continues
- // reading data.
- virtual bool OnReadCompleted(int request_id, int* bytes_read) = 0;
+ // reading data. Set |*defer| to true to defer reading more response data.
+ // Call ResourceDispatcherHostImpl::ResumeDeferredRequest to continue reading
+ // response data.
+ virtual bool OnReadCompleted(int request_id, int* bytes_read,
+ bool* defer) = 0;
// The response is complete. The final response status is given. Returns
// false if the handler is deferring the call to a later time. Otherwise,

Powered by Google App Engine
This is Rietveld 408576698