OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/sync/glue/sync_backend_host_impl.h" | 5 #include "chrome/browser/sync/glue/sync_backend_host_impl.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 | 8 |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 void InitializeBackend(bool expect_success) { | 209 void InitializeBackend(bool expect_success) { |
210 EXPECT_CALL(mock_frontend_, OnBackendInitialized(_, _, _, expect_success)). | 210 EXPECT_CALL(mock_frontend_, OnBackendInitialized(_, _, _, expect_success)). |
211 WillOnce(InvokeWithoutArgs(QuitMessageLoop)); | 211 WillOnce(InvokeWithoutArgs(QuitMessageLoop)); |
212 backend_->Initialize( | 212 backend_->Initialize( |
213 &mock_frontend_, | 213 &mock_frontend_, |
214 scoped_ptr<base::Thread>(), | 214 scoped_ptr<base::Thread>(), |
215 syncer::WeakHandle<syncer::JsEventHandler>(), | 215 syncer::WeakHandle<syncer::JsEventHandler>(), |
216 GURL(std::string()), | 216 GURL(std::string()), |
217 credentials_, | 217 credentials_, |
218 true, | 218 true, |
219 fake_manager_factory_.PassAs<syncer::SyncManagerFactory>(), | 219 fake_manager_factory_.Pass(), |
220 scoped_ptr<syncer::UnrecoverableErrorHandler>( | 220 make_scoped_ptr(new syncer::TestUnrecoverableErrorHandler), |
221 new syncer::TestUnrecoverableErrorHandler).Pass(), | |
222 NULL, | 221 NULL, |
223 network_resources_.get()); | 222 network_resources_.get()); |
224 base::RunLoop run_loop; | 223 base::RunLoop run_loop; |
225 BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE, | 224 BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE, |
226 run_loop.QuitClosure(), | 225 run_loop.QuitClosure(), |
227 TestTimeouts::action_timeout()); | 226 TestTimeouts::action_timeout()); |
228 run_loop.Run(); | 227 run_loop.Run(); |
229 // |fake_manager_factory_|'s fake_manager() is set on the sync | 228 // |fake_manager_factory_|'s fake_manager() is set on the sync |
230 // thread, but we can rely on the message loop barriers to | 229 // thread, but we can rely on the message loop barriers to |
231 // guarantee that we see the updated value. | 230 // guarantee that we see the updated value. |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 Difference(syncer::ModelTypeSet::All(), | 767 Difference(syncer::ModelTypeSet::All(), |
769 enabled_types_), | 768 enabled_types_), |
770 syncer::ModelTypeSet()); | 769 syncer::ModelTypeSet()); |
771 EXPECT_FALSE(fake_manager_->GetTypesWithEmptyProgressMarkerToken( | 770 EXPECT_FALSE(fake_manager_->GetTypesWithEmptyProgressMarkerToken( |
772 error_types).Empty()); | 771 error_types).Empty()); |
773 } | 772 } |
774 | 773 |
775 } // namespace | 774 } // namespace |
776 | 775 |
777 } // namespace browser_sync | 776 } // namespace browser_sync |
OLD | NEW |