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

Unified Diff: content/public/test/download_test_observer.cc

Issue 14947007: [Downloads] Allow acquiring dangerous download file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 7 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 17d763efb5a33e8bc2a1b7f1e01a5b84cdb71ab4..ee5961fe531356e821d75a9f07fedb124803f8b3 100644
--- a/content/public/test/download_test_observer.cc
+++ b/content/public/test/download_test_observer.cc
@@ -141,7 +141,7 @@ void DownloadTestObserver::OnDownloadUpdated(DownloadItem* download) {
!ContainsKey(dangerous_downloads_seen_, download->GetId())) {
dangerous_downloads_seen_.insert(download->GetId());
- // Calling DangerousDownloadValidated() at this point will
+ // Calling ValidateDangerousDownload() at this point will
// cause the download to be completed twice. Do what the real UI
// code does: make the call as a delayed task.
switch (dangerous_download_action_) {
@@ -222,7 +222,7 @@ void DownloadTestObserver::AcceptDangerousDownload(int32 download_id) {
return;
DownloadItem* download = download_manager_->GetDownload(download_id);
if (download && (download->GetState() == DownloadItem::IN_PROGRESS))
- download->DangerousDownloadValidated();
+ download->ValidateDangerousDownload();
}
void DownloadTestObserver::DenyDangerousDownload(int32 download_id) {
@@ -232,8 +232,7 @@ void DownloadTestObserver::DenyDangerousDownload(int32 download_id) {
return;
DownloadItem* download = download_manager_->GetDownload(download_id);
if (download && (download->GetState() == DownloadItem::IN_PROGRESS)) {
- download->Cancel(true);
- download->Delete(DownloadItem::DELETE_DUE_TO_USER_DISCARD);
+ download->Remove();
}
}
« 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