OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |