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 PrefServiceSyncable; | 8 class PrefServiceSyncable; |
9 class PrefStore; | |
9 class Profile; | 10 class Profile; |
10 | 11 |
11 // PrefServiceSyncable is a PrefService with added integration for | 12 // PrefServiceSyncable is a PrefService with added integration for |
12 // sync, and knowledge of how to create an incognito | 13 // sync, and knowledge of how to create an incognito |
13 // PrefService. For code that does not need to know about the sync | 14 // PrefService. For code that does not need to know about the sync |
14 // integration, you should use only the plain PrefService type. | 15 // integration, you should use only the plain PrefService type. |
15 // | 16 // |
16 // For this reason, Profile does not expose an accessor for the | 17 // For this reason, Profile does not expose an accessor for the |
17 // PrefServiceSyncable type. Instead, you can use the utilities | 18 // PrefServiceSyncable type. Instead, you can use the utilities |
18 // below to retrieve the PrefServiceSyncable (or its incognito | 19 // below to retrieve the PrefServiceSyncable (or its incognito |
19 // version) from a Profile. | 20 // version) from a Profile. |
20 PrefServiceSyncable* PrefServiceSyncableFromProfile(Profile* profile); | 21 PrefServiceSyncable* PrefServiceSyncableFromProfile(Profile* profile); |
21 PrefServiceSyncable* PrefServiceSyncableIncognitoFromProfile(Profile* profile); | 22 PrefServiceSyncable* PrefServiceSyncableIncognitoFromProfile(Profile* profile); |
22 | 23 |
24 // Creates an incognito copy of the pref service that shares most pref stores | |
gab
2015/09/14 16:20:10
s/the pref service/|pref_service|/
gab
2015/09/14 16:20:10
s/shares most pref stores/shares most prefs/
sdefresne
2015/09/14 17:28:29
Done and done.
| |
25 // but uses a fresh non-persistent overlay for the user pref store and an | |
26 // individual extension pref store (to cache the effective extension prefs for | |
27 // incognito windows). | |
28 PrefServiceSyncable* CreateIncognitoPrefServiceSyncable( | |
29 PrefServiceSyncable* pref_service, | |
30 PrefStore* incognito_extension_prefs); | |
gab
2015/09/14 16:20:10
I know this was there prior to your change, but co
sdefresne
2015/09/14 17:28:29
Done.
| |
31 | |
23 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_UTIL_H_ | 32 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_UTIL_H_ |
OLD | NEW |