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

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: Cleanup 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
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 8eaf5d0e51faa11a41bec0bb9746bf43c6e796dc..06115279eaec51477921a73cb2e5f31b70c276a8 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.
@@ -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.
@@ -87,8 +91,20 @@ enum ModelType {
SYNCED_NOTIFICATIONS,
// Custom spelling dictionary.
DICTIONARY,
- LAST_USER_MODEL_TYPE = DICTIONARY,
+ // ---- Proxy 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,
tim (not reviewing) 2013/02/09 01:23:59 Perhaps we should prefix proxy types by convention
Nicolas Zea 2013/02/12 23:44:49 Done.
+
+ // Proxy types are excluded from the sync protocol, but are still considered
+ // real user types.
+ FIRST_PROXY_TYPE = TABS,
+ LAST_PROXY_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