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

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

Issue 8404049: Added member data to classes to support download resumption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with trunk Created 9 years 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
« no previous file with comments | « content/browser/download/download_resource_handler.cc ('k') | content/browser/download/download_types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_types.h
diff --git a/content/browser/download/download_types.h b/content/browser/download/download_types.h
index f0153a58a74dd107b52cdd40b159aa8ccab76b81..e302ed53247922958e06fd84ed77c90bbde5585b 100644
--- a/content/browser/download/download_types.h
+++ b/content/browser/download/download_types.h
@@ -12,15 +12,28 @@
#include "net/base/file_stream.h"
// Holds the information about how to save a download file.
+// In the case of download continuation, |file_path| is set to the current file
+// name, |offset| is set to the point where we left off, and |hash_state| will
+// hold the state of the hash algorithm where we left off.
struct CONTENT_EXPORT DownloadSaveInfo {
DownloadSaveInfo();
DownloadSaveInfo(const DownloadSaveInfo& info);
~DownloadSaveInfo();
DownloadSaveInfo& operator=(const DownloadSaveInfo& info);
+ // This is usually the tentative final name, but not during resumption
+ // where it will be the intermediate file name.
FilePath file_path;
+
linked_ptr<net::FileStream> file_stream;
+
string16 suggested_name;
+
+ // The file offset at which to start the download. May be 0.
+ int64 offset;
+
+ // The state of the hash at the start of the download. May be empty.
+ std::string hash_state;
};
#endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_TYPES_H_
« no previous file with comments | « content/browser/download/download_resource_handler.cc ('k') | content/browser/download/download_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698