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

Unified Diff: sync/engine/sync_scheduler_impl.cc

Issue 171813013: sync: Merge GU retry logic into normal GU (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 10 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/engine/sync_scheduler_impl.h ('k') | sync/engine/sync_scheduler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/sync_scheduler_impl.cc
diff --git a/sync/engine/sync_scheduler_impl.cc b/sync/engine/sync_scheduler_impl.cc
index ddd5baa6b8290f4440fd663f589e371702902683..6ff250f6fee386fe23d4b2774ca1252ca0f63e42 100644
--- a/sync/engine/sync_scheduler_impl.cc
+++ b/sync/engine/sync_scheduler_impl.cc
@@ -238,8 +238,7 @@ void SyncSchedulerImpl::Start(Mode mode) {
// Update our current time before checking IsRetryRequired().
nudge_tracker_.SetSyncCycleStartTime(base::TimeTicks::Now());
- if ((nudge_tracker_.IsSyncRequired() || nudge_tracker_.IsRetryRequired()) &&
- CanRunNudgeJobNow(NORMAL_PRIORITY)) {
+ if (nudge_tracker_.IsSyncRequired() && CanRunNudgeJobNow(NORMAL_PRIORITY)) {
TrySyncSessionJob();
}
}
@@ -572,25 +571,6 @@ void SyncSchedulerImpl::DoPollSyncSessionJob() {
}
}
-void SyncSchedulerImpl::DoRetrySyncSessionJob() {
- DCHECK(CalledOnValidThread());
- DCHECK_EQ(mode_, NORMAL_MODE);
-
- base::AutoReset<bool> protector(&no_scheduling_allowed_, true);
-
- SDVLOG(2) << "Retrying with types "
- << ModelTypeSetToString(GetEnabledAndUnthrottledTypes());
- scoped_ptr<SyncSession> session(SyncSession::Build(session_context_, this));
- if (syncer_->RetrySyncShare(GetEnabledAndUnthrottledTypes(),
- session.get()) &&
- !sessions::HasSyncerError(
- session->status_controller().model_neutral_state())) {
- nudge_tracker_.RecordSuccessfulSyncCycle();
- } else {
- HandleFailure(session->status_controller().model_neutral_state());
- }
-}
-
void SyncSchedulerImpl::UpdateNudgeTimeRecords(ModelTypeSet types) {
DCHECK(CalledOnValidThread());
base::TimeTicks now = TimeTicks::Now();
@@ -704,8 +684,6 @@ void SyncSchedulerImpl::TrySyncSessionJobImpl() {
if (nudge_tracker_.IsSyncRequired()) {
SDVLOG(2) << "Found pending nudge job";
DoNudgeSyncSessionJob(priority);
- } else if (nudge_tracker_.IsRetryRequired()) {
- DoRetrySyncSessionJob();
} else if (do_poll_after_credentials_updated_ ||
((base::TimeTicks::Now() - last_poll_reset_) >= GetPollInterval())) {
DoPollSyncSessionJob();
« no previous file with comments | « sync/engine/sync_scheduler_impl.h ('k') | sync/engine/sync_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698