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 CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_H_ | 5 #ifndef CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_H_ |
6 #define CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_H_ | 6 #define CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_H_ |
7 | 7 |
8 #include "chrome/browser/prefs/pref_model_associator.h" | 8 #include "chrome/browser/prefs/pref_model_associator.h" |
9 #include "chrome/browser/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
10 | 10 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 // TODO(zea): Have PrefServiceSyncable implement | 105 // TODO(zea): Have PrefServiceSyncable implement |
106 // syncer::SyncableService directly. | 106 // syncer::SyncableService directly. |
107 syncer::SyncableService* GetSyncableService(); | 107 syncer::SyncableService* GetSyncableService(); |
108 | 108 |
109 // Do not call this after having derived an incognito or per tab pref service. | 109 // Do not call this after having derived an incognito or per tab pref service. |
110 virtual void UpdateCommandLinePrefStore(PrefStore* cmd_line_store) OVERRIDE; | 110 virtual void UpdateCommandLinePrefStore(PrefStore* cmd_line_store) OVERRIDE; |
111 | 111 |
112 private: | 112 private: |
113 friend class PrefModelAssociator; | 113 friend class PrefModelAssociator; |
114 | 114 |
| 115 virtual bool AllowPrefRegistrarSimple() const OVERRIDE; |
| 116 |
115 // Invoked internally when the IsSyncing() state changes. | 117 // Invoked internally when the IsSyncing() state changes. |
116 void OnIsSyncingChanged(); | 118 void OnIsSyncingChanged(); |
117 | 119 |
118 // Registers a preference at |path| with |default_value|. If the | 120 // Registers a preference at |path| with |default_value|. If the |
119 // preference is syncable per |sync_status|, also registers it with | 121 // preference is syncable per |sync_status|, also registers it with |
120 // PrefModelAssociator. | 122 // PrefModelAssociator. |
121 void RegisterSyncablePreference(const char* path, | 123 void RegisterSyncablePreference(const char* path, |
122 Value* default_value, | 124 Value* default_value, |
123 PrefSyncStatus sync_status); | 125 PrefSyncStatus sync_status); |
124 | 126 |
125 // Whether CreateIncognitoPrefService() has been called to create a | 127 // Whether CreateIncognitoPrefService() has been called to create a |
126 // "forked" PrefService. | 128 // "forked" PrefService. |
127 bool pref_service_forked_; | 129 bool pref_service_forked_; |
128 | 130 |
129 PrefModelAssociator pref_sync_associator_; | 131 PrefModelAssociator pref_sync_associator_; |
130 | 132 |
131 ObserverList<PrefServiceObserver> observer_list_; | 133 ObserverList<PrefServiceObserver> observer_list_; |
132 | 134 |
133 DISALLOW_COPY_AND_ASSIGN(PrefServiceSyncable); | 135 DISALLOW_COPY_AND_ASSIGN(PrefServiceSyncable); |
134 }; | 136 }; |
135 | 137 |
136 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_H_ | 138 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_H_ |
OLD | NEW |