summaryrefslogtreecommitdiffstats
path: root/chromium/content/browser/download/save_file_resource_handler.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/browser/download/save_file_resource_handler.h')
-rw-r--r--chromium/content/browser/download/save_file_resource_handler.h35
1 files changed, 17 insertions, 18 deletions
diff --git a/chromium/content/browser/download/save_file_resource_handler.h b/chromium/content/browser/download/save_file_resource_handler.h
index 2079431f9dd..5adbc5c229a 100644
--- a/chromium/content/browser/download/save_file_resource_handler.h
+++ b/chromium/content/browser/download/save_file_resource_handler.h
@@ -11,58 +11,57 @@
#include "content/browser/loader/resource_handler.h"
#include "url/gurl.h"
+namespace net {
+class URLRequest;
+}
+
namespace content {
class SaveFileManager;
// Forwards data to the save thread.
class SaveFileResourceHandler : public ResourceHandler {
public:
- SaveFileResourceHandler(int render_process_host_id,
+ SaveFileResourceHandler(net::URLRequest* request,
+ int render_process_host_id,
int render_view_id,
const GURL& url,
SaveFileManager* manager);
virtual ~SaveFileResourceHandler();
// ResourceHandler Implementation:
- virtual bool OnUploadProgress(int request_id,
- uint64 position,
- uint64 size) OVERRIDE;
+ virtual bool OnUploadProgress(uint64 position, uint64 size) OVERRIDE;
// Saves the redirected URL to final_url_, we need to use the original
// URL to match original request.
- virtual bool OnRequestRedirected(int request_id,
- const GURL& url,
+ virtual bool OnRequestRedirected(const GURL& url,
ResourceResponse* response,
bool* defer) OVERRIDE;
// Sends the download creation information to the download thread.
- virtual bool OnResponseStarted(int request_id,
- ResourceResponse* response,
+ virtual bool OnResponseStarted(ResourceResponse* response,
bool* defer) OVERRIDE;
// Pass-through implementation.
- virtual bool OnWillStart(int request_id,
- const GURL& url,
- bool* defer) OVERRIDE;
+ virtual bool OnWillStart(const GURL& url, bool* defer) OVERRIDE;
+
+ // Pass-through implementation.
+ virtual bool OnBeforeNetworkStart(const GURL& url, bool* defer) OVERRIDE;
// Creates a new buffer, which will be handed to the download thread for file
// writing and deletion.
- virtual bool OnWillRead(int request_id,
- scoped_refptr<net::IOBuffer>* buf,
+ virtual bool OnWillRead(scoped_refptr<net::IOBuffer>* buf,
int* buf_size,
int min_size) OVERRIDE;
// Passes the buffer to the download file writer.
- virtual bool OnReadCompleted(int request_id, int bytes_read,
- bool* defer) OVERRIDE;
+ virtual bool OnReadCompleted(int bytes_read, bool* defer) OVERRIDE;
- virtual void OnResponseCompleted(int request_id,
- const net::URLRequestStatus& status,
+ virtual void OnResponseCompleted(const net::URLRequestStatus& status,
const std::string& security_info,
bool* defer) OVERRIDE;
// N/A to this flavor of SaveFileResourceHandler.
- virtual void OnDataDownloaded(int request_id, int bytes_downloaded) OVERRIDE;
+ virtual void OnDataDownloaded(int bytes_downloaded) OVERRIDE;
// If the content-length header is not present (or contains something other
// than numbers), StringToInt64 returns 0, which indicates 'unknown size' and