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

Unified Diff: content/browser/loader/navigation_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
Index: content/browser/loader/navigation_resource_handler.cc
diff --git a/content/browser/loader/navigation_resource_handler.cc b/content/browser/loader/navigation_resource_handler.cc
index 0c35c8efd114011ebc1d43898fdef220329b69ce..5e6dd692da0c6a3b875e82c340a71b8d5f3e941a 100644
--- a/content/browser/loader/navigation_resource_handler.cc
+++ b/content/browser/loader/navigation_resource_handler.cc
@@ -154,11 +154,13 @@ void NavigationResourceHandler::OnWillStart(
controller->Resume();
}
-bool NavigationResourceHandler::OnWillRead(scoped_refptr<net::IOBuffer>* buf,
- int* buf_size) {
+void NavigationResourceHandler::OnWillRead(
+ scoped_refptr<net::IOBuffer>* buf,
+ int* buf_size,
+ std::unique_ptr<ResourceController> controller) {
DCHECK(!has_controller());
writer_.OnWillRead(buf, buf_size, -1);
- return true;
+ controller->Resume();
}
void NavigationResourceHandler::OnReadCompleted(
« no previous file with comments | « content/browser/loader/navigation_resource_handler.h ('k') | content/browser/loader/redirect_to_file_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698