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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 } | 46 } |
47 | 47 |
48 connection_.reset(new MockConnectionManager(NULL)); | 48 connection_.reset(new MockConnectionManager(NULL)); |
49 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL)); | 49 throttled_data_type_tracker_.reset(new ThrottledDataTypeTracker(NULL)); |
50 context_.reset( | 50 context_.reset( |
51 new SyncSessionContext( | 51 new SyncSessionContext( |
52 connection_.get(), dir_maker_.directory(), | 52 connection_.get(), dir_maker_.directory(), |
53 workers, &extensions_activity_monitor_, | 53 workers, &extensions_activity_monitor_, |
54 throttled_data_type_tracker_.get(), | 54 throttled_data_type_tracker_.get(), |
55 std::vector<SyncEngineEventListener*>(), NULL, NULL, | 55 std::vector<SyncEngineEventListener*>(), NULL, NULL, |
56 true /* enable keystore encryption */)); | 56 true, // enable keystore encryption |
| 57 "fake_invalidator_client_id")); |
57 context_->set_notifications_enabled(true); | 58 context_->set_notifications_enabled(true); |
58 context_->set_account_name("Test"); | 59 context_->set_account_name("Test"); |
59 scheduler_.reset( | 60 scheduler_.reset( |
60 new SyncSchedulerImpl("TestSyncSchedulerWhitebox", | 61 new SyncSchedulerImpl("TestSyncSchedulerWhitebox", |
61 BackoffDelayProvider::FromDefaults(), | 62 BackoffDelayProvider::FromDefaults(), |
62 context(), | 63 context(), |
63 syncer)); | 64 syncer)); |
64 } | 65 } |
65 | 66 |
66 virtual void TearDown() { | 67 virtual void TearDown() { |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 TimeTicks::Now(), scoped_ptr<SyncSession>(), | 257 TimeTicks::Now(), scoped_ptr<SyncSession>(), |
257 ConfigurationParams(), FROM_HERE); | 258 ConfigurationParams(), FROM_HERE); |
258 | 259 |
259 job.GrantCanaryPrivilege(); | 260 job.GrantCanaryPrivilege(); |
260 SyncSchedulerImpl::JobProcessDecision decision = DecideOnJob(job); | 261 SyncSchedulerImpl::JobProcessDecision decision = DecideOnJob(job); |
261 | 262 |
262 EXPECT_EQ(decision, SyncSchedulerImpl::CONTINUE); | 263 EXPECT_EQ(decision, SyncSchedulerImpl::CONTINUE); |
263 } | 264 } |
264 | 265 |
265 } // namespace syncer | 266 } // namespace syncer |
OLD | NEW |