| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |