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

Unified Diff: content/browser/download/download_file_impl.cc

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_file_impl.h ('k') | content/browser/download/download_file_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_file_impl.cc
diff --git a/content/browser/download/download_file_impl.cc b/content/browser/download/download_file_impl.cc
index f06574630c55e7668fd4597794d35bbba7c741c5..4cff9e87558636e2ce1291ae7a0a2cb39da8d6e4 100644
--- a/content/browser/download/download_file_impl.cc
+++ b/content/browser/download/download_file_impl.cc
@@ -86,11 +86,14 @@ int DownloadFile::GetUniquePathNumberWithSuffix(
DownloadFileImpl::DownloadFileImpl(
const DownloadCreateInfo* info,
DownloadRequestHandleInterface* request_handle,
- content::DownloadManager* download_manager)
+ content::DownloadManager* download_manager,
+ bool calculate_hash)
: file_(info->save_info.file_path,
info->url(),
info->referrer_url,
info->received_bytes,
+ calculate_hash,
+ info->save_info.hash_state,
info->save_info.file_stream),
id_(info->download_id),
request_handle_(request_handle),
@@ -103,8 +106,8 @@ DownloadFileImpl::~DownloadFileImpl() {
}
// BaseFile delegated functions.
-net::Error DownloadFileImpl::Initialize(bool calculate_hash) {
- return file_.Initialize(calculate_hash);
+net::Error DownloadFileImpl::Initialize() {
+ return file_.Initialize();
}
net::Error DownloadFileImpl::AppendDataToFile(const char* data,
@@ -148,8 +151,12 @@ int64 DownloadFileImpl::CurrentSpeed() const {
return file_.CurrentSpeed();
}
-bool DownloadFileImpl::GetSha256Hash(std::string* hash) {
- return file_.GetSha256Hash(hash);
+bool DownloadFileImpl::GetHash(std::string* hash) {
+ return file_.GetHash(hash);
+}
+
+std::string DownloadFileImpl::GetHashState() {
+ return file_.GetHashState();
}
// DownloadFileInterface implementation.
« no previous file with comments | « content/browser/download/download_file_impl.h ('k') | content/browser/download/download_file_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698