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

Side by Side Diff: chrome/browser/download/download_prefs.h

Issue 12850002: Move download filename determintion into a separate class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests on Android Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PREFS_H_ 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PREFS_H_
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PREFS_H_ 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PREFS_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // to choose another download location). 42 // to choose another download location).
43 bool PromptForDownload() const; 43 bool PromptForDownload() const;
44 44
45 // Returns true if the download path preference is managed. 45 // Returns true if the download path preference is managed.
46 bool IsDownloadPathManaged() const; 46 bool IsDownloadPathManaged() const;
47 47
48 // Returns true if there is at least one file extension registered 48 // Returns true if there is at least one file extension registered
49 // for auto-open. 49 // for auto-open.
50 bool IsAutoOpenUsed() const; 50 bool IsAutoOpenUsed() const;
51 51
52 bool IsAutoOpenEnabledForExtension( 52 // Returns true if |path| should be opened automatically based on
53 const base::FilePath::StringType& extension) const; 53 // |path.Extension()|.
54 bool IsAutoOpenEnabledBasedOnExtension(const base::FilePath& path) const;
54 55
55 // Enables auto-open based on file extension. Returns true on success. 56 // Enables auto-open based on file extension. Returns true on success.
56 // TODO(phajdan.jr): Add WARN_UNUSED_RESULT here. 57 // TODO(phajdan.jr): Add WARN_UNUSED_RESULT here.
57 bool EnableAutoOpenBasedOnExtension(const base::FilePath& file_name); 58 bool EnableAutoOpenBasedOnExtension(const base::FilePath& file_name);
58 59
59 // Disables auto-open based on file extension. 60 // Disables auto-open based on file extension.
60 void DisableAutoOpenBasedOnExtension(const base::FilePath& file_name); 61 void DisableAutoOpenBasedOnExtension(const base::FilePath& file_name);
61 62
62 void ResetAutoOpen(); 63 void ResetAutoOpen();
63 64
(...skipping 12 matching lines...) Expand all
76 const base::FilePath::StringType& b) const; 77 const base::FilePath::StringType& b) const;
77 }; 78 };
78 typedef std::set<base::FilePath::StringType, 79 typedef std::set<base::FilePath::StringType,
79 AutoOpenCompareFunctor> AutoOpenSet; 80 AutoOpenCompareFunctor> AutoOpenSet;
80 AutoOpenSet auto_open_; 81 AutoOpenSet auto_open_;
81 82
82 DISALLOW_COPY_AND_ASSIGN(DownloadPrefs); 83 DISALLOW_COPY_AND_ASSIGN(DownloadPrefs);
83 }; 84 };
84 85
85 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PREFS_H_ 86 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PREFS_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_file_picker_chromeos.cc ('k') | chrome/browser/download/download_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698