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

Side by Side Diff: components/sync/base/sync_prefs.h

Issue 2427803002: [Sync] Replacing NULL with nullptr in code and null in comments for components/sync/ (Closed)
Patch Set: Fixing start of sentence capitlization. Created 4 years, 2 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
« no previous file with comments | « components/sync/base/enum_set.h ('k') | components/sync/base/sync_prefs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BASE_SYNC_PREFS_H_ 5 #ifndef COMPONENTS_SYNC_BASE_SYNC_PREFS_H_
6 #define COMPONENTS_SYNC_BASE_SYNC_PREFS_H_ 6 #define COMPONENTS_SYNC_BASE_SYNC_PREFS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // 50 //
51 // profile_sync_service_startup_unittest.cc 51 // profile_sync_service_startup_unittest.cc
52 // profile_sync_service.cc 52 // profile_sync_service.cc
53 // sync_setup_flow.cc 53 // sync_setup_flow.cc
54 // sync_setup_wizard.cc 54 // sync_setup_wizard.cc
55 // sync_setup_wizard_unittest.cc 55 // sync_setup_wizard_unittest.cc
56 // two_client_preferences_sync_test.cc 56 // two_client_preferences_sync_test.cc
57 class SyncPrefs : NON_EXPORTED_BASE(public base::NonThreadSafe), 57 class SyncPrefs : NON_EXPORTED_BASE(public base::NonThreadSafe),
58 public base::SupportsWeakPtr<SyncPrefs> { 58 public base::SupportsWeakPtr<SyncPrefs> {
59 public: 59 public:
60 // |pref_service| may not be NULL. 60 // |pref_service| may not be null.
61 // Does not take ownership of |pref_service|. 61 // Does not take ownership of |pref_service|.
62 explicit SyncPrefs(PrefService* pref_service); 62 explicit SyncPrefs(PrefService* pref_service);
63 63
64 // For testing. 64 // For testing.
65 SyncPrefs(); 65 SyncPrefs();
66 66
67 virtual ~SyncPrefs(); 67 virtual ~SyncPrefs();
68 68
69 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 69 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
70 70
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 bool GetDataTypePreferred(ModelType type) const; 191 bool GetDataTypePreferred(ModelType type) const;
192 void SetDataTypePreferred(ModelType type, bool is_preferred); 192 void SetDataTypePreferred(ModelType type, bool is_preferred);
193 193
194 // Returns a ModelTypeSet based on |types| expanded to include pref groups 194 // Returns a ModelTypeSet based on |types| expanded to include pref groups
195 // (see |pref_groups_|), but as a subset of |registered_types|. 195 // (see |pref_groups_|), but as a subset of |registered_types|.
196 ModelTypeSet ResolvePrefGroups(ModelTypeSet registered_types, 196 ModelTypeSet ResolvePrefGroups(ModelTypeSet registered_types,
197 ModelTypeSet types) const; 197 ModelTypeSet types) const;
198 198
199 void OnSyncManagedPrefChanged(); 199 void OnSyncManagedPrefChanged();
200 200
201 // May be NULL. 201 // May be null.
202 PrefService* const pref_service_; 202 PrefService* const pref_service_;
203 203
204 base::ObserverList<SyncPrefObserver> sync_pref_observers_; 204 base::ObserverList<SyncPrefObserver> sync_pref_observers_;
205 205
206 // The preference that controls whether sync is under control by 206 // The preference that controls whether sync is under control by
207 // configuration management. 207 // configuration management.
208 BooleanPrefMember pref_sync_managed_; 208 BooleanPrefMember pref_sync_managed_;
209 209
210 // Groups of prefs that always have the same value as a "master" pref. 210 // Groups of prefs that always have the same value as a "master" pref.
211 // For example, the APPS group has {APP_NOTIFICATIONS, APP_SETTINGS} 211 // For example, the APPS group has {APP_NOTIFICATIONS, APP_SETTINGS}
212 // (as well as APPS, but that is implied), so 212 // (as well as APPS, but that is implied), so
213 // pref_groups_[APPS] = { APP_NOTIFICATIONS, 213 // pref_groups_[APPS] = { APP_NOTIFICATIONS,
214 // APP_SETTINGS } 214 // APP_SETTINGS }
215 // pref_groups_[EXTENSIONS] = { EXTENSION_SETTINGS } 215 // pref_groups_[EXTENSIONS] = { EXTENSION_SETTINGS }
216 // etc. 216 // etc.
217 typedef std::map<ModelType, ModelTypeSet> PrefGroupsMap; 217 typedef std::map<ModelType, ModelTypeSet> PrefGroupsMap;
218 PrefGroupsMap pref_groups_; 218 PrefGroupsMap pref_groups_;
219 219
220 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); 220 DISALLOW_COPY_AND_ASSIGN(SyncPrefs);
221 }; 221 };
222 222
223 } // namespace syncer 223 } // namespace syncer
224 224
225 #endif // COMPONENTS_SYNC_BASE_SYNC_PREFS_H_ 225 #endif // COMPONENTS_SYNC_BASE_SYNC_PREFS_H_
OLDNEW
« no previous file with comments | « components/sync/base/enum_set.h ('k') | components/sync/base/sync_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698