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

Side by Side Diff: sync/engine/sync_scheduler_impl.cc

Issue 905853002: Sync commit errors should temporarily re-enable trigger pre-commit getupdates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « sync/engine/commit.cc ('k') | sync/engine/sync_scheduler_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sync/engine/sync_scheduler_impl.h" 5 #include "sync/engine/sync_scheduler_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstring> 8 #include <cstring>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 } 458 }
459 459
460 void SyncSchedulerImpl::DoNudgeSyncSessionJob(JobPriority priority) { 460 void SyncSchedulerImpl::DoNudgeSyncSessionJob(JobPriority priority) {
461 DCHECK(CalledOnValidThread()); 461 DCHECK(CalledOnValidThread());
462 DCHECK(CanRunNudgeJobNow(priority)); 462 DCHECK(CanRunNudgeJobNow(priority));
463 463
464 DVLOG(2) << "Will run normal mode sync cycle with types " 464 DVLOG(2) << "Will run normal mode sync cycle with types "
465 << ModelTypeSetToString(session_context_->GetEnabledTypes()); 465 << ModelTypeSetToString(session_context_->GetEnabledTypes());
466 scoped_ptr<SyncSession> session(SyncSession::Build(session_context_, this)); 466 scoped_ptr<SyncSession> session(SyncSession::Build(session_context_, this));
467 bool premature_exit = !syncer_->NormalSyncShare( 467 bool premature_exit = !syncer_->NormalSyncShare(
468 GetEnabledAndUnthrottledTypes(), 468 GetEnabledAndUnthrottledTypes(), &nudge_tracker_, session.get());
469 nudge_tracker_,
470 session.get());
471 AdjustPolling(FORCE_RESET); 469 AdjustPolling(FORCE_RESET);
472 // Don't run poll job till the next time poll timer fires. 470 // Don't run poll job till the next time poll timer fires.
473 do_poll_after_credentials_updated_ = false; 471 do_poll_after_credentials_updated_ = false;
474 472
475 bool success = !premature_exit 473 bool success = !premature_exit
476 && !sessions::HasSyncerError( 474 && !sessions::HasSyncerError(
477 session->status_controller().model_neutral_state()); 475 session->status_controller().model_neutral_state());
478 476
479 if (success) { 477 if (success) {
480 // That cycle took care of any outstanding work we had. 478 // That cycle took care of any outstanding work we had.
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 907
910 #undef SDVLOG_LOC 908 #undef SDVLOG_LOC
911 909
912 #undef SDVLOG 910 #undef SDVLOG
913 911
914 #undef SLOG 912 #undef SLOG
915 913
916 #undef ENUM_CASE 914 #undef ENUM_CASE
917 915
918 } // namespace syncer 916 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/commit.cc ('k') | sync/engine/sync_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698