diff options
author | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-14 20:24:19 +0000 |
---|---|---|
committer | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-14 20:24:19 +0000 |
commit | a6fddf4f98b6c8e0a4dbe22bcac6a64dbd82ea75 (patch) | |
tree | 346b816eb88b4ed3b4a0610cdc18a458c051480f /sync/internal_api | |
parent | 9d47976a4e27c092a6730b47bb1fb59adce39f01 (diff) | |
download | chromium_src-a6fddf4f98b6c8e0a4dbe22bcac6a64dbd82ea75.zip chromium_src-a6fddf4f98b6c8e0a4dbe22bcac6a64dbd82ea75.tar.gz chromium_src-a6fddf4f98b6c8e0a4dbe22bcac6a64dbd82ea75.tar.bz2 |
[Sync] Make SESSIONS an implicit type
We add TABS as a new local type, which is now what is enabled via the user
settings. It implicitly enables SESSIONS.
Similarly, History now corresponds with Typed URLs, which implicitly enables
history delete directives if the proper command line flag is passed.
Finally, History delete directives implicitly enables SESSIONS, which we can do
because Sessions is no longer a user selectable type.
BUG=170162
TBR=jhawkins@chromium.org
Review URL: https://chromiumcodereview.appspot.com/11961030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182527 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api')
-rw-r--r-- | sync/internal_api/public/base/model_type.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/sync/internal_api/public/base/model_type.h b/sync/internal_api/public/base/model_type.h index 8eaf5d0..882c821 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,22 @@ enum ModelType { SYNCED_NOTIFICATIONS, // Custom spelling dictionary. DICTIONARY, - LAST_USER_MODEL_TYPE = DICTIONARY, + // ---- 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, |