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

Unified Diff: components/sync/engine_impl/sync_scheduler_impl.h

Issue 2828423002: [Sync] Sync types never recovers from throttle (Closed)
Patch Set: rebase Created 3 years, 8 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 | « no previous file | components/sync/engine_impl/sync_scheduler_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/engine_impl/sync_scheduler_impl.h
diff --git a/components/sync/engine_impl/sync_scheduler_impl.h b/components/sync/engine_impl/sync_scheduler_impl.h
index edf0e1c1904ad484f9ae02124a08631a0f949bcc..92572f8f64bc8bdf81d4be37f31aceb4486770d5 100644
--- a/components/sync/engine_impl/sync_scheduler_impl.h
+++ b/components/sync/engine_impl/sync_scheduler_impl.h
@@ -148,6 +148,13 @@ class SyncSchedulerImpl : public SyncScheduler, public base::NonThreadSafe {
void AdjustPolling(PollAdjustType type);
// Helper to restart pending_wakeup_timer_.
+ // This function need to be called in 3 conditions, backoff/throttling
+ // happens, unbackoff/unthrottling happens and after |PerformDelayedNudge|
+ // runs.
+ // This function is for scheduling unbackoff/unthrottling jobs, and the
+ // poriority is, global unbackoff/unthrottling job first, if there is no
+ // global backoff/throttling, then try to schedule types
+ // unbackoff/unthrottling job.
void RestartWaiting();
// Determines if we're allowed to contact the server right now.
@@ -216,6 +223,8 @@ class SyncSchedulerImpl : public SyncScheduler, public base::NonThreadSafe {
// is the most flexible place to do this bookkeeping.
void UpdateNudgeTimeRecords(ModelTypeSet types);
+ bool IsEarlierThanCurrentPendingJob(const base::TimeDelta& delay);
+
// Used for logging.
const std::string name_;
@@ -240,6 +249,8 @@ class SyncSchedulerImpl : public SyncScheduler, public base::NonThreadSafe {
std::unique_ptr<BackoffDelayProvider> delay_provider_;
+ // TODO(gangwu): http://crbug.com/714868 too many timers in this class, try to
+ // reduce them.
// The event that will wake us up.
// When the whole client got throttling or backoff, we will delay this timer
// as well.
« no previous file with comments | « no previous file | components/sync/engine_impl/sync_scheduler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698