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

Unified Diff: sync/internal_api/public/base/model_type.h

Issue 11961030: [Sync] Make SESSIONS an implicit type (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 11 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
Index: sync/internal_api/public/base/model_type.h
diff --git a/sync/internal_api/public/base/model_type.h b/sync/internal_api/public/base/model_type.h
index 16d10480cad3f706213f5825a631efe1199a801f..97ab9c21b4f37f6ea86eb8598bde4a1811662a4b 100644
--- a/sync/internal_api/public/base/model_type.h
+++ b/sync/internal_api/public/base/model_type.h
@@ -49,6 +49,11 @@ enum ModelType {
// can be represented in the protocol using a specific Message type in the
// EntitySpecifics protocol buffer.
//
+ // WARNING: Modifying the order of these types or inserting a new type above
+ // these will affect numerous histograms that rely on the enum values being
+ // consistent. When adding a new type, add it to the end of the user model
+ // types section, but before the virtual types.
+ //
// A bookmark folder or a bookmark URL object.
BOOKMARKS,
FIRST_USER_MODEL_TYPE = BOOKMARKS, // Declared 2nd, for debugger prettiness.
@@ -62,7 +67,6 @@ enum ModelType {
AUTOFILL_PROFILE,
// An autofill folder or an autofill object.
AUTOFILL,
-
// A themes folder or a themes object.
THEMES,
// A typed_url folder or a typed_url object.
@@ -85,8 +89,20 @@ enum ModelType {
HISTORY_DELETE_DIRECTIVES,
// Synced push notifications.
SYNCED_NOTIFICATIONS,
- LAST_USER_MODEL_TYPE = SYNCED_NOTIFICATIONS,
+ // ---- Virtual types ----
+ // Tab sync. This is a placeholder type, so that Sessions can be implicitly
+ // enabled for history sync. It does not have a sync representation.
+ TABS,
+
+ // Virtual types are excluded from certain sync-specific events, but are
+ // considered "Real User Types".
+ FIRST_VIRTUAL_TYPE = TABS,
+ LAST_VIRTUAL_TYPE = TABS,
+
+ LAST_USER_MODEL_TYPE = TABS,
+
+ // ---- Control Types ----
// An object representing a set of Nigori keys.
NIGORI,
FIRST_CONTROL_MODEL_TYPE = NIGORI,

Powered by Google App Engine
This is Rietveld 408576698