| 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 base::DictionaryValue* GetPreferenceValues() const; | 284 base::DictionaryValue* GetPreferenceValues() const; |
| 285 | 285 |
| 286 // A helper method to quickly look up a preference. Returns NULL if the | 286 // A helper method to quickly look up a preference. Returns NULL if the |
| 287 // preference is not registered. | 287 // preference is not registered. |
| 288 const Preference* FindPreference(const char* pref_name) const; | 288 const Preference* FindPreference(const char* pref_name) const; |
| 289 | 289 |
| 290 bool ReadOnly() const; | 290 bool ReadOnly() const; |
| 291 | 291 |
| 292 // SyncableService getter. | 292 // SyncableService getter. |
| 293 // TODO(zea): Have PrefService implement SyncableService directly. | 293 // TODO(zea): Have PrefService implement SyncableService directly. |
| 294 SyncableService* GetSyncableService(); | 294 PrefModelAssociator* GetSyncableService(); |
| 295 | 295 |
| 296 protected: | 296 protected: |
| 297 // Construct a new pref service, specifying the pref sources as explicit | 297 // Construct a new pref service, specifying the pref sources as explicit |
| 298 // PrefStore pointers. This constructor is what CreatePrefService() ends up | 298 // PrefStore pointers. This constructor is what CreatePrefService() ends up |
| 299 // calling. It's also used for unit tests. | 299 // calling. It's also used for unit tests. |
| 300 PrefService(PrefStore* managed_platform_prefs, | 300 PrefService(PrefStore* managed_platform_prefs, |
| 301 PrefStore* managed_cloud_prefs, | 301 PrefStore* managed_cloud_prefs, |
| 302 PrefStore* extension_prefs, | 302 PrefStore* extension_prefs, |
| 303 PrefStore* command_line_prefs, | 303 PrefStore* command_line_prefs, |
| 304 PersistentPrefStore* user_prefs, | 304 PersistentPrefStore* user_prefs, |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 // of registered preferences are. | 390 // of registered preferences are. |
| 391 mutable PreferenceSet prefs_; | 391 mutable PreferenceSet prefs_; |
| 392 | 392 |
| 393 // The model associator that maintains the links with the sync db. | 393 // The model associator that maintains the links with the sync db. |
| 394 scoped_ptr<PrefModelAssociator> pref_sync_associator_; | 394 scoped_ptr<PrefModelAssociator> pref_sync_associator_; |
| 395 | 395 |
| 396 DISALLOW_COPY_AND_ASSIGN(PrefService); | 396 DISALLOW_COPY_AND_ASSIGN(PrefService); |
| 397 }; | 397 }; |
| 398 | 398 |
| 399 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_H_ | 399 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_H_ |
| OLD | NEW |