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

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

Issue 149696: Merge 20772 - Fix autoopening file types not autoopening.... (Closed) Base URL: svn://chrome-svn/chrome/branches/193/src/
Patch Set: Created 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_manager.cc
===================================================================
--- chrome/browser/download/download_manager.cc (revision 20775)
+++ chrome/browser/download/download_manager.cc (working copy)
@@ -833,15 +833,18 @@
// state to complete but did not notify).
download->UpdateObservers();
- // Open the download if the user or user prefs indicate it should be.
- FilePath::StringType extension = download->full_path().Extension();
-
// Handle chrome extensions explicitly and skip the shell execute.
if (Extension::IsExtension(download->full_path())) {
OpenChromeExtension(download->full_path());
return;
}
+ // Open the download if the user or user prefs indicate it should be.
+ FilePath::StringType extension = download->full_path().Extension();
+ // Drop the leading period. (The auto-open list is period-less.)
+ if (extension.size() > 0)
+ extension = extension.substr(1);
+
if (download->open_when_complete() || ShouldOpenFileExtension(extension))
OpenDownloadInShell(download, NULL);
}
Property changes on: chrome\browser\download\download_manager.cc
___________________________________________________________________
Added: svn:mergeinfo
Merged /trunk/src/chrome/browser/download/download_manager.cc:r20772
Merged /branches/chrome_webkit_merge_branch/chrome/browser/download/download_manager.cc:r69-2775
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698