OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This provides a way to access the application's current preferences. | 5 // This provides a way to access the application's current preferences. |
6 | 6 |
7 #ifndef CHROME_BROWSER_PREFS_PREF_SERVICE_H_ | 7 #ifndef CHROME_BROWSER_PREFS_PREF_SERVICE_H_ |
8 #define CHROME_BROWSER_PREFS_PREF_SERVICE_H_ | 8 #define CHROME_BROWSER_PREFS_PREF_SERVICE_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 | 224 |
225 // TODO(mnissler): This should not be public. Change client code to call a | 225 // TODO(mnissler): This should not be public. Change client code to call a |
226 // preference setter or use ScopedPrefUpdate. | 226 // preference setter or use ScopedPrefUpdate. |
227 PrefNotifier* pref_notifier() const; | 227 PrefNotifier* pref_notifier() const; |
228 | 228 |
229 protected: | 229 protected: |
230 // Construct a new pref service, specifying the pref sources as explicit | 230 // Construct a new pref service, specifying the pref sources as explicit |
231 // PrefStore pointers. This constructor is what CreatePrefService() ends up | 231 // PrefStore pointers. This constructor is what CreatePrefService() ends up |
232 // calling. It's also used for unit tests. | 232 // calling. It's also used for unit tests. |
233 PrefService(PrefStore* managed_platform_prefs, | 233 PrefService(PrefStore* managed_platform_prefs, |
234 PrefStore* device_management_prefs, | 234 PrefStore* managed_cloud_prefs, |
235 PrefStore* extension_prefs, | 235 PrefStore* extension_prefs, |
236 PrefStore* command_line_prefs, | 236 PrefStore* command_line_prefs, |
237 PersistentPrefStore* user_prefs, | 237 PersistentPrefStore* user_prefs, |
238 PrefStore* recommended_prefs, | 238 PrefStore* recommended_platform_prefs, |
| 239 PrefStore* recommended_cloud_prefs, |
239 DefaultPrefStore* default_store); | 240 DefaultPrefStore* default_store); |
240 | 241 |
241 // The PrefNotifier handles registering and notifying preference observers. | 242 // The PrefNotifier handles registering and notifying preference observers. |
242 // It is created and owned by this PrefService. Subclasses may access it for | 243 // It is created and owned by this PrefService. Subclasses may access it for |
243 // unit testing. | 244 // unit testing. |
244 scoped_ptr<PrefNotifierImpl> pref_notifier_; | 245 scoped_ptr<PrefNotifierImpl> pref_notifier_; |
245 | 246 |
246 private: | 247 private: |
247 class PreferencePathComparator { | 248 class PreferencePathComparator { |
248 public: | 249 public: |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 | 300 |
300 // Local cache of registered Preference objects. The default_store_ | 301 // Local cache of registered Preference objects. The default_store_ |
301 // is authoritative with respect to what the types and default values | 302 // is authoritative with respect to what the types and default values |
302 // of registered preferences are. | 303 // of registered preferences are. |
303 mutable PreferenceSet prefs_; | 304 mutable PreferenceSet prefs_; |
304 | 305 |
305 DISALLOW_COPY_AND_ASSIGN(PrefService); | 306 DISALLOW_COPY_AND_ASSIGN(PrefService); |
306 }; | 307 }; |
307 | 308 |
308 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_H_ | 309 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_H_ |
OLD | NEW |