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

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

Issue 1648683002: [Merge to 49] [Downloads] Avoid resetting SecureHash state across an interruption. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: Created 4 years, 11 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/base_file.h ('k') | content/browser/download/download_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/base_file.cc
diff --git a/content/browser/download/base_file.cc b/content/browser/download/base_file.cc
index 7bd2b0bcabf5526705630ec445ce6b819a80228a..8fda8de6a5c48834ab579aabaceedf5c79055e9f 100644
--- a/content/browser/download/base_file.cc
+++ b/content/browser/download/base_file.cc
@@ -203,7 +203,11 @@ void BaseFile::Finish() {
if (calculate_hash_)
secure_hash_->Finish(sha256_hash_, crypto::kSHA256Length);
+ Close();
+}
+void BaseFile::FinishWithError() {
+ DCHECK_CURRENTLY_ON(BrowserThread::FILE);
Close();
}
« no previous file with comments | « content/browser/download/base_file.h ('k') | content/browser/download/download_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698