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

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: Rebase on top of https://codereview.chromium.org/1781983002 since that's going in first. 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
« no previous file with comments | « content/browser/download/save_file.h ('k') | content/browser/download/save_package.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 5085e477c15a535f9eba1aba6ac9fed89209459a..2eab52b0451863fc7b7e5a894e1947b64c3865f7 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,12 @@ 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 +58,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 +73,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();
}
« no previous file with comments | « content/browser/download/save_file.h ('k') | content/browser/download/save_package.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698