| 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>( | 68 return scoped_ptr<SyncSession>( |
| 68 new SyncSession(context_.get(), &delegate_, info)); | 69 new SyncSession(context_.get(), &delegate_, info)); |
| 69 } | 70 } |
| 70 | 71 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 SyncSessionJob job1(SyncSessionJob::CONFIGURATION, TimeTicks::Now(), | 218 SyncSessionJob job1(SyncSessionJob::CONFIGURATION, TimeTicks::Now(), |
| 218 session.Pass(), params, FROM_HERE); | 219 session.Pass(), params, FROM_HERE); |
| 219 sessions::test_util::SimulateSuccess(job1.mutable_session(), | 220 sessions::test_util::SimulateSuccess(job1.mutable_session(), |
| 220 job1.start_step(), | 221 job1.start_step(), |
| 221 job1.end_step()); | 222 job1.end_step()); |
| 222 job1.Finish(false); | 223 job1.Finish(false); |
| 223 EXPECT_TRUE(config_params_callback_invoked()); | 224 EXPECT_TRUE(config_params_callback_invoked()); |
| 224 } | 225 } |
| 225 | 226 |
| 226 } // namespace syncer | 227 } // namespace syncer |
| OLD | NEW |