1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_UTIL_H_
6 #define CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_UTIL_H_
11 namespace syncable_prefs
{
12 class PrefServiceSyncable
;
15 // syncable_prefs::PrefServiceSyncable is a PrefService with added integration
16 // for sync, and knowledge of how to create an incognito PrefService. For code
17 // that does not need to know about the sync integration, you should use only
18 // the plain PrefService type.
20 // For this reason, Profile does not expose an accessor for the
21 // syncable_prefs::PrefServiceSyncable type. Instead, you can use the utilities
22 // below to retrieve the syncable_prefs::PrefServiceSyncable (or its incognito
23 // version) from a Profile.
24 syncable_prefs::PrefServiceSyncable
* PrefServiceSyncableFromProfile(
26 syncable_prefs::PrefServiceSyncable
* PrefServiceSyncableIncognitoFromProfile(
29 // Creates an incognito copy of |pref_service| that shares most prefs but uses
30 // a fresh non-persistent overlay for the user pref store and an individual
31 // extension pref store (to cache the effective extension prefs for incognito
33 syncable_prefs::PrefServiceSyncable
* CreateIncognitoPrefServiceSyncable(
34 syncable_prefs::PrefServiceSyncable
* pref_service
,
35 PrefStore
* incognito_extension_pref_store
);
37 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_UTIL_H_