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

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

Issue 2526983002: Refactor ResourceHandler API. (Closed)
Patch Set: Fix stuff Created 4 years, 1 month 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 950e49ad14b3c945f92e51ff519b283ce996d839..4a1a2451a3aef3f1377c7622af6043c7442d36be 100644
--- a/content/browser/download/save_file_resource_handler.h
+++ b/content/browser/download/save_file_resource_handler.h
@@ -50,15 +50,19 @@ class SaveFileResourceHandler : public ResourceHandler {
// Saves the redirected URL to final_url_, we need to use the original
// URL to match original request.
- bool OnRequestRedirected(const net::RedirectInfo& redirect_info,
- ResourceResponse* response,
- bool* defer) override;
+ void OnRequestRedirected(
+ const net::RedirectInfo& redirect_info,
+ ResourceResponse* response,
+ std::unique_ptr<ResourceController> controller) override;
// Sends the download creation information to the download thread.
- bool OnResponseStarted(ResourceResponse* response, bool* defer) override;
+ void OnResponseStarted(
+ ResourceResponse* response,
+ std::unique_ptr<ResourceController> controller) override;
// Pass-through implementation.
- bool OnWillStart(const GURL& url, bool* defer) override;
+ void OnWillStart(const GURL& url,
+ std::unique_ptr<ResourceController> controller) override;
// Creates a new buffer, which will be handed to the download thread for file
// writing and deletion.
@@ -67,10 +71,12 @@ class SaveFileResourceHandler : public ResourceHandler {
int min_size) override;
// Passes the buffer to the download file writer.
- bool OnReadCompleted(int bytes_read, bool* defer) override;
+ void OnReadCompleted(int bytes_read,
+ std::unique_ptr<ResourceController> controller) override;
- void OnResponseCompleted(const net::URLRequestStatus& status,
- bool* defer) override;
+ void OnResponseCompleted(
+ const net::URLRequestStatus& status,
+ std::unique_ptr<ResourceController> controller) override;
// N/A to this flavor of SaveFileResourceHandler.
void OnDataDownloaded(int bytes_downloaded) override;

Powered by Google App Engine
This is Rietveld 408576698