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

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

Issue 8697006: DownloadManager intereface refactoring to allow cleaner DownloadItem unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged to LKGR. Created 9 years 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
Index: chrome/browser/download/download_prefs.h
diff --git a/chrome/browser/download/download_prefs.h b/chrome/browser/download/download_prefs.h
index 848db7a542060462447a042ce25ad9fce133ef47..0f0495ead14c3da7458326c2c36674707820796b 100644
--- a/chrome/browser/download/download_prefs.h
+++ b/chrome/browser/download/download_prefs.h
@@ -14,6 +14,10 @@
class DownloadManager;
class PrefService;
+namespace content {
+class BrowserContext;
+}
+
// Stores all download-related preferences.
class DownloadPrefs {
public:
@@ -22,8 +26,11 @@ class DownloadPrefs {
static void RegisterUserPrefs(PrefService* prefs);
- // Returns the DownloadPrefs corresponding to the given DownloadManager.
+ // Returns the DownloadPrefs corresponding to the given DownloadManager
+ // or BrowserContext.
static DownloadPrefs* FromDownloadManager(DownloadManager* download_manager);
+ static DownloadPrefs* FromBrowserContext(
+ content::BrowserContext* browser_context);
FilePath download_path() const { return *download_path_; }
int save_file_type() const { return *save_file_type_; }

Powered by Google App Engine
This is Rietveld 408576698