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

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

Issue 3029025: Download code cleanup: (Closed)
Patch Set: rebase'n'final Created 10 years, 5 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 | « chrome/browser/download/download_util.h ('k') | chrome/browser/download/save_package.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_util.cc
diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc
index ee30f0474b4c0264f6ff1b73293b9f3b4eec823f..240ccee60ca3744203a0f8ae5d293bf42d0dde07 100644
--- a/chrome/browser/download/download_util.cc
+++ b/chrome/browser/download/download_util.cc
@@ -29,7 +29,6 @@
#include "chrome/browser/net/chrome_url_request_context.h"
#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
#include "chrome/common/chrome_paths.h"
-#include "chrome/common/extensions/extension.h"
#include "chrome/common/time_format.h"
#include "gfx/canvas_skia.h"
#include "gfx/rect.h"
@@ -70,26 +69,6 @@ namespace download_util {
// so that the animation ends faded out.
static const int kCompleteAnimationCycles = 5;
-// Download opening ------------------------------------------------------------
-
-bool CanOpenDownload(DownloadItem* download) {
- FilePath file_to_use = download->full_path();
- if (!download->original_name().value().empty())
- file_to_use = download->original_name();
-
- return !Extension::IsExtension(file_to_use) &&
- !download->manager()->IsExecutableFile(file_to_use);
-}
-
-void OpenDownload(DownloadItem* download) {
- if (download->state() == DownloadItem::IN_PROGRESS) {
- download->set_open_when_complete(!download->open_when_complete());
- } else if (download->state() == DownloadItem::COMPLETE) {
- download->NotifyObserversDownloadOpened();
- download->manager()->OpenDownload(download, NULL);
- }
-}
-
// Download temporary file creation --------------------------------------------
class DefaultDownloadDirectory {
« no previous file with comments | « chrome/browser/download/download_util.h ('k') | chrome/browser/download/save_package.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698