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

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

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 | « base/file_path_unittest.cc ('k') | chrome/browser/download/download_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_manager.h
===================================================================
--- chrome/browser/download/download_manager.h (revision 30169)
+++ chrome/browser/download/download_manager.h (working copy)
@@ -419,19 +419,16 @@
// Registers this file extension for automatic opening upon download
// completion if 'open' is true, or prevents the extension from automatic
// opening if 'open' is false.
- void OpenFilesBasedOnExtension(const FilePath& path, bool open);
+ void OpenFilesOfExtension(const FilePath::StringType& extension, bool open);
// Tests if a file type should be opened automatically.
- bool ShouldOpenFileBasedOnExtension(const FilePath& path) const;
+ bool ShouldOpenFileExtension(const FilePath::StringType& extension);
// Tests if we think the server means for this mime_type to be executable.
static bool IsExecutableMimeType(const std::string& mime_type);
- // Tests if a file is considered executable, based on its type.
- bool IsExecutableFile(const FilePath& path) const;
-
// Tests if a file type is considered executable.
- bool IsExecutableExtension(const FilePath::StringType& extension) const;
+ bool IsExecutable(const FilePath::StringType& extension);
// Resets the automatic open preference.
void ResetAutoOpenFiles();
@@ -608,14 +605,7 @@
FilePath last_download_path_;
// Set of file extensions to open at download completion.
- struct AutoOpenCompareFunctor {
- inline bool operator()(const FilePath::StringType& a,
- const FilePath::StringType& b) const {
- return FilePath::CompareLessIgnoreCase(a, b);
- }
- };
- typedef std::set<FilePath::StringType, AutoOpenCompareFunctor> AutoOpenSet;
- AutoOpenSet auto_open_;
+ std::set<FilePath::StringType> auto_open_;
// Set of file extensions that are executables and shouldn't be auto opened.
std::set<std::string> exe_types_;
« no previous file with comments | « base/file_path_unittest.cc ('k') | chrome/browser/download/download_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698