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

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

Issue 12286007: Revert "Revert 182527" ([Sync] Make SESSIONS an implicit type) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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 | « chrome/common/pref_names.cc ('k') | sync/protocol/proto_value_conversions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4b9e721ade441a7d6f94cca53aa129477e131ba9..a44ad198cfad440c9f05d4eed2d18c41883f9589 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 proxy types.
+ //
// A bookmark folder or a bookmark URL object.
BOOKMARKS,
FIRST_USER_MODEL_TYPE = BOOKMARKS, // Declared 2nd, for debugger prettiness.
@@ -90,8 +95,22 @@ enum ModelType {
FAVICON_IMAGES,
// Favicon tracking information.
FAVICON_TRACKING,
- LAST_USER_MODEL_TYPE = FAVICON_TRACKING,
+ // ---- Proxy types ----
+ // Proxy types are excluded from the sync protocol, but are still considered
+ // real user types. By convention, we prefix them with 'PROXY_' to distinguish
+ // them from normal protocol types.
+
+ // Tab sync. This is a placeholder type, so that Sessions can be implicitly
+ // enabled for history sync and tabs sync.
+ PROXY_TABS,
+
+ FIRST_PROXY_TYPE = PROXY_TABS,
+ LAST_PROXY_TYPE = PROXY_TABS,
+
+ LAST_USER_MODEL_TYPE = PROXY_TABS,
+
+ // ---- Control Types ----
// An object representing a set of Nigori keys.
NIGORI,
FIRST_CONTROL_MODEL_TYPE = NIGORI,
« no previous file with comments | « chrome/common/pref_names.cc ('k') | sync/protocol/proto_value_conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698