From f6cb1e077174da5c9447271b8731e103a62db6ba Mon Sep 17 00:00:00 2001 From: "rolandsteiner@chromium.org" Date: Tue, 27 Oct 2009 05:54:51 +0000 Subject: 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 --- chrome/browser/download/download_manager.h | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'chrome/browser/download/download_manager.h') 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, // 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, 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 AutoOpenSet; - AutoOpenSet auto_open_; + std::set auto_open_; // Set of file extensions that are executables and shouldn't be auto opened. std::set exe_types_; -- cgit v1.1