OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 BASE_PREFS_PREF_SERVICE_FACTORY_H_ | 5 #ifndef COMPONENTS_PREFS_PREF_SERVICE_FACTORY_H_ |
6 #define BASE_PREFS_PREF_SERVICE_FACTORY_H_ | 6 #define COMPONENTS_PREFS_PREF_SERVICE_FACTORY_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "components/prefs/base_prefs_export.h" | 11 #include "components/prefs/base_prefs_export.h" |
12 #include "components/prefs/persistent_pref_store.h" | 12 #include "components/prefs/persistent_pref_store.h" |
13 #include "components/prefs/pref_registry.h" | 13 #include "components/prefs/pref_registry.h" |
14 #include "components/prefs/pref_store.h" | 14 #include "components/prefs/pref_store.h" |
15 | 15 |
16 class PrefService; | 16 class PrefService; |
17 | 17 |
18 namespace base { | 18 namespace base { |
19 | |
20 class FilePath; | 19 class FilePath; |
21 class SequencedTaskRunner; | 20 class SequencedTaskRunner; |
| 21 } |
22 | 22 |
23 // A class that allows convenient building of PrefService. | 23 // A class that allows convenient building of PrefService. |
24 class BASE_PREFS_EXPORT PrefServiceFactory { | 24 class COMPONENTS_PREFS_EXPORT PrefServiceFactory { |
25 public: | 25 public: |
26 PrefServiceFactory(); | 26 PrefServiceFactory(); |
27 virtual ~PrefServiceFactory(); | 27 virtual ~PrefServiceFactory(); |
28 | 28 |
29 // Functions for setting the various parameters of the PrefService to build. | 29 // Functions for setting the various parameters of the PrefService to build. |
30 void set_managed_prefs(const scoped_refptr<PrefStore>& managed_prefs) { | 30 void set_managed_prefs(const scoped_refptr<PrefStore>& managed_prefs) { |
31 managed_prefs_ = managed_prefs; | 31 managed_prefs_ = managed_prefs; |
32 } | 32 } |
33 void set_supervised_user_prefs( | 33 void set_supervised_user_prefs( |
34 const scoped_refptr<PrefStore>& supervised_user_prefs) { | 34 const scoped_refptr<PrefStore>& supervised_user_prefs) { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 base::Callback<void(PersistentPrefStore::PrefReadError)> read_error_callback_; | 80 base::Callback<void(PersistentPrefStore::PrefReadError)> read_error_callback_; |
81 | 81 |
82 // Defaults to false. | 82 // Defaults to false. |
83 bool async_; | 83 bool async_; |
84 | 84 |
85 private: | 85 private: |
86 DISALLOW_COPY_AND_ASSIGN(PrefServiceFactory); | 86 DISALLOW_COPY_AND_ASSIGN(PrefServiceFactory); |
87 }; | 87 }; |
88 | 88 |
89 } // namespace base | 89 #endif // COMPONENTS_PREFS_PREF_SERVICE_FACTORY_H_ |
90 | |
91 #endif // BASE_PREFS_PREF_SERVICE_FACTORY_H_ | |
OLD | NEW |