diff options
author | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-22 21:41:11 +0000 |
---|---|---|
committer | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-22 21:45:07 +0000 |
commit | 9b8535f1150f0b8dc6920ba47c8436510b302693 (patch) | |
tree | 8b5c09e3f11a27269a1b8638e4daa52da9796042 /sync/protocol | |
parent | 272098237b925537dccc45bab30006a27831a3ed (diff) | |
download | chromium_src-9b8535f1150f0b8dc6920ba47c8436510b302693.zip chromium_src-9b8535f1150f0b8dc6920ba47c8436510b302693.tar.gz chromium_src-9b8535f1150f0b8dc6920ba47c8436510b302693.tar.bz2 |
[Sync] Add support for server controlled nudge delays
Server nudge delays override the local ones, but must be longer than the
default nudge delay. If set to 0, will reset the nudge to the default.
To accomplish this the delay logic was refactored and moved into the sync
scheduler, which is now aware of all delays for all types and sync cycles.
BUG=401600
Review URL: https://codereview.chromium.org/488843002
Cr-Commit-Position: refs/heads/master@{#291512}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291512 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/protocol')
-rw-r--r-- | sync/protocol/client_commands.proto | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sync/protocol/client_commands.proto b/sync/protocol/client_commands.proto index e36914a..fa9c714 100644 --- a/sync/protocol/client_commands.proto +++ b/sync/protocol/client_commands.proto @@ -14,6 +14,11 @@ option retain_unknown_fields = true; package sync_pb; +message CustomNudgeDelay { + optional int32 datatype_id = 1; // Datatype id. + optional int32 delay_ms = 2; // Delay in milliseconds. +}; + message ClientCommand { // Time to wait before sending any requests to the server. optional int32 set_sync_poll_interval = 1; // in seconds @@ -21,9 +26,8 @@ message ClientCommand { optional int32 max_commit_batch_size = 3; - // Number of seconds to delay between a sessions - // action and sending a commit message to the - // server + // Number of seconds to delay between a sessions action and sending a commit + // message to the server. Can be overridden by |custom_nudge_delays|. optional int32 sessions_commit_delay_seconds = 4; // Number of seconds to delay before the throttled client should retry. @@ -34,4 +38,10 @@ message ClientCommand { // Time to wait before issuing a retry GU. optional int32 gu_retry_delay_seconds = 7; + + // A dictionary of custom nudge delays. + // Note: if a SESSIONS value is present, this will override + // |sessions_commit_delay_seconds| + // New in M39. + repeated CustomNudgeDelay custom_nudge_delays = 8; }; |