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

Side by Side Diff: base/prefs/pref_service_builder.h

Issue 12211105: Move remaining non-test, non-Chrome-specific Prefs code to base/prefs/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments, merge to LKGR. Created 7 years, 10 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
« no previous file with comments | « base/prefs/pref_service.cc ('k') | base/prefs/pref_service_builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_PREFS_PREF_SERVICE_BUILDER_H_ 5 #ifndef BASE_PREFS_PREF_SERVICE_BUILDER_H_
6 #define CHROME_BROWSER_PREFS_PREF_SERVICE_BUILDER_H_ 6 #define BASE_PREFS_PREF_SERVICE_BUILDER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/prefs/base_prefs_export.h"
11 #include "base/prefs/persistent_pref_store.h" 12 #include "base/prefs/persistent_pref_store.h"
13 #include "base/prefs/pref_registry.h"
12 #include "base/prefs/pref_store.h" 14 #include "base/prefs/pref_store.h"
13 #include "chrome/browser/prefs/pref_registry.h"
14 15
15 class PrefService; 16 class PrefService;
16 17
17 namespace base { 18 namespace base {
18 class FilePath; 19 class FilePath;
19 class SequencedTaskRunner; 20 class SequencedTaskRunner;
20 } 21 }
21 22
22 // A class that allows convenient building of PrefService. 23 // A class that allows convenient building of PrefService.
23 class PrefServiceBuilder { 24 class BASE_PREFS_EXPORT PrefServiceBuilder {
24 public: 25 public:
25 PrefServiceBuilder(); 26 PrefServiceBuilder();
26 virtual ~PrefServiceBuilder(); 27 virtual ~PrefServiceBuilder();
27 28
28 // Functions for setting the various parameters of the PrefService to build. 29 // Functions for setting the various parameters of the PrefService to build.
29 // These take ownership of the |store| parameter. 30 // These take ownership of the |store| parameter.
30 PrefServiceBuilder& WithManagedPrefs(PrefStore* store); 31 PrefServiceBuilder& WithManagedPrefs(PrefStore* store);
31 PrefServiceBuilder& WithExtensionPrefs(PrefStore* store); 32 PrefServiceBuilder& WithExtensionPrefs(PrefStore* store);
32 PrefServiceBuilder& WithCommandLinePrefs(PrefStore* store); 33 PrefServiceBuilder& WithCommandLinePrefs(PrefStore* store);
33 PrefServiceBuilder& WithUserPrefs(PersistentPrefStore* store); 34 PrefServiceBuilder& WithUserPrefs(PersistentPrefStore* store);
(...skipping 27 matching lines...) Expand all
61 62
62 base::Callback<void(PersistentPrefStore::PrefReadError)> read_error_callback_; 63 base::Callback<void(PersistentPrefStore::PrefReadError)> read_error_callback_;
63 64
64 // Defaults to false. 65 // Defaults to false.
65 bool async_; 66 bool async_;
66 67
67 private: 68 private:
68 DISALLOW_COPY_AND_ASSIGN(PrefServiceBuilder); 69 DISALLOW_COPY_AND_ASSIGN(PrefServiceBuilder);
69 }; 70 };
70 71
71 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_BUILDER_H_ 72 #endif // BASE_PREFS_PREF_SERVICE_BUILDER_H_
OLDNEW
« no previous file with comments | « base/prefs/pref_service.cc ('k') | base/prefs/pref_service_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698