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

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

Issue 2168093002: Reorganizing few DCHECKs for better catching of failure. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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_item.cc
diff --git a/content/browser/download/save_item.cc b/content/browser/download/save_item.cc
index d19baab43c81f017446380cf0698cd0e0fb3078c..8479a09414ed3a59b4696280f2cf7b629404c4dc 100644
--- a/content/browser/download/save_item.cc
+++ b/content/browser/download/save_item.cc
@@ -86,14 +86,16 @@ void SaveItem::Cancel() {
// Set finish state for a save item
void SaveItem::Finish(int64_t size, bool is_success) {
- DCHECK(has_final_name() || !is_success_);
+ DCHECK(has_final_name());
+ DCHECK(!is_success_);
no sievers 2016/07/21 19:08:01 same here, cannot be split.
AKV 2016/07/22 14:26:13 Done.
state_ = COMPLETE;
is_success_ = is_success;
UpdateSize(size);
}
void SaveItem::SetTargetPath(const base::FilePath& full_path) {
- DCHECK(!full_path.empty() && !has_final_name());
+ DCHECK(!full_path.empty());
+ DCHECK(!has_final_name());
full_path_ = full_path;
}
« content/browser/browser_thread_impl.cc ('K') | « content/browser/browser_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698