summaryrefslogtreecommitdiffstats
path: root/base/prefs
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-02 15:44:34 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-02 15:44:34 +0000
commitc7318c2ce83392f83bba38e9890cb153f23c39ca (patch)
treecd8405b2bfe21e58af97dc8a720ecd8341861d33 /base/prefs
parentf925c1b4ce57f0c3b9ffa088d2cf3ff2699376b7 (diff)
downloadchromium_src-c7318c2ce83392f83bba38e9890cb153f23c39ca.zip
chromium_src-c7318c2ce83392f83bba38e9890cb153f23c39ca.tar.gz
chromium_src-c7318c2ce83392f83bba38e9890cb153f23c39ca.tar.bz2
Change docs for DeprecatedGetPrefRegistry to point to the correct approach.
BUG=324520 Review URL: https://codereview.chromium.org/99123002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238109 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/prefs')
-rw-r--r--base/prefs/pref_service.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/base/prefs/pref_service.h b/base/prefs/pref_service.h
index 176594a..186433c 100644
--- a/base/prefs/pref_service.h
+++ b/base/prefs/pref_service.h
@@ -258,6 +258,16 @@ class BASE_PREFS_EXPORT PrefService : public base::NonThreadSafe {
// Returns the PrefRegistry object for this service. You should not
// use this; the intent is for no registrations to take place after
// PrefService has been constructed.
+ //
+ // Instead of using this method, the recommended approach is to
+ // register all preferences for a class Xyz up front in a static
+ // Xyz::RegisterPrefs function, which gets invoked early in the
+ // application's start-up, before a PrefService is created.
+ //
+ // As an example, prefs registration in Chrome is triggered by the
+ // functions chrome::RegisterPrefs (for global preferences) and
+ // chrome::RegisterProfilePrefs (for user-specific preferences)
+ // implemented in chrome/browser/prefs/browser_prefs.cc.
PrefRegistry* DeprecatedGetPrefRegistry();
protected: