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

Unified Diff: content/public/test/download_test_observer.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 | « content/public/browser/download_item.h ('k') | content/public/test/mock_download_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/download_test_observer.cc
diff --git a/content/public/test/download_test_observer.cc b/content/public/test/download_test_observer.cc
index ee5961fe531356e821d75a9f07fedb124803f8b3..cc26ff02a45a7ef0ec013ccc80bdf72eed4a341a 100644
--- a/content/public/test/download_test_observer.cc
+++ b/content/public/test/download_test_observer.cc
@@ -221,7 +221,7 @@ void DownloadTestObserver::AcceptDangerousDownload(int32 download_id) {
if (!download_manager_)
return;
DownloadItem* download = download_manager_->GetDownload(download_id);
- if (download && (download->GetState() == DownloadItem::IN_PROGRESS))
+ if (download && !download->IsDone())
download->ValidateDangerousDownload();
}
@@ -231,9 +231,8 @@ void DownloadTestObserver::DenyDangerousDownload(int32 download_id) {
if (!download_manager_)
return;
DownloadItem* download = download_manager_->GetDownload(download_id);
- if (download && (download->GetState() == DownloadItem::IN_PROGRESS)) {
+ if (download && !download->IsDone())
download->Remove();
- }
}
DownloadTestObserverTerminal::DownloadTestObserverTerminal(
« no previous file with comments | « content/public/browser/download_item.h ('k') | content/public/test/mock_download_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698