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

Unified Diff: chrome/browser/download/download_danger_prompt.cc

Issue 16007017: [Resumption 10/12] Use DI::IsDone to check for terminal downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with r204343 Created 7 years, 6 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 | chrome/browser/download/download_danger_prompt_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_danger_prompt.cc
diff --git a/chrome/browser/download/download_danger_prompt.cc b/chrome/browser/download/download_danger_prompt.cc
index 2e3e9c7fd128782621485601031dcfa55cc2b2e3..bdd75cc4d58c2eb7c6cc8cabcdf19b80154d5bef 100644
--- a/chrome/browser/download/download_danger_prompt.cc
+++ b/chrome/browser/download/download_danger_prompt.cc
@@ -94,9 +94,9 @@ void DownloadDangerPromptImpl::InvokeActionForTesting(Action action) {
void DownloadDangerPromptImpl::OnDownloadUpdated(
content::DownloadItem* download) {
// If the download is nolonger dangerous (accepted externally) or the download
- // doesn't exist anymore, the download danger prompt is no longer necessary.
- if ((download->GetState() != content::DownloadItem::IN_PROGRESS)
- || !download->IsDangerous())
+ // is in a terminal state, then the download danger prompt is no longer
+ // necessary.
+ if (!download->IsDangerous() || download->IsDone())
Cancel();
}
« no previous file with comments | « no previous file | chrome/browser/download/download_danger_prompt_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698