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

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

Issue 337042: Revert 30168 - Commit patch set from http://codereview.chromium.org/149796... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 | « chrome/browser/download/download_manager.cc ('k') | chrome/browser/download/download_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_shelf.cc
===================================================================
--- chrome/browser/download/download_shelf.cc (revision 30169)
+++ chrome/browser/download/download_shelf.cc (working copy)
@@ -32,8 +32,9 @@
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 @@
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:
« no previous file with comments | « chrome/browser/download/download_manager.cc ('k') | chrome/browser/download/download_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698