| OLD | NEW |
| 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 10 matching lines...) Expand all Loading... |
| 21 namespace user_prefs { | 21 namespace user_prefs { |
| 22 class PrefRegistrySyncable; | 22 class PrefRegistrySyncable; |
| 23 } | 23 } |
| 24 | 24 |
| 25 // Stores all download-related preferences. | 25 // Stores all download-related preferences. |
| 26 class DownloadPrefs { | 26 class DownloadPrefs { |
| 27 public: | 27 public: |
| 28 explicit DownloadPrefs(Profile* profile); | 28 explicit DownloadPrefs(Profile* profile); |
| 29 ~DownloadPrefs(); | 29 ~DownloadPrefs(); |
| 30 | 30 |
| 31 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); | 31 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 32 | 32 |
| 33 // Returns the DownloadPrefs corresponding to the given DownloadManager | 33 // Returns the DownloadPrefs corresponding to the given DownloadManager |
| 34 // or BrowserContext. | 34 // or BrowserContext. |
| 35 static DownloadPrefs* FromDownloadManager( | 35 static DownloadPrefs* FromDownloadManager( |
| 36 content::DownloadManager* download_manager); | 36 content::DownloadManager* download_manager); |
| 37 static DownloadPrefs* FromBrowserContext( | 37 static DownloadPrefs* FromBrowserContext( |
| 38 content::BrowserContext* browser_context); | 38 content::BrowserContext* browser_context); |
| 39 | 39 |
| 40 base::FilePath DownloadPath() const; | 40 base::FilePath DownloadPath() const; |
| 41 void SetDownloadPath(const base::FilePath& path); | 41 void SetDownloadPath(const base::FilePath& path); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 const base::FilePath::StringType& b) const; | 85 const base::FilePath::StringType& b) const; |
| 86 }; | 86 }; |
| 87 typedef std::set<base::FilePath::StringType, | 87 typedef std::set<base::FilePath::StringType, |
| 88 AutoOpenCompareFunctor> AutoOpenSet; | 88 AutoOpenCompareFunctor> AutoOpenSet; |
| 89 AutoOpenSet auto_open_; | 89 AutoOpenSet auto_open_; |
| 90 | 90 |
| 91 DISALLOW_COPY_AND_ASSIGN(DownloadPrefs); | 91 DISALLOW_COPY_AND_ASSIGN(DownloadPrefs); |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PREFS_H_ | 94 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PREFS_H_ |
| OLD | NEW |