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

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

Issue 8414007: Rearrange Should*Download delegate calls to be more useful and intuitive. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged to TOT. Created 9 years, 2 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/browser/download/download_item.h ('k') | content/browser/download/download_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_item.cc
diff --git a/content/browser/download/download_item.cc b/content/browser/download/download_item.cc
index 0913569c471811ff89a5d92c50d3cb9b2132f8cf..b068954ad04e9b36559fa25a36aee63e2f63f85d 100644
--- a/content/browser/download/download_item.cc
+++ b/content/browser/download/download_item.cc
@@ -296,8 +296,7 @@ void DownloadItem::OpenDownload() {
if (!open_enabled_)
return;
- if (download_manager_->delegate()->ShouldOpenDownload(this))
- content::GetContentClient()->browser()->OpenItem(full_path());
+ content::GetContentClient()->browser()->OpenItem(full_path());
}
void DownloadItem::ShowDownloadInShell() {
@@ -397,7 +396,7 @@ void DownloadItem::MarkAsComplete() {
TransitionTo(COMPLETE);
}
-void DownloadItem::CompleteDelayedDownload() {
+void DownloadItem::DelayedDownloadOpened() {
auto_opened_ = true;
Completed();
}
@@ -619,7 +618,7 @@ void DownloadItem::OnDownloadRenamedToFinalName(const FilePath& full_path) {
Rename(full_path);
- if (download_manager_->delegate()->ShouldCompleteDownload(this)) {
+ if (download_manager_->delegate()->ShouldOpenDownload(this)) {
Completed();
} else {
delegate_delayed_complete_ = true;
« no previous file with comments | « content/browser/download/download_item.h ('k') | content/browser/download/download_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698