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

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

Issue 2668603003: Make ResourceHandler::OnWillRead able to complete asynchronously. (Closed)
Patch Set: One bot doesn't like 256 day timers. :( Created 3 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 cf4a5a065b1b73b3d8ad96cfbf0028e392adf60f..4773b5c9f6e29f2a1f519d6c55536a97a0bc3dfb 100644
--- a/content/browser/loader/resource_handler.h
+++ b/content/browser/loader/resource_handler.h
@@ -110,8 +110,9 @@ class CONTENT_EXPORT ResourceHandler
// once data is available, OnReadCompleted will be called.
// TODO(mmenke): Make this method use a ResourceController, and allow it to
// succeed asynchronously.
- virtual bool OnWillRead(scoped_refptr<net::IOBuffer>* buf,
- int* buf_size) = 0;
+ virtual void OnWillRead(scoped_refptr<net::IOBuffer>* buf,
Charlie Harrison 2017/02/16 21:25:04 Please update the comment.
mmenke 2017/03/08 19:16:07 Done.
+ int* buf_size,
+ std::unique_ptr<ResourceController> controller) = 0;
// Data (*bytes_read bytes) was written into the buffer provided by
// OnWillRead. The request will not continue until one of |controller|'s

Powered by Google App Engine
This is Rietveld 408576698