| 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 experiment |
| 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 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1279 base::Bind(&CallbackCounter::Callback, base::Unretained(&counter))); | 1280 base::Bind(&CallbackCounter::Callback, base::Unretained(&counter))); |
| 1280 scheduler()->ScheduleConfiguration(params); | 1281 scheduler()->ScheduleConfiguration(params); |
| 1281 | 1282 |
| 1282 scheduler()->OnConnectionStatusChange(); | 1283 scheduler()->OnConnectionStatusChange(); |
| 1283 scheduler()->OnConnectionStatusChange(); | 1284 scheduler()->OnConnectionStatusChange(); |
| 1284 | 1285 |
| 1285 PumpLoop(); // Run the nudge, that will fail and schedule a quick retry. | 1286 PumpLoop(); // Run the nudge, that will fail and schedule a quick retry. |
| 1286 } | 1287 } |
| 1287 | 1288 |
| 1288 } // namespace syncer | 1289 } // namespace syncer |
| OLD | NEW |