| 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/backoff_delay_provider.h" | 7 #include "sync/engine/backoff_delay_provider.h" |
| 8 #include "sync/engine/sync_scheduler_impl.h" | 8 #include "sync/engine/sync_scheduler_impl.h" |
| 9 #include "sync/engine/throttled_data_type_tracker.h" | 9 #include "sync/engine/throttled_data_type_tracker.h" |
| 10 #include "sync/internal_api/public/engine/polling_constants.h" | 10 #include "sync/internal_api/public/engine/polling_constants.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 namespace syncer { | 23 namespace syncer { |
| 24 using sessions::SyncSession; | 24 using sessions::SyncSession; |
| 25 using sessions::SyncSessionContext; | 25 using sessions::SyncSessionContext; |
| 26 using sessions::SyncSourceInfo; | 26 using sessions::SyncSourceInfo; |
| 27 using sync_pb::GetUpdatesCallerInfo; | 27 using sync_pb::GetUpdatesCallerInfo; |
| 28 | 28 |
| 29 class SyncSchedulerWhiteboxTest : public testing::Test { | 29 class SyncSchedulerWhiteboxTest : public testing::Test { |
| 30 public: | 30 public: |
| 31 virtual void SetUp() { | 31 virtual void SetUp() { |
| 32 dir_maker_.SetUp(); | 32 dir_maker_.SetUp(NULL); |
| 33 Syncer* syncer = new Syncer(); | 33 Syncer* syncer = new Syncer(); |
| 34 | 34 |
| 35 ModelSafeRoutingInfo routes; | 35 ModelSafeRoutingInfo routes; |
| 36 routes[BOOKMARKS] = GROUP_UI; | 36 routes[BOOKMARKS] = GROUP_UI; |
| 37 routes[NIGORI] = GROUP_PASSIVE; | 37 routes[NIGORI] = GROUP_PASSIVE; |
| 38 | 38 |
| 39 workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_UI))); | 39 workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_UI))); |
| 40 workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_PASSIVE))); | 40 workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_PASSIVE))); |
| 41 | 41 |
| 42 std::vector<ModelSafeWorker*> workers; | 42 std::vector<ModelSafeWorker*> workers; |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 TimeTicks::Now(), scoped_ptr<SyncSession>(), | 256 TimeTicks::Now(), scoped_ptr<SyncSession>(), |
| 257 ConfigurationParams(), FROM_HERE); | 257 ConfigurationParams(), FROM_HERE); |
| 258 | 258 |
| 259 job.GrantCanaryPrivilege(); | 259 job.GrantCanaryPrivilege(); |
| 260 SyncSchedulerImpl::JobProcessDecision decision = DecideOnJob(job); | 260 SyncSchedulerImpl::JobProcessDecision decision = DecideOnJob(job); |
| 261 | 261 |
| 262 EXPECT_EQ(decision, SyncSchedulerImpl::CONTINUE); | 262 EXPECT_EQ(decision, SyncSchedulerImpl::CONTINUE); |
| 263 } | 263 } |
| 264 | 264 |
| 265 } // namespace syncer | 265 } // namespace syncer |
| OLD | NEW |