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

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

Issue 1751603002: [Downloads] Rework how hashes are calculated for download files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try to appease MSVC Created 4 years, 9 months 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/save_file.cc
diff --git a/content/browser/download/save_file.cc b/content/browser/download/save_file.cc
index 5085e477c15a535f9eba1aba6ac9fed89209459a..1ba66e2803a0ce1bb64b9e62aa37a7001337a6dd 100644
--- a/content/browser/download/save_file.cc
+++ b/content/browser/download/save_file.cc
@@ -14,15 +14,7 @@ namespace content {
// Unfortunately, as it is, constructors of SaveFile don't always
// have access to the SavePackage at this point.
SaveFile::SaveFile(const SaveFileCreateInfo* info, bool calculate_hash)
- : file_(base::FilePath(),
- info->url,
- GURL(),
- 0,
- calculate_hash,
- std::string(),
- base::File(),
- net::BoundNetLog()),
- info_(info) {
+ : file_(net::BoundNetLog()), info_(info) {
DCHECK_CURRENTLY_ON(BrowserThread::FILE);
DCHECK(info);
@@ -34,7 +26,8 @@ SaveFile::~SaveFile() {
}
DownloadInterruptReason SaveFile::Initialize() {
- return file_.Initialize(base::FilePath());
+ return file_.Initialize(base::FilePath(), base::FilePath(), base::File(), 0,
+ std::string(), scoped_ptr<crypto::SecureHash>());
}
DownloadInterruptReason SaveFile::AppendDataToFile(const char* data,
@@ -61,7 +54,7 @@ void SaveFile::Finish() {
void SaveFile::AnnotateWithSourceInformation() {
// TODO(gbillock): If this method is called, it should set the
// file_.SetClientGuid() method first.
- file_.AnnotateWithSourceInformation();
+ NOTREACHED();
}
base::FilePath SaveFile::FullPath() const {
@@ -76,10 +69,6 @@ int64_t SaveFile::BytesSoFar() const {
return file_.bytes_so_far();
}
-bool SaveFile::GetHash(std::string* hash) {
- return file_.GetHash(hash);
-}
-
std::string SaveFile::DebugString() const {
return file_.DebugString();
}

Powered by Google App Engine
This is Rietveld 408576698