summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/download_manager.h
diff options
context:
space:
mode:
authorrolandsteiner@chromium.org <rolandsteiner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 05:54:51 +0000
committerrolandsteiner@chromium.org <rolandsteiner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 05:54:51 +0000
commitf6cb1e077174da5c9447271b8731e103a62db6ba (patch)
tree037db348655e730b203374ac632b2d793a3bd055 /chrome/browser/download/download_manager.h
parent47f782c2f1e3c1f3c95e345494b6f5a1a670fd21 (diff)
downloadchromium_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_manager.h')
-rw-r--r--chrome/browser/download/download_manager.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/chrome/browser/download/download_manager.h b/chrome/browser/download/download_manager.h
index 5f613a8..34a2e42 100644
--- a/chrome/browser/download/download_manager.h
+++ b/chrome/browser/download/download_manager.h
@@ -419,19 +419,16 @@ class DownloadManager : public base::RefCountedThreadSafe<DownloadManager>,
// 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 @@ class DownloadManager : public base::RefCountedThreadSafe<DownloadManager>,
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_;