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

Unified Diff: sync/engine/sync_scheduler_impl.h

Issue 13422003: sync: Refactor job ownership in SyncScheduler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove nudge while in backoff Created 7 years, 9 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 | sync/engine/sync_scheduler_impl.cc » ('j') | sync/engine/sync_scheduler_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/sync_scheduler_impl.h
diff --git a/sync/engine/sync_scheduler_impl.h b/sync/engine/sync_scheduler_impl.h
index f1502e0a36f57c5a094e36960cae84b39e4dad8e..1d26bf59647209881bb16014d39a15282e708762 100644
--- a/sync/engine/sync_scheduler_impl.h
+++ b/sync/engine/sync_scheduler_impl.h
@@ -147,28 +147,19 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl : public SyncScheduler {
// This bool is set to true if we have observed a nudge during this
tim (not reviewing) 2013/04/05 16:56:44 Remove comment.
rlarocque 2013/04/05 19:13:29 Done.
// interval and mode == EXPONENTIAL_BACKOFF.
- bool had_nudge;
base::TimeDelta length;
- base::OneShotTimer<SyncSchedulerImpl> timer;
};
static const char* GetModeString(Mode mode);
static const char* GetDecisionString(JobProcessDecision decision);
- // Helper to cancel any existing delayed task and replace it with a new one.
- // It will not post any tasks if the scheduler is in a "stopped" state.
- void PostDelayedTask(const tracked_objects::Location& from_here,
- const char* name,
- const base::Closure& task,
- base::TimeDelta delay);
-
// Invoke the syncer to perform a non-POLL job.
bool DoSyncSessionJobImpl(scoped_ptr<SyncSessionJob> job,
JobPriority priority);
// Invoke the syncer to perform a nudge job.
- bool DoNudgeSyncSessionJob(JobPriority priority);
+ void DoNudgeSyncSessionJob(JobPriority priority);
// Invoke the syncer to perform a configuration job.
bool DoConfigurationSyncSessionJob(JobPriority priority);
@@ -302,9 +293,8 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl : public SyncScheduler {
scoped_ptr<BackoffDelayProvider> delay_provider_;
- // We allow at most one PostedTask to be pending at one time. This is it.
- // We will cancel this task before starting a new one.
- base::CancelableClosure pending_wakeup_event_;
+ // The event that will wake us up.
+ base::OneShotTimer<SyncSchedulerImpl> pending_wakeup_timer_;
// Pending configure job storage. Note that
// (mode_ != CONFIGURATION_MODE) \implies !pending_configure_job_.
« no previous file with comments | « no previous file | sync/engine/sync_scheduler_impl.cc » ('j') | sync/engine/sync_scheduler_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698