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

Unified Diff: components/user_prefs/user_prefs.h

Issue 1062083003: Implement BrowserStateKeyedServiceFactory::GetAssociatedPrefRegistry() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing include in card_unmask_prompt_controller_impl_unittest.cc Created 5 years, 8 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/DEPS ('k') | components/user_prefs/user_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/user_prefs/user_prefs.h
diff --git a/components/user_prefs/user_prefs.h b/components/user_prefs/user_prefs.h
index 3e72d7aed1bc5f0bfa4bb5af060edb740b85f028..ceea4f02f322501db29bdb39033849be22bb7857 100644
--- a/components/user_prefs/user_prefs.h
+++ b/components/user_prefs/user_prefs.h
@@ -11,27 +11,21 @@
class PrefService;
-namespace content {
-class BrowserContext;
-}
-
namespace user_prefs {
-// Components may use preferences associated with a given user. These
-// hang off of content::BrowserContext and can be retrieved using
-// UserPrefs::Get().
+// Components may use preferences associated with a given user. These hang off
+// of base::SupportsUserData and can be retrieved using UserPrefs::Get().
//
-// It is up to the embedder to create and own the PrefService and
-// attach it to BrowserContext using the UserPrefs::Set() function.
+// It is up to the embedder to create and own the PrefService and attach it to
+// base::SupportsUserData using the UserPrefs::Set() function.
class USER_PREFS_EXPORT UserPrefs : public base::SupportsUserData::Data {
public:
- // Retrieves the PrefService for a given BrowserContext, or NULL if
- // none is attached.
- static PrefService* Get(content::BrowserContext* context);
+ // Retrieves the PrefService for a given context, or null if none is attached.
+ static PrefService* Get(base::SupportsUserData* context);
// Hangs the specified |prefs| off of |context|. Should be called
- // only once per BrowserContext.
- static void Set(content::BrowserContext* context, PrefService* prefs);
+ // only once per context.
+ static void Set(base::SupportsUserData* context, PrefService* prefs);
private:
explicit UserPrefs(PrefService* prefs);
« no previous file with comments | « components/user_prefs/DEPS ('k') | components/user_prefs/user_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698