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

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

Issue 29003: Make download manager treat mixed-case extensions the same as lower-case exte... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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.h ('k') | chrome/browser/download/download_util.h » ('j') | 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 10233)
+++ chrome/browser/download/download_manager.cc (working copy)
@@ -1240,7 +1240,19 @@
}
bool DownloadManager::IsExecutable(const FilePath::StringType& extension) {
- return exe_types_.find(extension) != exe_types_.end();
+#if defined(OS_WIN)
+ if (!IsStringASCII(extension))
+ return false;
+ std::string ascii_extension = WideToASCII(extension);
+ StringToLowerASCII(&ascii_extension);
+
+ return exe_types_.find(ascii_extension) != exe_types_.end();
+#else if defined(OS_POSIX)
+ // TODO(port): we might not want to call this function on other platforms.
+ // Figure it out.
+ NOTIMPLEMENTED();
+ return false;
+#endif
}
void DownloadManager::ResetAutoOpenFiles() {
« no previous file with comments | « chrome/browser/download/download_manager.h ('k') | chrome/browser/download/download_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698