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

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

Issue 8404049: Added member data to classes to support download resumption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup, and added fields to DownloadPersistentStoreInfo. Created 9 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/download_resource_handler.h
diff --git a/content/browser/download/download_resource_handler.h b/content/browser/download/download_resource_handler.h
index 016756c58ad68c336a0055f310e8f0db903b5f23..b454547c211c87f3fed738a21bde65f33c72fbac 100644
--- a/content/browser/download/download_resource_handler.h
+++ b/content/browser/download/download_resource_handler.h
@@ -11,10 +11,11 @@
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "base/timer.h"
-#include "content/browser/download/download_file.h"
#include "content/browser/download/download_id.h"
+#include "content/browser/download/download_types.h"
#include "content/browser/renderer_host/global_request_id.h"
#include "content/browser/renderer_host/resource_handler.h"
+#include "net/base/net_errors.h"
class DownloadFileManager;
class ResourceDispatcherHost;
@@ -79,6 +80,10 @@ class DownloadResourceHandler : public ResourceHandler {
void set_content_disposition(const std::string& content_disposition);
+ // How many bytes were read before this request was interrupted. Should be
+ // used only by |ResourceDispatcherHost::BeginDownload()|.
Randy Smith (Not in Mondays) 2011/11/16 18:29:27 I'd like to think about the interface to the IO an
ahendrickson 2011/11/19 20:18:03 Done.
+ void set_start_offset(int64 bytes) { start_offset_ = bytes; }
+
void CheckWriteProgress();
std::string DebugString() const;
@@ -107,6 +112,7 @@ class DownloadResourceHandler : public ResourceHandler {
base::TimeTicks download_start_time_; // used to collect stats.
base::TimeTicks last_read_time_; // used to collect stats.
size_t last_buffer_size_; // used to collect stats.
+ int64 start_offset_;
static const int kReadBufSize = 32768; // bytes
static const int kThrottleTimeMs = 200; // milliseconds

Powered by Google App Engine
This is Rietveld 408576698