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

Side by Side Diff: chrome/browser/prefs/pref_service_syncable_util.h

Issue 2860683002: WIP: Pref service: use the incognito support from Chrome
Patch Set: Rebase Created 3 years, 7 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 unified diff | Download patch
OLDNEW
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;
9 class Profile; 8 class Profile;
10 9
11 namespace sync_preferences { 10 namespace sync_preferences {
12 class PrefServiceSyncable; 11 class PrefServiceSyncable;
13 } 12 }
14 13
15 // sync_preferences::PrefServiceSyncable is a PrefService with added integration 14 // sync_preferences::PrefServiceSyncable is a PrefService with added integration
16 // for sync, and knowledge of how to create an incognito PrefService. For code 15 // 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 16 // that does not need to know about the sync integration, you should use only
18 // the plain PrefService type. 17 // the plain PrefService type.
19 // 18 //
20 // For this reason, Profile does not expose an accessor for the 19 // For this reason, Profile does not expose an accessor for the
21 // sync_preferences::PrefServiceSyncable type. Instead, you can use the 20 // sync_preferences::PrefServiceSyncable type. Instead, you can use the
22 // utilities below to retrieve the sync_preferences::PrefServiceSyncable (or its 21 // utilities below to retrieve the sync_preferences::PrefServiceSyncable (or its
23 // incognito version) from a Profile. 22 // incognito version) from a Profile.
24 sync_preferences::PrefServiceSyncable* PrefServiceSyncableFromProfile( 23 sync_preferences::PrefServiceSyncable* PrefServiceSyncableFromProfile(
25 Profile* profile); 24 Profile* profile);
26 sync_preferences::PrefServiceSyncable* PrefServiceSyncableIncognitoFromProfile(
27 Profile* profile);
28
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
32 // windows).
33 sync_preferences::PrefServiceSyncable* CreateIncognitoPrefServiceSyncable(
34 sync_preferences::PrefServiceSyncable* pref_service,
35 PrefStore* incognito_extension_pref_store);
36 25
37 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_UTIL_H_ 26 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/prefs/chrome_pref_service_factory.cc ('k') | chrome/browser/prefs/pref_service_syncable_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698