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

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

Issue 209613002: Download shelf autohides on showing in shell, just same as regular open Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move the 'user acted' flag into DownloadItemModelData and get rid of SetOpened/SetShown in Download… Created 6 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
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 0fbd270da05ce3e4bd8dc147d627c55afa3e127d..1b69ec2015d8ea873a0dfbd06510798308f23ec9 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -470,6 +470,11 @@ void DownloadItemImpl::OpenDownload() {
void DownloadItemImpl::ShowDownloadInShell() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ if (!CanShowInFolder())
+ return;
+
+ delegate_->CheckForFileRemoval(this);
+ FOR_EACH_OBSERVER(Observer, observers_, OnDownloadShown(this));
delegate_->ShowDownloadInShell(this);
}
@@ -791,10 +796,6 @@ void DownloadItemImpl::SetIsTemporary(bool temporary) {
is_temporary_ = temporary;
}
-void DownloadItemImpl::SetOpened(bool opened) {
- opened_ = opened;
-}
-
void DownloadItemImpl::SetDisplayName(const base::FilePath& name) {
display_name_ = name;
}

Powered by Google App Engine
This is Rietveld 408576698