diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-20 05:35:33 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-20 05:35:33 +0000 |
commit | 92816e3ba6049bd90ea487564ce109976d5733a6 (patch) | |
tree | 9a6f34e11dbd0f847d41f03ff20619ba2cdf17fe /sync/protocol | |
parent | 9abe1698b556c9baa5f4dd74adf39b0ae1723e79 (diff) | |
download | chromium_src-92816e3ba6049bd90ea487564ce109976d5733a6.zip chromium_src-92816e3ba6049bd90ea487564ce109976d5733a6.tar.gz chromium_src-92816e3ba6049bd90ea487564ce109976d5733a6.tar.bz2 |
sync: Add pre-commit update avoidance mode + flag
This CL allows the syncer to avoid requesting updates from the server
prior to a commit if the nudge tracker determines that such a request is
not necessary. In general, the nudge tracker will consider such a
request to be unnecessary unless the sync cycle was triggered by a local
refresh request or an invalidation, or invalidations are disabled.
This behavior is enabled only if explicitly requested by the client or
the server. The client can enable this mode with the command-line flag
'--sync-enable-get-update-avoidance'. The server can toggle it on or
off with the 'pre_commit_update_avoidance' experiment. Unless at least
one of these flags are set, this CL will have no effect on syncer
behavior.
When this experimental mode is enabled, the SyncScheduler will use the
"short poll" interval rather than the "long poll". This should help
clients keep in sync with each other even if the experiment breaks.
Also included in this CL are some extensions to the python test server
to enable manual testing of the pre_commit_update_avoidance experiment
node.
BUG=147685
Review URL: https://chromiumcodereview.appspot.com/19309002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212746 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/protocol')
-rw-r--r-- | sync/protocol/experiments_specifics.proto | 6 | ||||
-rw-r--r-- | sync/protocol/proto_value_conversions.cc | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/sync/protocol/experiments_specifics.proto b/sync/protocol/experiments_specifics.proto index f834cb9..1e8732f 100644 --- a/sync/protocol/experiments_specifics.proto +++ b/sync/protocol/experiments_specifics.proto @@ -34,6 +34,11 @@ message FaviconSyncFlags { optional int32 favicon_sync_limit = 2 [default = 200]; } +// Flags for enabling the experimental no-precommit GU feature. +message PreCommitUpdateAvoidanceFlags { + optional bool enabled = 1; +} + // Contains one flag or set of related flags. Each node of the experiments type // will have a unique_client_tag identifying which flags it contains. By // convention, the tag name should match the sub-message name. @@ -42,4 +47,5 @@ message ExperimentsSpecifics { optional HistoryDeleteDirectives history_delete_directives = 2; optional AutofillCullingFlags autofill_culling = 3; optional FaviconSyncFlags favicon_sync = 4; + optional PreCommitUpdateAvoidanceFlags pre_commit_update_avoidance = 5; } diff --git a/sync/protocol/proto_value_conversions.cc b/sync/protocol/proto_value_conversions.cc index f0a2011..9ccc5eb 100644 --- a/sync/protocol/proto_value_conversions.cc +++ b/sync/protocol/proto_value_conversions.cc @@ -352,6 +352,7 @@ base::DictionaryValue* ExperimentsSpecificsToValue( SET_EXPERIMENT_ENABLED_FIELD(keystore_encryption); SET_EXPERIMENT_ENABLED_FIELD(history_delete_directives); SET_EXPERIMENT_ENABLED_FIELD(autofill_culling); + SET_EXPERIMENT_ENABLED_FIELD(pre_commit_update_avoidance); if (proto.has_favicon_sync()) SET(favicon_sync, FaviconSyncFlagsToValue); return value; |