| OLD | NEW |
| 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 // 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 // Chromium settings and storage represent user-selected preferences and | 7 // Chromium settings and storage represent user-selected preferences and |
| 8 // information and MUST not be extracted, overwritten or modified except | 8 // information and MUST not be extracted, overwritten or modified except |
| 9 // through Chromium defined APIs. | 9 // through Chromium defined APIs. |
| 10 | 10 |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 // passed to us at construction time. | 174 // passed to us at construction time. |
| 175 void AddInitialPreferences(); | 175 void AddInitialPreferences(); |
| 176 | 176 |
| 177 // Updates local caches for a preference registered at |path|. The | 177 // Updates local caches for a preference registered at |path|. The |
| 178 // |default_value| must not be NULL as it determines the preference | 178 // |default_value| must not be NULL as it determines the preference |
| 179 // value's type. AddRegisteredPreference must not be called twice | 179 // value's type. AddRegisteredPreference must not be called twice |
| 180 // for the same path. | 180 // for the same path. |
| 181 void AddRegisteredPreference(const char* path, | 181 void AddRegisteredPreference(const char* path, |
| 182 base::Value* default_value); | 182 base::Value* default_value); |
| 183 | 183 |
| 184 void RemoveRegisteredPreference(const char* path); | 184 // Updates local caches for a preference unregistered at |path|. |
| 185 virtual void RemoveRegisteredPreference(const char* path); |
| 185 | 186 |
| 186 // The PrefNotifier handles registering and notifying preference observers. | 187 // The PrefNotifier handles registering and notifying preference observers. |
| 187 // It is created and owned by this PrefService. Subclasses may access it for | 188 // It is created and owned by this PrefService. Subclasses may access it for |
| 188 // unit testing. | 189 // unit testing. |
| 189 scoped_ptr<PrefNotifierImpl> pref_notifier_; | 190 scoped_ptr<PrefNotifierImpl> pref_notifier_; |
| 190 | 191 |
| 191 // The PrefValueStore provides prioritized preference values. It is owned by | 192 // The PrefValueStore provides prioritized preference values. It is owned by |
| 192 // this PrefService. Subclasses may access it for unit testing. | 193 // this PrefService. Subclasses may access it for unit testing. |
| 193 scoped_ptr<PrefValueStore> pref_value_store_; | 194 scoped_ptr<PrefValueStore> pref_value_store_; |
| 194 | 195 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 | 253 |
| 253 DISALLOW_COPY_AND_ASSIGN(PrefService); | 254 DISALLOW_COPY_AND_ASSIGN(PrefService); |
| 254 }; | 255 }; |
| 255 | 256 |
| 256 // TODO(joi): Remove these forwards. They were placed here temporarily | 257 // TODO(joi): Remove these forwards. They were placed here temporarily |
| 257 // to limit the size of the initial change that split | 258 // to limit the size of the initial change that split |
| 258 // PrefServiceSimple and PrefServiceSyncable out of PrefService. | 259 // PrefServiceSimple and PrefServiceSyncable out of PrefService. |
| 259 #include "chrome/browser/prefs/pref_service_syncable.h" | 260 #include "chrome/browser/prefs/pref_service_syncable.h" |
| 260 | 261 |
| 261 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_H_ | 262 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_H_ |
| OLD | NEW |