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

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

Issue 10912183: Remove DownloadManager::GetDownloadItem in favor of GetDownload() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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/download_item_impl.cc
diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc
index 4e9b2d757b49d7d819f6aea1726b7ff5af20034d..7e75e2e0d18f10b08b4f23a93af84190e94186c2 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -320,8 +320,12 @@ void DownloadItemImpl::UpdateObservers() {
void DownloadItemImpl::DangerousDownloadValidated() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_EQ(IN_PROGRESS, GetState());
DCHECK_EQ(DANGEROUS, GetSafetyState());
+ if (GetState() != IN_PROGRESS)
+ return;
+
UMA_HISTOGRAM_ENUMERATION("Download.DangerousDownloadValidated",
GetDangerType(),
content::DOWNLOAD_DANGER_TYPE_MAX);

Powered by Google App Engine
This is Rietveld 408576698