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

Unified Diff: content/browser/download/save_file_resource_handler.h

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/download/save_file_resource_handler.h
diff --git a/content/browser/download/save_file_resource_handler.h b/content/browser/download/save_file_resource_handler.h
index 63f061d7b19f27f2a068dfdd87186c090e083110..334837bc9fa6b3bc922e14363a5f23611f0cd869 100644
--- a/content/browser/download/save_file_resource_handler.h
+++ b/content/browser/download/save_file_resource_handler.h
@@ -67,8 +67,9 @@ class SaveFileResourceHandler : public ResourceHandler {
// Creates a new buffer, which will be handed to the download thread for file
// writing and deletion.
- bool OnWillRead(scoped_refptr<net::IOBuffer>* buf,
- int* buf_size) override;
+ void OnWillRead(scoped_refptr<net::IOBuffer>* buf,
+ int* buf_size,
+ std::unique_ptr<ResourceController> controller) override;
// Passes the buffer to the download file writer.
void OnReadCompleted(int bytes_read,
« no previous file with comments | « content/browser/download/download_resource_handler.cc ('k') | content/browser/download/save_file_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698