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

Unified Diff: content/browser/loader/stream_resource_handler.cc

Issue 2668603003: Make ResourceHandler::OnWillRead able to complete asynchronously. (Closed)
Patch Set: Response to comments Created 3 years, 9 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/stream_resource_handler.h ('k') | content/browser/loader/sync_resource_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/stream_resource_handler.cc
diff --git a/content/browser/loader/stream_resource_handler.cc b/content/browser/loader/stream_resource_handler.cc
index 17e232a674291faf53caa3c2bea38cabc4e02fa7..c8ac91809147620b52a77bc7c80051d406b06923 100644
--- a/content/browser/loader/stream_resource_handler.cc
+++ b/content/browser/loader/stream_resource_handler.cc
@@ -43,10 +43,12 @@ void StreamResourceHandler::OnWillStart(
controller->Resume();
}
-bool StreamResourceHandler::OnWillRead(scoped_refptr<net::IOBuffer>* buf,
- int* buf_size) {
+void StreamResourceHandler::OnWillRead(
+ scoped_refptr<net::IOBuffer>* buf,
+ int* buf_size,
+ std::unique_ptr<ResourceController> controller) {
writer_.OnWillRead(buf, buf_size, -1);
- return true;
+ controller->Resume();
}
void StreamResourceHandler::OnReadCompleted(
« no previous file with comments | « content/browser/loader/stream_resource_handler.h ('k') | content/browser/loader/sync_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698