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

Unified Diff: sync/sessions/data_type_tracker.h

Issue 488843002: [Sync] Add support for server controlled nudge delays (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 4 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 | « sync/protocol/client_commands.proto ('k') | sync/sessions/data_type_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/data_type_tracker.h
diff --git a/sync/sessions/data_type_tracker.h b/sync/sessions/data_type_tracker.h
index 7b0aba82bca096685c66f4e24b67f5f729e0dad5..c53f39318532d4b9383274eaae512d99e1b45d31 100644
--- a/sync/sessions/data_type_tracker.h
+++ b/sync/sessions/data_type_tracker.h
@@ -31,7 +31,8 @@ class DataTypeTracker {
// constructor and assignment operator.
// Tracks that a local change has been made to this type.
- void RecordLocalChange();
+ // Returns the current local change nudge delay for this type.
+ base::TimeDelta RecordLocalChange();
// Tracks that a local refresh request has been made for this type.
void RecordLocalRefreshRequest();
@@ -96,6 +97,9 @@ class DataTypeTracker {
// Unthrottles the type if |now| >= the throttle expiry time.
void UpdateThrottleState(base::TimeTicks now);
+ // Update the local change nudge delay for this type.
+ void UpdateLocalNudgeDelay(base::TimeDelta delay);
+
private:
// Number of local change nudges received for this type since the last
// successful sync cycle.
@@ -125,6 +129,10 @@ class DataTypeTracker {
// A helper to keep track invalidations we dropped due to overflow.
scoped_ptr<InvalidationInterface> last_dropped_invalidation_;
+ // The amount of time to delay a sync cycle by when a local change for this
+ // type occurs.
+ base::TimeDelta nudge_delay_;
+
DISALLOW_COPY_AND_ASSIGN(DataTypeTracker);
};
« no previous file with comments | « sync/protocol/client_commands.proto ('k') | sync/sessions/data_type_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698