| Index: sync/engine/sync_scheduler_impl.cc
|
| diff --git a/sync/engine/sync_scheduler_impl.cc b/sync/engine/sync_scheduler_impl.cc
|
| index d5f9dfff1f84f569d5704992240494ab757a7069..108f41b0e401dd3ae34ef88b260d519351cea13f 100644
|
| --- a/sync/engine/sync_scheduler_impl.cc
|
| +++ b/sync/engine/sync_scheduler_impl.cc
|
| @@ -291,8 +291,7 @@ void SyncSchedulerImpl::Start(Mode mode) {
|
| void SyncSchedulerImpl::SendInitialSnapshot() {
|
| DCHECK_EQ(MessageLoop::current(), sync_loop_);
|
| scoped_ptr<SyncSession> dummy(new SyncSession(session_context_, this,
|
| - SyncSourceInfo(), ModelSafeRoutingInfo(),
|
| - std::vector<ModelSafeWorker*>()));
|
| + SyncSourceInfo(), ModelSafeRoutingInfo()));
|
| SyncEngineEvent event(SyncEngineEvent::STATUS_CHANGED);
|
| event.snapshot = dummy->TakeSnapshot();
|
| session_context_->NotifyListeners(event);
|
| @@ -306,8 +305,7 @@ void BuildModelSafeParams(
|
| ModelTypeSet types_to_download,
|
| const ModelSafeRoutingInfo& current_routes,
|
| const std::vector<ModelSafeWorker*>& current_workers,
|
| - ModelSafeRoutingInfo* result_routes,
|
| - std::vector<ModelSafeWorker*>* result_workers) {
|
| + ModelSafeRoutingInfo* result_routes) {
|
| std::set<ModelSafeGroup> active_groups;
|
| active_groups.insert(GROUP_PASSIVE);
|
| for (ModelTypeSet::Iterator iter = types_to_download.First(); iter.Good();
|
| @@ -319,12 +317,6 @@ void BuildModelSafeParams(
|
| (*result_routes)[type] = group;
|
| active_groups.insert(group);
|
| }
|
| -
|
| - for(std::vector<ModelSafeWorker*>::const_iterator iter =
|
| - current_workers.begin(); iter != current_workers.end(); ++iter) {
|
| - if (active_groups.count((*iter)->GetModelSafeGroup()) > 0)
|
| - result_workers->push_back(*iter);
|
| - }
|
| }
|
|
|
| } // namespace.
|
| @@ -345,12 +337,10 @@ bool SyncSchedulerImpl::ScheduleConfiguration(
|
| // the routing info, we don't really need |restricted_workers|. Remove it.
|
| // crbug.com/133030
|
| ModelSafeRoutingInfo restricted_routes;
|
| - std::vector<ModelSafeWorker*> restricted_workers;
|
| BuildModelSafeParams(params.types_to_download,
|
| params.routing_info,
|
| session_context_->workers(),
|
| - &restricted_routes,
|
| - &restricted_workers);
|
| + &restricted_routes);
|
| session_context_->set_routing_info(params.routing_info);
|
|
|
| // Only reconfigure if we have types to download.
|
| @@ -363,8 +353,7 @@ bool SyncSchedulerImpl::ScheduleConfiguration(
|
| ModelSafeRoutingInfoToStateMap(
|
| restricted_routes,
|
| std::string())),
|
| - restricted_routes,
|
| - restricted_workers));
|
| + restricted_routes));
|
| SyncSessionJob job(SyncSessionJob::CONFIGURATION,
|
| TimeTicks::Now(),
|
| session,
|
| @@ -513,7 +502,7 @@ void SyncSchedulerImpl::InitOrCoalescePendingJob(const SyncSessionJob& job) {
|
| // Get a fresh session with similar configuration as before (resets
|
| // StatusController).
|
| scoped_ptr<SyncSession> session(new SyncSession(s->context(),
|
| - s->delegate(), s->source(), s->routing_info(), s->workers()));
|
| + s->delegate(), s->source(), s->routing_info()));
|
|
|
| SyncSessionJob new_job(SyncSessionJob::NUDGE, job.scheduled_start,
|
| make_linked_ptr(session.release()), false,
|
| @@ -563,7 +552,7 @@ void SyncSchedulerImpl::SaveJob(const SyncSessionJob& job) {
|
| DCHECK(!job.config_params.ready_task.is_null());
|
| SyncSession* old = job.session.get();
|
| SyncSession* s(new SyncSession(session_context_, this, old->source(),
|
| - old->routing_info(), old->workers()));
|
| + old->routing_info()));
|
| SyncSessionJob new_job(job.purpose,
|
| TimeTicks::Now(),
|
| make_linked_ptr(s),
|
| @@ -663,7 +652,7 @@ void SyncSchedulerImpl::ScheduleNudgeImpl(
|
| SDVLOG(2) << "Rescheduling pending nudge";
|
| SyncSession* s = pending_nudge_->session.get();
|
| job.session.reset(new SyncSession(s->context(), s->delegate(),
|
| - s->source(), s->routing_info(), s->workers()));
|
| + s->source(), s->routing_info()));
|
|
|
| // Choose the start time as the earliest of the 2.
|
| job.scheduled_start = std::min(job.scheduled_start,
|
| @@ -980,7 +969,7 @@ void SyncSchedulerImpl::HandleContinuationError(
|
| DCHECK(!old_job.config_params.ready_task.is_null());
|
| SyncSession* old = old_job.session.get();
|
| SyncSession* s(new SyncSession(session_context_, this,
|
| - old->source(), old->routing_info(), old->workers()));
|
| + old->source(), old->routing_info()));
|
| SyncSessionJob job(old_job.purpose, TimeTicks::Now() + length,
|
| make_linked_ptr(s), false, old_job.config_params,
|
| FROM_HERE);
|
| @@ -1062,7 +1051,7 @@ SyncSession* SyncSchedulerImpl::CreateSyncSession(
|
|
|
| SyncSourceInfo info(source);
|
| SyncSession* session(new SyncSession(session_context_, this, info,
|
| - session_context_->routing_info(), session_context_->workers()));
|
| + session_context_->routing_info()));
|
|
|
| return session;
|
| }
|
|
|