From c7318c2ce83392f83bba38e9890cb153f23c39ca Mon Sep 17 00:00:00 2001 From: "joi@chromium.org" Date: Mon, 2 Dec 2013 15:44:34 +0000 Subject: 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 --- base/prefs/pref_service.h | 10 ++++++++++ 1 file changed, 10 insertions(+) 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: -- cgit v1.1