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

Side by Side Diff: components/sync_preferences/pref_service_syncable.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 COMPONENTS_SYNC_PREFERENCES_PREF_SERVICE_SYNCABLE_H_ 5 #ifndef COMPONENTS_SYNC_PREFERENCES_PREF_SERVICE_SYNCABLE_H_
6 #define COMPONENTS_SYNC_PREFERENCES_PREF_SERVICE_SYNCABLE_H_ 6 #define COMPONENTS_SYNC_PREFERENCES_PREF_SERVICE_SYNCABLE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 26 matching lines...) Expand all
37 PrefNotifierImpl* pref_notifier, 37 PrefNotifierImpl* pref_notifier,
38 PrefValueStore* pref_value_store, 38 PrefValueStore* pref_value_store,
39 PersistentPrefStore* user_prefs, 39 PersistentPrefStore* user_prefs,
40 user_prefs::PrefRegistrySyncable* pref_registry, 40 user_prefs::PrefRegistrySyncable* pref_registry,
41 const PrefModelAssociatorClient* pref_model_associato_client, 41 const PrefModelAssociatorClient* pref_model_associato_client,
42 base::Callback<void(PersistentPrefStore::PrefReadError)> 42 base::Callback<void(PersistentPrefStore::PrefReadError)>
43 read_error_callback, 43 read_error_callback,
44 bool async); 44 bool async);
45 ~PrefServiceSyncable() override; 45 ~PrefServiceSyncable() override;
46 46
47 // Creates an incognito copy of the pref service that shares most pref stores
48 // but uses a fresh non-persistent overlay for the user pref store and an
49 // individual extension pref store (to cache the effective extension prefs for
50 // incognito windows). |overlay_pref_names| is a list of preference names
51 // whose changes will not be persisted by the returned incognito pref service.
52 PrefServiceSyncable* CreateIncognitoPrefService(
53 PrefStore* incognito_extension_pref_store,
54 const std::vector<const char*>& overlay_pref_names);
55
56 // Returns true if preferences state has synchronized with the remote 47 // Returns true if preferences state has synchronized with the remote
57 // preferences. If true is returned it can be assumed the local preferences 48 // preferences. If true is returned it can be assumed the local preferences
58 // has applied changes from the remote preferences. The two may not be 49 // has applied changes from the remote preferences. The two may not be
59 // identical if a change is in flight (from either side). 50 // identical if a change is in flight (from either side).
60 // 51 //
61 // TODO(albertb): Given that we now support priority preferences, callers of 52 // TODO(albertb): Given that we now support priority preferences, callers of
62 // this method are likely better off making the preferences they care about 53 // this method are likely better off making the preferences they care about
63 // into priority preferences and calling IsPrioritySyncing(). 54 // into priority preferences and calling IsPrioritySyncing().
64 bool IsSyncing(); 55 bool IsSyncing();
65 56
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 PrefModelAssociator priority_pref_sync_associator_; 104 PrefModelAssociator priority_pref_sync_associator_;
114 105
115 base::ObserverList<PrefServiceSyncableObserver> observer_list_; 106 base::ObserverList<PrefServiceSyncableObserver> observer_list_;
116 107
117 DISALLOW_COPY_AND_ASSIGN(PrefServiceSyncable); 108 DISALLOW_COPY_AND_ASSIGN(PrefServiceSyncable);
118 }; 109 };
119 110
120 } // namespace sync_preferences 111 } // namespace sync_preferences
121 112
122 #endif // COMPONENTS_SYNC_PREFERENCES_PREF_SERVICE_SYNCABLE_H_ 113 #endif // COMPONENTS_SYNC_PREFERENCES_PREF_SERVICE_SYNCABLE_H_
OLDNEW
« no previous file with comments | « components/prefs/pref_value_store.cc ('k') | components/sync_preferences/pref_service_syncable.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698