| 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 "base/message_loop.h" | 5 #include "base/message_loop.h" |
| 6 #include "base/time.h" | 6 #include "base/time.h" |
| 7 #include "sync/engine/sync_scheduler_impl.h" | 7 #include "sync/engine/sync_scheduler_impl.h" |
| 8 #include "sync/engine/throttled_data_type_tracker.h" | 8 #include "sync/engine/throttled_data_type_tracker.h" |
| 9 #include "sync/sessions/sync_session_context.h" | 9 #include "sync/sessions/sync_session_context.h" |
| 10 #include "sync/sessions/test_util.h" | 10 #include "sync/sessions/test_util.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 for (std::vector<scoped_refptr<FakeModelWorker> >::iterator it = | 41 for (std::vector<scoped_refptr<FakeModelWorker> >::iterator it = |
| 42 workers_.begin(); it != workers_.end(); ++it) { | 42 workers_.begin(); it != workers_.end(); ++it) { |
| 43 workers.push_back(it->get()); | 43 workers.push_back(it->get()); |
| 44 } | 44 } |
| 45 | 45 |
| 46 connection_.reset(new MockConnectionManager(NULL)); | 46 connection_.reset(new MockConnectionManager(NULL)); |
| 47 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL)); | 47 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL)); |
| 48 context_.reset( | 48 context_.reset( |
| 49 new SyncSessionContext( | 49 new SyncSessionContext( |
| 50 connection_.get(), dir_maker_.directory(), | 50 connection_.get(), dir_maker_.directory(), |
| 51 routes, workers, &extensions_activity_monitor_, | 51 workers, &extensions_activity_monitor_, |
| 52 throttled_data_type_tracker_.get(), | 52 throttled_data_type_tracker_.get(), |
| 53 std::vector<SyncEngineEventListener*>(), NULL, NULL)); | 53 std::vector<SyncEngineEventListener*>(), NULL, NULL)); |
| 54 context_->set_notifications_enabled(true); | 54 context_->set_notifications_enabled(true); |
| 55 context_->set_account_name("Test"); | 55 context_->set_account_name("Test"); |
| 56 scheduler_.reset( | 56 scheduler_.reset( |
| 57 new SyncSchedulerImpl("TestSyncSchedulerWhitebox", context(), syncer)); | 57 new SyncSchedulerImpl("TestSyncSchedulerWhitebox", context(), syncer)); |
| 58 } | 58 } |
| 59 | 59 |
| 60 virtual void TearDown() { | 60 virtual void TearDown() { |
| 61 scheduler_.reset(); | 61 scheduler_.reset(); |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 struct SyncSchedulerImpl::SyncSessionJob job; | 261 struct SyncSchedulerImpl::SyncSessionJob job; |
| 262 job.purpose = SyncSchedulerImpl::SyncSessionJob::CONFIGURATION; | 262 job.purpose = SyncSchedulerImpl::SyncSessionJob::CONFIGURATION; |
| 263 job.scheduled_start = TimeTicks::Now(); | 263 job.scheduled_start = TimeTicks::Now(); |
| 264 job.is_canary_job = true; | 264 job.is_canary_job = true; |
| 265 SyncSchedulerImpl::JobProcessDecision decision = DecideOnJob(job); | 265 SyncSchedulerImpl::JobProcessDecision decision = DecideOnJob(job); |
| 266 | 266 |
| 267 EXPECT_EQ(decision, SyncSchedulerImpl::CONTINUE); | 267 EXPECT_EQ(decision, SyncSchedulerImpl::CONTINUE); |
| 268 } | 268 } |
| 269 | 269 |
| 270 } // namespace syncer | 270 } // namespace syncer |
| OLD | NEW |