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

Side by Side Diff: components/sync_driver/sync_prefs.h

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
Patch Set: Created 5 years, 6 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_DRIVER_SYNC_PREFS_H_ 5 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_
6 #define COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_ 6 #define COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // Returns a ModelTypeSet based on |types| expanded to include pref groups 166 // Returns a ModelTypeSet based on |types| expanded to include pref groups
167 // (see |pref_groups_|), but as a subset of |registered_types|. 167 // (see |pref_groups_|), but as a subset of |registered_types|.
168 syncer::ModelTypeSet ResolvePrefGroups(syncer::ModelTypeSet registered_types, 168 syncer::ModelTypeSet ResolvePrefGroups(syncer::ModelTypeSet registered_types,
169 syncer::ModelTypeSet types) const; 169 syncer::ModelTypeSet types) const;
170 170
171 void OnSyncManagedPrefChanged(); 171 void OnSyncManagedPrefChanged();
172 172
173 // May be NULL. 173 // May be NULL.
174 PrefService* const pref_service_; 174 PrefService* const pref_service_;
175 175
176 ObserverList<SyncPrefObserver> sync_pref_observers_; 176 base::ObserverList<SyncPrefObserver> sync_pref_observers_;
177 177
178 // The preference that controls whether sync is under control by 178 // The preference that controls whether sync is under control by
179 // configuration management. 179 // configuration management.
180 BooleanPrefMember pref_sync_managed_; 180 BooleanPrefMember pref_sync_managed_;
181 181
182 // Groups of prefs that always have the same value as a "master" pref. 182 // Groups of prefs that always have the same value as a "master" pref.
183 // For example, the APPS group has {APP_NOTIFICATIONS, APP_SETTINGS} 183 // For example, the APPS group has {APP_NOTIFICATIONS, APP_SETTINGS}
184 // (as well as APPS, but that is implied), so 184 // (as well as APPS, but that is implied), so
185 // pref_groups_[syncer::APPS] = { syncer::APP_NOTIFICATIONS, 185 // pref_groups_[syncer::APPS] = { syncer::APP_NOTIFICATIONS,
186 // syncer::APP_SETTINGS } 186 // syncer::APP_SETTINGS }
187 // pref_groups_[syncer::EXTENSIONS] = { syncer::EXTENSION_SETTINGS } 187 // pref_groups_[syncer::EXTENSIONS] = { syncer::EXTENSION_SETTINGS }
188 // etc. 188 // etc.
189 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap; 189 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap;
190 PrefGroupsMap pref_groups_; 190 PrefGroupsMap pref_groups_;
191 191
192 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); 192 DISALLOW_COPY_AND_ASSIGN(SyncPrefs);
193 }; 193 };
194 194
195 } // namespace sync_driver 195 } // namespace sync_driver
196 196
197 #endif // COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_ 197 #endif // COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_
OLDNEW
« no previous file with comments | « components/sync_driver/device_info_sync_service.h ('k') | components/translate/content/browser/content_translate_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698