Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(506)

Side by Side Diff: base/prefs/pref_service.h

Issue 12330008: Get rid of the ability to unregister preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head for commit. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/prefs/pref_registry.cc ('k') | base/prefs/pref_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « base/prefs/pref_registry.cc ('k') | base/prefs/pref_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698