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

Unified Diff: components/user_prefs/pref_registry_syncable.h

Issue 12340111: Introduce //components/user_prefs, use to eliminate c/b/prefs dependency in Autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pure merge of LKGR 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/user_prefs/README ('k') | components/user_prefs/pref_registry_syncable.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/user_prefs/pref_registry_syncable.h
diff --git a/chrome/browser/prefs/pref_registry_syncable.h b/components/user_prefs/pref_registry_syncable.h
similarity index 85%
rename from chrome/browser/prefs/pref_registry_syncable.h
rename to components/user_prefs/pref_registry_syncable.h
index d6d1a4ae0e3da60325696076b0b224ccaaeda730..08477f249fe30a117f8d281a1d462ee329b11e94 100644
--- a/chrome/browser/prefs/pref_registry_syncable.h
+++ b/components/user_prefs/pref_registry_syncable.h
@@ -2,13 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_PREFS_PREF_REGISTRY_SYNCABLE_H_
-#define CHROME_BROWSER_PREFS_PREF_REGISTRY_SYNCABLE_H_
+#ifndef COMPONENTS_USER_PREFS_PREF_REGISTRY_SYNCABLE_H_
+#define COMPONENTS_USER_PREFS_PREF_REGISTRY_SYNCABLE_H_
#include <set>
#include <string>
#include "base/prefs/pref_registry.h"
+#include "components/user_prefs/user_prefs_export.h"
namespace base {
class DictionaryValue;
@@ -19,7 +20,15 @@ class Value;
// A PrefRegistry that forces users to choose whether each registered
// preference is syncable or not.
-class PrefRegistrySyncable : public PrefRegistry {
+//
+// Classes or components that want to register such preferences should
+// define a static function named RegisterUserPrefs that takes a
+// PrefRegistrySyncable*, and the top-level application using the
+// class or embedding the component should call this function at an
+// appropriate time before the PrefService for these preferences is
+// constructed. See e.g. chrome/browser/prefs/browser_prefs.cc which
+// does this for Chrome.
+class USER_PREFS_EXPORT PrefRegistrySyncable : public PrefRegistry {
tfarina 2013/03/06 02:59:23 just noticed that UserPrefs was put in components
public:
typedef base::Callback<void(const char* path)> SyncableRegistrationCallback;
@@ -107,4 +116,4 @@ class PrefRegistrySyncable : public PrefRegistry {
DISALLOW_COPY_AND_ASSIGN(PrefRegistrySyncable);
};
-#endif // CHROME_BROWSER_PREFS_PREF_REGISTRY_SYNCABLE_H_
+#endif // COMPONENTS_USER_PREFS_PREF_REGISTRY_SYNCABLE_H_
« no previous file with comments | « components/user_prefs/README ('k') | components/user_prefs/pref_registry_syncable.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698