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