diff options
author | rolandsteiner@chromium.org <rolandsteiner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-27 05:54:51 +0000 |
---|---|---|
committer | rolandsteiner@chromium.org <rolandsteiner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-27 05:54:51 +0000 |
commit | f6cb1e077174da5c9447271b8731e103a62db6ba (patch) | |
tree | 037db348655e730b203374ac632b2d793a3bd055 /chrome/browser/download/download_shelf.cc | |
parent | 47f782c2f1e3c1f3c95e345494b6f5a1a670fd21 (diff) | |
download | chromium_src-f6cb1e077174da5c9447271b8731e103a62db6ba.zip chromium_src-f6cb1e077174da5c9447271b8731e103a62db6ba.tar.gz chromium_src-f6cb1e077174da5c9447271b8731e103a62db6ba.tar.bz2 |
Revert 30168 - Commit patch set from http://codereview.chromium.org/149796
(see discussion and history there)
BUG=10876
TEST=FilePathTest.MatchesExtension.CompareIgnoreCase
TBR=rolandsteiner@chromium.org
Review URL: http://codereview.chromium.org/337042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30170 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_shelf.cc')
-rw-r--r-- | chrome/browser/download/download_shelf.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/chrome/browser/download/download_shelf.cc b/chrome/browser/download/download_shelf.cc index 1ab4e77..b3ccd28 100644 --- a/chrome/browser/download/download_shelf.cc +++ b/chrome/browser/download/download_shelf.cc @@ -32,8 +32,9 @@ bool DownloadShelfContextMenu::ItemIsChecked(int id) const { return download_->open_when_complete(); } case ALWAYS_OPEN_TYPE: { - return download_->manager()->ShouldOpenFileBasedOnExtension( - download_->full_path()); + const FilePath::StringType extension = + file_util::GetFileExtensionFromPath(download_->full_path()); + return download_->manager()->ShouldOpenFileExtension(extension); } case TOGGLE_PAUSE: { return download_->is_paused(); @@ -95,8 +96,10 @@ void DownloadShelfContextMenu::ExecuteItemCommand(int id) { download_util::OpenDownload(download_); break; case ALWAYS_OPEN_TYPE: { - download_->manager()->OpenFilesBasedOnExtension( - download_->full_path(), !ItemIsChecked(ALWAYS_OPEN_TYPE)); + const FilePath::StringType extension = + file_util::GetFileExtensionFromPath(download_->full_path()); + download_->manager()->OpenFilesOfExtension( + extension, !ItemIsChecked(ALWAYS_OPEN_TYPE)); break; } case CANCEL: |