| 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 "components/sync/driver/glue/sync_backend_host_impl.h" | 5 #include "components/sync/driver/glue/sync_backend_host_impl.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 // Synchronously initializes the backend. | 206 // Synchronously initializes the backend. |
| 207 void InitializeBackend(bool expect_success) { | 207 void InitializeBackend(bool expect_success) { |
| 208 EXPECT_CALL(mock_frontend_, OnBackendInitialized(_, _, _, expect_success)) | 208 EXPECT_CALL(mock_frontend_, OnBackendInitialized(_, _, _, expect_success)) |
| 209 .WillOnce(InvokeWithoutArgs(QuitMessageLoop)); | 209 .WillOnce(InvokeWithoutArgs(QuitMessageLoop)); |
| 210 SyncBackendHost::HttpPostProviderFactoryGetter | 210 SyncBackendHost::HttpPostProviderFactoryGetter |
| 211 http_post_provider_factory_getter = | 211 http_post_provider_factory_getter = |
| 212 base::Bind(&NetworkResources::GetHttpPostProviderFactory, | 212 base::Bind(&NetworkResources::GetHttpPostProviderFactory, |
| 213 base::Unretained(network_resources_.get()), nullptr, | 213 base::Unretained(network_resources_.get()), nullptr, |
| 214 base::Bind(&EmptyNetworkTimeUpdate)); | 214 base::Bind(&EmptyNetworkTimeUpdate)); |
| 215 backend_->Initialize( | 215 backend_->Initialize( |
| 216 &mock_frontend_, &sync_thread_, base::ThreadTaskRunnerHandle::Get(), | 216 &mock_frontend_, &sync_thread_, WeakHandle<JsEventHandler>(), |
| 217 base::ThreadTaskRunnerHandle::Get(), WeakHandle<JsEventHandler>(), | |
| 218 GURL(std::string()), std::string(), credentials_, true, false, | 217 GURL(std::string()), std::string(), credentials_, true, false, |
| 219 base::FilePath(), std::move(fake_manager_factory_), | 218 base::FilePath(), std::move(fake_manager_factory_), |
| 220 MakeWeakHandle(test_unrecoverable_error_handler_.GetWeakPtr()), | 219 MakeWeakHandle(test_unrecoverable_error_handler_.GetWeakPtr()), |
| 221 base::Closure(), http_post_provider_factory_getter, | 220 base::Closure(), http_post_provider_factory_getter, |
| 222 std::move(saved_nigori_state_)); | 221 std::move(saved_nigori_state_)); |
| 223 base::RunLoop run_loop; | 222 base::RunLoop run_loop; |
| 224 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( | 223 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
| 225 FROM_HERE, run_loop.QuitClosure(), TestTimeouts::action_timeout()); | 224 FROM_HERE, run_loop.QuitClosure(), TestTimeouts::action_timeout()); |
| 226 run_loop.Run(); | 225 run_loop.Run(); |
| 227 // |fake_manager_factory_|'s fake_manager() is set on the sync | 226 // |fake_manager_factory_|'s fake_manager() is set on the sync |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 backend_->StopSyncingForShutdown(); | 830 backend_->StopSyncingForShutdown(); |
| 832 // Verify that call to DeactivateNonBlockingDataType doesn't assert. | 831 // Verify that call to DeactivateNonBlockingDataType doesn't assert. |
| 833 backend_->DeactivateNonBlockingDataType(AUTOFILL); | 832 backend_->DeactivateNonBlockingDataType(AUTOFILL); |
| 834 backend_->Shutdown(STOP_SYNC); | 833 backend_->Shutdown(STOP_SYNC); |
| 835 backend_.reset(); | 834 backend_.reset(); |
| 836 } | 835 } |
| 837 | 836 |
| 838 } // namespace | 837 } // namespace |
| 839 | 838 |
| 840 } // namespace syncer | 839 } // namespace syncer |
| OLD | NEW |