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

Unified Diff: content/browser/download/save_file.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/save_file.h ('k') | content/browser/download/save_file_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/save_file.cc
diff --git a/content/browser/download/save_file.cc b/content/browser/download/save_file.cc
index 599ad760955be846db92beb768742dde9f372338..d15aaa1e7fc50d213a5e038220da79dd0bfb3339 100644
--- a/content/browser/download/save_file.cc
+++ b/content/browser/download/save_file.cc
@@ -10,8 +10,14 @@
using content::BrowserThread;
-SaveFile::SaveFile(const SaveFileCreateInfo* info)
- : file_(FilePath(), info->url, GURL(), 0, linked_ptr<net::FileStream>()),
+SaveFile::SaveFile(const SaveFileCreateInfo* info, bool calculate_hash)
+ : file_(FilePath(),
+ info->url,
+ GURL(),
+ 0,
+ calculate_hash,
+ "",
+ linked_ptr<net::FileStream>()),
info_(info) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
@@ -23,8 +29,8 @@ SaveFile::~SaveFile() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
}
-net::Error SaveFile::Initialize(bool calculate_hash) {
- return file_.Initialize(calculate_hash);
+net::Error SaveFile::Initialize() {
+ return file_.Initialize();
}
net::Error SaveFile::AppendDataToFile(const char* data, size_t data_len) {
@@ -63,8 +69,8 @@ int64 SaveFile::BytesSoFar() const {
return file_.bytes_so_far();
}
-bool SaveFile::GetSha256Hash(std::string* hash) {
- return file_.GetSha256Hash(hash);
+bool SaveFile::GetHash(std::string* hash) {
+ return file_.GetHash(hash);
}
std::string SaveFile::DebugString() const {
« no previous file with comments | « content/browser/download/save_file.h ('k') | content/browser/download/save_file_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698