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

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

Issue 1833723002: Initialize |bytes_so_far| local variable in SaveFileManager::SaveFinished. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove re-initialization of |bytes_so_far|. 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/save_file_manager.cc
diff --git a/content/browser/download/save_file_manager.cc b/content/browser/download/save_file_manager.cc
index 0c7130e51c9e7645128323d0a32d0ee937c3cf7f..527a7a18fbbb97f0a11f6618c461cecd538087fa 100644
--- a/content/browser/download/save_file_manager.cc
+++ b/content/browser/download/save_file_manager.cc
@@ -206,7 +206,7 @@ void SaveFileManager::SaveFinished(SaveItemId save_item_id,
<< " is_success = " << is_success;
DCHECK_CURRENTLY_ON(BrowserThread::FILE);
- int64_t bytes_so_far;
+ int64_t bytes_so_far = 0;
SaveFile* save_file = LookupSaveFile(save_item_id);
if (save_file != nullptr) {
DCHECK(save_file->InProgress());
@@ -220,8 +220,6 @@ void SaveFileManager::SaveFinished(SaveItemId save_item_id,
// ResourceHandler failed before it got a chance to parse headers
// and metadata.
DCHECK(!is_success);
-
- bytes_so_far = 0;
}
BrowserThread::PostTask(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698