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

Unified Diff: components/sync/base/model_type.h

Issue 2701003002: [Sync] Clean up ModelType code. (Closed)
Patch Set: Switched int to size_t to fix compile. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/base/enum_set_unittest.cc ('k') | components/sync/base/sync_prefs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/base/model_type.h
diff --git a/components/sync/base/model_type.h b/components/sync/base/model_type.h
index 6525c6a2169114f37ca284ec488709d855f73be1..c2840f1e9591be3b10695ade378908845f918bb9 100644
--- a/components/sync/base/model_type.h
+++ b/components/sync/base/model_type.h
@@ -89,14 +89,14 @@ enum ModelType {
APP_SETTINGS,
// An extension setting from the extension settings API.
EXTENSION_SETTINGS,
- // App notifications.
- APP_NOTIFICATIONS, // Deprecated.
+ // App notifications. Deprecated.
+ APP_NOTIFICATIONS,
// History delete directives.
HISTORY_DELETE_DIRECTIVES,
- // Synced push notifications.
- SYNCED_NOTIFICATIONS, // Deprecated.
- // Synced Notification app info.
- SYNCED_NOTIFICATION_APP_INFO, // Deprecated.
+ // Synced push notifications. Deprecated.
+ SYNCED_NOTIFICATIONS,
+ // Synced Notification app info. Deprecated.
+ SYNCED_NOTIFICATION_APP_INFO,
// Custom spelling dictionary.
DICTIONARY,
// Favicon images.
@@ -161,6 +161,9 @@ enum ModelType {
// histograms for sync include your new type. In this case, be sure to also
// update the UserSelectableTypes() definition in
// sync/syncable/model_type.cc.
+
+ // Additionally, enum SyncModelTypes and suffix SyncModelType need to be
+ // updated in histograms.xml for all new types.
MODEL_TYPE_COUNT,
};
@@ -175,9 +178,8 @@ inline ModelType ModelTypeFromInt(int i) {
return static_cast<ModelType>(i);
}
-// Used by tests outside of sync/.
-void AddDefaultFieldValue(ModelType datatype,
- sync_pb::EntitySpecifics* specifics);
+// Used to mark the type of EntitySpecifics that has no actual data.
+void AddDefaultFieldValue(ModelType type, sync_pb::EntitySpecifics* specifics);
// Extract the model type of a SyncEntity protocol buffer. ModelType is a
// local concept: the enum is not in the protocol. The SyncEntity's ModelType
« no previous file with comments | « components/sync/base/enum_set_unittest.cc ('k') | components/sync/base/sync_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698