| 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 COMPONENTS_PREFS_PREF_SERVICE_FACTORY_H_ | 5 #ifndef COMPONENTS_PREFS_PREF_SERVICE_FACTORY_H_ |
| 6 #define COMPONENTS_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" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // Specifies to use an actual file-backed user pref store. | 60 // Specifies to use an actual file-backed user pref store. |
| 61 void SetUserPrefsFile(const base::FilePath& prefs_file, | 61 void SetUserPrefsFile(const base::FilePath& prefs_file, |
| 62 base::SequencedTaskRunner* task_runner); | 62 base::SequencedTaskRunner* task_runner); |
| 63 | 63 |
| 64 void set_async(bool async) { | 64 void set_async(bool async) { |
| 65 async_ = async; | 65 async_ = async; |
| 66 } | 66 } |
| 67 | 67 |
| 68 // Creates a PrefService object initialized with the parameters from | 68 // Creates a PrefService object initialized with the parameters from |
| 69 // this factory. | 69 // this factory. |
| 70 scoped_ptr<PrefService> Create(PrefRegistry* registry); | 70 std::unique_ptr<PrefService> Create(PrefRegistry* registry); |
| 71 | 71 |
| 72 protected: | 72 protected: |
| 73 scoped_refptr<PrefStore> managed_prefs_; | 73 scoped_refptr<PrefStore> managed_prefs_; |
| 74 scoped_refptr<PrefStore> supervised_user_prefs_; | 74 scoped_refptr<PrefStore> supervised_user_prefs_; |
| 75 scoped_refptr<PrefStore> extension_prefs_; | 75 scoped_refptr<PrefStore> extension_prefs_; |
| 76 scoped_refptr<PrefStore> command_line_prefs_; | 76 scoped_refptr<PrefStore> command_line_prefs_; |
| 77 scoped_refptr<PersistentPrefStore> user_prefs_; | 77 scoped_refptr<PersistentPrefStore> user_prefs_; |
| 78 scoped_refptr<PrefStore> recommended_prefs_; | 78 scoped_refptr<PrefStore> recommended_prefs_; |
| 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 #endif // COMPONENTS_PREFS_PREF_SERVICE_FACTORY_H_ | 89 #endif // COMPONENTS_PREFS_PREF_SERVICE_FACTORY_H_ |
| OLD | NEW |