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

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

Issue 10828345: Extract PrefServiceBase into chrome/browser/api. Use in api and autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head Created 8 years, 4 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/file_path.h" 10 #include "base/file_path.h"
11 #include "chrome/browser/api/prefs/pref_member.h" 11 #include "chrome/browser/api/prefs/pref_member.h"
12 12
13 class Profile; 13 class Profile;
14 14
15 namespace content { 15 namespace content {
16 class BrowserContext; 16 class BrowserContext;
17 class DownloadManager; 17 class DownloadManager;
18 } 18 }
19 19
20 // Stores all download-related preferences. 20 // Stores all download-related preferences.
21 class DownloadPrefs { 21 class DownloadPrefs {
22 public: 22 public:
23 explicit DownloadPrefs(Profile* profile); 23 explicit DownloadPrefs(Profile* profile);
24 ~DownloadPrefs(); 24 ~DownloadPrefs();
25 25
26 static void RegisterUserPrefs(PrefService* prefs); 26 static void RegisterUserPrefs(PrefServiceBase* prefs);
27 27
28 // Returns the DownloadPrefs corresponding to the given DownloadManager 28 // Returns the DownloadPrefs corresponding to the given DownloadManager
29 // or BrowserContext. 29 // or BrowserContext.
30 static DownloadPrefs* FromDownloadManager( 30 static DownloadPrefs* FromDownloadManager(
31 content::DownloadManager* download_manager); 31 content::DownloadManager* download_manager);
32 static DownloadPrefs* FromBrowserContext( 32 static DownloadPrefs* FromBrowserContext(
33 content::BrowserContext* browser_context); 33 content::BrowserContext* browser_context);
34 34
35 FilePath DownloadPath() const; 35 FilePath DownloadPath() const;
36 int save_file_type() const { return *save_file_type_; } 36 int save_file_type() const { return *save_file_type_; }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 bool operator()(const FilePath::StringType& a, 73 bool operator()(const FilePath::StringType& a,
74 const FilePath::StringType& b) const; 74 const FilePath::StringType& b) const;
75 }; 75 };
76 typedef std::set<FilePath::StringType, AutoOpenCompareFunctor> AutoOpenSet; 76 typedef std::set<FilePath::StringType, AutoOpenCompareFunctor> AutoOpenSet;
77 AutoOpenSet auto_open_; 77 AutoOpenSet auto_open_;
78 78
79 DISALLOW_COPY_AND_ASSIGN(DownloadPrefs); 79 DISALLOW_COPY_AND_ASSIGN(DownloadPrefs);
80 }; 80 };
81 81
82 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PREFS_H_ 82 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PREFS_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/input_method/browser_state_monitor.h ('k') | chrome/browser/download/download_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698