| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 // passed to us at construction time. | 257 // passed to us at construction time. |
| 258 void AddInitialPreferences(); | 258 void AddInitialPreferences(); |
| 259 | 259 |
| 260 // Updates local caches for a preference registered at |path|. The | 260 // Updates local caches for a preference registered at |path|. The |
| 261 // |default_value| must not be NULL as it determines the preference | 261 // |default_value| must not be NULL as it determines the preference |
| 262 // value's type. AddRegisteredPreference must not be called twice | 262 // value's type. AddRegisteredPreference must not be called twice |
| 263 // for the same path. | 263 // for the same path. |
| 264 void AddRegisteredPreference(const char* path, | 264 void AddRegisteredPreference(const char* path, |
| 265 base::Value* default_value); | 265 base::Value* default_value); |
| 266 | 266 |
| 267 // Updates local caches for a preference unregistered at |path|. | |
| 268 virtual void RemoveRegisteredPreference(const char* path); | |
| 269 | |
| 270 // The PrefNotifier handles registering and notifying preference observers. | 267 // The PrefNotifier handles registering and notifying preference observers. |
| 271 // It is created and owned by this PrefService. Subclasses may access it for | 268 // It is created and owned by this PrefService. Subclasses may access it for |
| 272 // unit testing. | 269 // unit testing. |
| 273 scoped_ptr<PrefNotifierImpl> pref_notifier_; | 270 scoped_ptr<PrefNotifierImpl> pref_notifier_; |
| 274 | 271 |
| 275 // The PrefValueStore provides prioritized preference values. It is owned by | 272 // The PrefValueStore provides prioritized preference values. It is owned by |
| 276 // this PrefService. Subclasses may access it for unit testing. | 273 // this PrefService. Subclasses may access it for unit testing. |
| 277 scoped_ptr<PrefValueStore> pref_value_store_; | 274 scoped_ptr<PrefValueStore> pref_value_store_; |
| 278 | 275 |
| 279 scoped_refptr<PrefRegistry> pref_registry_; | 276 scoped_refptr<PrefRegistry> pref_registry_; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 DISALLOW_COPY_AND_ASSIGN(PrefService); | 349 DISALLOW_COPY_AND_ASSIGN(PrefService); |
| 353 }; | 350 }; |
| 354 | 351 |
| 355 // Retrieves a PrefService for the given context. | 352 // Retrieves a PrefService for the given context. |
| 356 // | 353 // |
| 357 // TODO(joi): This doesn't really belong here, since it references a | 354 // TODO(joi): This doesn't really belong here, since it references a |
| 358 // content type; probably best to get rid of it completely. | 355 // content type; probably best to get rid of it completely. |
| 359 PrefService* PrefServiceFromBrowserContext(content::BrowserContext* context); | 356 PrefService* PrefServiceFromBrowserContext(content::BrowserContext* context); |
| 360 | 357 |
| 361 #endif // BASE_PREFS_PREF_SERVICE_H_ | 358 #endif // BASE_PREFS_PREF_SERVICE_H_ |
| OLD | NEW |