summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/download_shelf.cc
diff options
context:
space:
mode:
authorrolandsteiner@chromium.org <rolandsteiner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 05:24:41 +0000
committerrolandsteiner@chromium.org <rolandsteiner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 05:24:41 +0000
commitea9058d410a6df42e3ed72e0414fcf4b3607c3cb (patch)
treec7e0c39cab780a9bba614a4e28b9fd96db66b0ea /chrome/browser/download/download_shelf.cc
parentdfc95697b09185a561b2a30080ead8298b9c8668 (diff)
downloadchromium_src-ea9058d410a6df42e3ed72e0414fcf4b3607c3cb.zip
chromium_src-ea9058d410a6df42e3ed72e0414fcf4b3607c3cb.tar.gz
chromium_src-ea9058d410a6df42e3ed72e0414fcf4b3607c3cb.tar.bz2
Commit patch set from http://codereview.chromium.org/149796
(see discussion and history there) BUG=10876 TEST=FilePathTest.MatchesExtension.CompareIgnoreCase git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30168 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_shelf.cc')
-rw-r--r--chrome/browser/download/download_shelf.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/chrome/browser/download/download_shelf.cc b/chrome/browser/download/download_shelf.cc
index b3ccd28..1ab4e77 100644
--- a/chrome/browser/download/download_shelf.cc
+++ b/chrome/browser/download/download_shelf.cc
@@ -32,9 +32,8 @@ bool DownloadShelfContextMenu::ItemIsChecked(int id) const {
return download_->open_when_complete();
}
case ALWAYS_OPEN_TYPE: {
- const FilePath::StringType extension =
- file_util::GetFileExtensionFromPath(download_->full_path());
- return download_->manager()->ShouldOpenFileExtension(extension);
+ return download_->manager()->ShouldOpenFileBasedOnExtension(
+ download_->full_path());
}
case TOGGLE_PAUSE: {
return download_->is_paused();
@@ -96,10 +95,8 @@ void DownloadShelfContextMenu::ExecuteItemCommand(int id) {
download_util::OpenDownload(download_);
break;
case ALWAYS_OPEN_TYPE: {
- const FilePath::StringType extension =
- file_util::GetFileExtensionFromPath(download_->full_path());
- download_->manager()->OpenFilesOfExtension(
- extension, !ItemIsChecked(ALWAYS_OPEN_TYPE));
+ download_->manager()->OpenFilesBasedOnExtension(
+ download_->full_path(), !ItemIsChecked(ALWAYS_OPEN_TYPE));
break;
}
case CANCEL: