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 "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "chrome/browser/prefs/pref_model_associator.h" | 9 #include "chrome/browser/prefs/pref_model_associator.h" |
10 #include "chrome/browser/prefs/synced_pref_observer.h" | 10 #include "chrome/browser/prefs/synced_pref_observer.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 void UpdateCommandLinePrefStore(PrefStore* cmd_line_store) override; | 82 void UpdateCommandLinePrefStore(PrefStore* cmd_line_store) override; |
83 | 83 |
84 void AddSyncedPrefObserver(const std::string& name, | 84 void AddSyncedPrefObserver(const std::string& name, |
85 SyncedPrefObserver* observer); | 85 SyncedPrefObserver* observer); |
86 void RemoveSyncedPrefObserver(const std::string& name, | 86 void RemoveSyncedPrefObserver(const std::string& name, |
87 SyncedPrefObserver* observer); | 87 SyncedPrefObserver* observer); |
88 | 88 |
89 private: | 89 private: |
90 friend class PrefModelAssociator; | 90 friend class PrefModelAssociator; |
91 | 91 |
92 void AddRegisteredSyncablePreference( | 92 void AddRegisteredSyncablePreference(const char* path, uint32 flags); |
93 const char* path, | |
94 const user_prefs::PrefRegistrySyncable::PrefSyncStatus sync_status); | |
95 | 93 |
96 // Invoked internally when the IsSyncing() state changes. | 94 // Invoked internally when the IsSyncing() state changes. |
97 void OnIsSyncingChanged(); | 95 void OnIsSyncingChanged(); |
98 | 96 |
99 // Process a local preference change. This can trigger new SyncChanges being | 97 // Process a local preference change. This can trigger new SyncChanges being |
100 // sent to the syncer. | 98 // sent to the syncer. |
101 void ProcessPrefChange(const std::string& name); | 99 void ProcessPrefChange(const std::string& name); |
102 | 100 |
103 // Whether CreateIncognitoPrefService() has been called to create a | 101 // Whether CreateIncognitoPrefService() has been called to create a |
104 // "forked" PrefService. | 102 // "forked" PrefService. |
105 bool pref_service_forked_; | 103 bool pref_service_forked_; |
106 | 104 |
107 PrefModelAssociator pref_sync_associator_; | 105 PrefModelAssociator pref_sync_associator_; |
108 PrefModelAssociator priority_pref_sync_associator_; | 106 PrefModelAssociator priority_pref_sync_associator_; |
109 | 107 |
110 ObserverList<PrefServiceSyncableObserver> observer_list_; | 108 ObserverList<PrefServiceSyncableObserver> observer_list_; |
111 | 109 |
112 DISALLOW_COPY_AND_ASSIGN(PrefServiceSyncable); | 110 DISALLOW_COPY_AND_ASSIGN(PrefServiceSyncable); |
113 }; | 111 }; |
114 | 112 |
115 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_H_ | 113 #endif // CHROME_BROWSER_PREFS_PREF_SERVICE_SYNCABLE_H_ |
OLD | NEW |