| 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/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/callback.h" | 6 #include "base/callback.h" |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 workers.push_back(it->get()); | 143 workers.push_back(it->get()); |
| 144 } | 144 } |
| 145 | 145 |
| 146 connection_.reset(new MockConnectionManager(directory())); | 146 connection_.reset(new MockConnectionManager(directory())); |
| 147 connection_->SetServerReachable(); | 147 connection_->SetServerReachable(); |
| 148 context_.reset(new SyncSessionContext( | 148 context_.reset(new SyncSessionContext( |
| 149 connection_.get(), directory(), workers, | 149 connection_.get(), directory(), workers, |
| 150 &extensions_activity_monitor_, | 150 &extensions_activity_monitor_, |
| 151 std::vector<SyncEngineEventListener*>(), NULL, NULL, | 151 std::vector<SyncEngineEventListener*>(), NULL, NULL, |
| 152 true, // enable keystore encryption | 152 true, // enable keystore encryption |
| 153 false, // force enable pre-commit GU avoidance |
| 153 "fake_invalidator_client_id")); | 154 "fake_invalidator_client_id")); |
| 154 context_->set_routing_info(routing_info_); | 155 context_->set_routing_info(routing_info_); |
| 155 context_->set_notifications_enabled(true); | 156 context_->set_notifications_enabled(true); |
| 156 context_->set_account_name("Test"); | 157 context_->set_account_name("Test"); |
| 157 scheduler_.reset( | 158 scheduler_.reset( |
| 158 new SyncSchedulerImpl("TestSyncScheduler", | 159 new SyncSchedulerImpl("TestSyncScheduler", |
| 159 BackoffDelayProvider::FromDefaults(), | 160 BackoffDelayProvider::FromDefaults(), |
| 160 context(), | 161 context(), |
| 161 syncer_)); | 162 syncer_)); |
| 162 } | 163 } |
| (...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1304 // poll once more | 1305 // poll once more |
| 1305 EXPECT_CALL(*syncer(), PollSyncShare(_,_)) | 1306 EXPECT_CALL(*syncer(), PollSyncShare(_,_)) |
| 1306 .WillOnce(DoAll(Invoke(sessions::test_util::SimulatePollSuccess), | 1307 .WillOnce(DoAll(Invoke(sessions::test_util::SimulatePollSuccess), |
| 1307 WithArg<1>(RecordSyncShare(&records)))); | 1308 WithArg<1>(RecordSyncShare(&records)))); |
| 1308 scheduler()->OnCredentialsUpdated(); | 1309 scheduler()->OnCredentialsUpdated(); |
| 1309 connection()->SetServerStatus(HttpResponse::SERVER_CONNECTION_OK); | 1310 connection()->SetServerStatus(HttpResponse::SERVER_CONNECTION_OK); |
| 1310 StopSyncScheduler(); | 1311 StopSyncScheduler(); |
| 1311 } | 1312 } |
| 1312 | 1313 |
| 1313 } // namespace syncer | 1314 } // namespace syncer |
| OLD | NEW |