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_session_job.h" | 5 #include "sync/engine/sync_session_job.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "sync/internal_api/public/base/model_type_invalidation_map.h" | 10 #include "sync/internal_api/public/base/model_type_invalidation_map.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 GetWorkers(&workers); | 50 GetWorkers(&workers); |
51 context_.reset(new sessions::SyncSessionContext( | 51 context_.reset(new sessions::SyncSessionContext( |
52 NULL, // |connection_manager| | 52 NULL, // |connection_manager| |
53 NULL, // |directory| | 53 NULL, // |directory| |
54 workers, | 54 workers, |
55 NULL, // |extensions_activity_monitor| | 55 NULL, // |extensions_activity_monitor| |
56 NULL, // |throttled_data_type_tracker| | 56 NULL, // |throttled_data_type_tracker| |
57 std::vector<SyncEngineEventListener*>(), | 57 std::vector<SyncEngineEventListener*>(), |
58 NULL, // |debug_info_getter| | 58 NULL, // |debug_info_getter| |
59 NULL, // |traffic_recorder| | 59 NULL, // |traffic_recorder| |
60 true /* |enable keystore encryption| */)); | 60 true, // |enable keystore encryption| |
| 61 "fake_invalidator_client_id")); |
61 context_->set_routing_info(routes_); | 62 context_->set_routing_info(routes_); |
62 } | 63 } |
63 | 64 |
64 scoped_ptr<SyncSession> NewLocalSession() { | 65 scoped_ptr<SyncSession> NewLocalSession() { |
65 sessions::SyncSourceInfo info( | 66 sessions::SyncSourceInfo info( |
66 sync_pb::GetUpdatesCallerInfo::LOCAL, ModelTypeInvalidationMap()); | 67 sync_pb::GetUpdatesCallerInfo::LOCAL, ModelTypeInvalidationMap()); |
67 return scoped_ptr<SyncSession>(new SyncSession(context_.get(), | 68 return scoped_ptr<SyncSession>(new SyncSession(context_.get(), |
68 &delegate_, info, context_->routing_info(), | 69 &delegate_, info, context_->routing_info(), |
69 context_->workers())); | 70 context_->workers())); |
70 } | 71 } |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 SyncSessionJob job1(SyncSessionJob::CONFIGURATION, TimeTicks::Now(), | 231 SyncSessionJob job1(SyncSessionJob::CONFIGURATION, TimeTicks::Now(), |
231 session.Pass(), params, FROM_HERE); | 232 session.Pass(), params, FROM_HERE); |
232 sessions::test_util::SimulateSuccess(job1.mutable_session(), | 233 sessions::test_util::SimulateSuccess(job1.mutable_session(), |
233 job1.start_step(), | 234 job1.start_step(), |
234 job1.end_step()); | 235 job1.end_step()); |
235 job1.Finish(false); | 236 job1.Finish(false); |
236 EXPECT_TRUE(config_params_callback_invoked()); | 237 EXPECT_TRUE(config_params_callback_invoked()); |
237 } | 238 } |
238 | 239 |
239 } // namespace syncer | 240 } // namespace syncer |
OLD | NEW |