Make all of the methods of ResourceHandler pure virtual.
This forces implementations to consider each case, and avoids subtle bugs that can happen by using the default no-op implementation (like bug 36964).
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/661236
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40358 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/renderer_host/download_resource_handler.h b/chrome/browser/renderer_host/download_resource_handler.h
index bb8d9cd..aefa4a22 100644
--- a/chrome/browser/renderer_host/download_resource_handler.h
+++ b/chrome/browser/renderer_host/download_resource_handler.h
@@ -31,6 +31,8 @@
bool save_as,
const DownloadSaveInfo& save_info);
+ bool OnUploadProgress(int request_id, uint64 position, uint64 size);
+
// Not needed, as this event handler ought to be the final resource.
bool OnRequestRedirected(int request_id, const GURL& url,
ResourceResponse* response, bool* defer);
@@ -38,6 +40,9 @@
// Send the download creation information to the download thread.
bool OnResponseStarted(int request_id, ResourceResponse* response);
+ // Pass-through implementation.
+ bool OnWillStart(int request_id, const GURL& url, bool* defer);
+
// Create a new buffer, which will be handed to the download thread for file
// writing and deletion.
bool OnWillRead(int request_id, net::IOBuffer** buf, int* buf_size,
@@ -48,6 +53,7 @@
bool OnResponseCompleted(int request_id,
const URLRequestStatus& status,
const std::string& security_info);
+ void OnRequestClosed();
// If the content-length header is not present (or contains something other
// than numbers), the incoming content_length is -1 (unknown size).