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

Unified Diff: content/browser/loader/sync_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/sync_resource_handler.h ('k') | content/browser/loader/test_resource_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/sync_resource_handler.cc
diff --git a/content/browser/loader/sync_resource_handler.cc b/content/browser/loader/sync_resource_handler.cc
index 3124302827f6af50a20f49115c05ef6aef8afd91..596fbc931f19e4d1ceba36c64cafd192ebe2d4e5 100644
--- a/content/browser/loader/sync_resource_handler.cc
+++ b/content/browser/loader/sync_resource_handler.cc
@@ -96,11 +96,13 @@ void SyncResourceHandler::OnWillStart(
controller->Resume();
}
-bool SyncResourceHandler::OnWillRead(scoped_refptr<net::IOBuffer>* buf,
- int* buf_size) {
+void SyncResourceHandler::OnWillRead(
+ scoped_refptr<net::IOBuffer>* buf,
+ int* buf_size,
+ std::unique_ptr<ResourceController> controller) {
*buf = read_buffer_.get();
*buf_size = kReadBufSize;
- return true;
+ controller->Resume();
}
void SyncResourceHandler::OnReadCompleted(
« no previous file with comments | « content/browser/loader/sync_resource_handler.h ('k') | content/browser/loader/test_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698