| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/sync/ios_chrome_profile_sync_test_util.h" | 5 #include "ios/chrome/browser/sync/ios_chrome_profile_sync_test_util.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "components/browser_sync/profile_sync_service_mock.h" | 9 #include "components/browser_sync/profile_sync_service_mock.h" |
| 10 #include "components/browser_sync/profile_sync_test_util.h" | 10 #include "components/browser_sync/profile_sync_test_util.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 init_params.start_behavior = browser_sync::ProfileSyncService::MANUAL_START; | 31 init_params.start_behavior = browser_sync::ProfileSyncService::MANUAL_START; |
| 32 init_params.sync_client = | 32 init_params.sync_client = |
| 33 sync_client ? std::move(sync_client) | 33 sync_client ? std::move(sync_client) |
| 34 : base::MakeUnique<IOSChromeSyncClient>(browser_state); | 34 : base::MakeUnique<IOSChromeSyncClient>(browser_state); |
| 35 init_params.network_time_update_callback = | 35 init_params.network_time_update_callback = |
| 36 base::Bind(&browser_sync::EmptyNetworkTimeUpdate); | 36 base::Bind(&browser_sync::EmptyNetworkTimeUpdate); |
| 37 init_params.base_directory = browser_state->GetStatePath(); | 37 init_params.base_directory = browser_state->GetStatePath(); |
| 38 init_params.url_request_context = browser_state->GetRequestContext(); | 38 init_params.url_request_context = browser_state->GetRequestContext(); |
| 39 init_params.debug_identifier = browser_state->GetDebugName(); | 39 init_params.debug_identifier = browser_state->GetDebugName(); |
| 40 init_params.channel = ::GetChannel(); | 40 init_params.channel = ::GetChannel(); |
| 41 init_params.blocking_pool = web::WebThread::GetBlockingPool(); | 41 base::SequencedWorkerPool* blocking_pool = web::WebThread::GetBlockingPool(); |
| 42 init_params.blocking_task_runner = |
| 43 blocking_pool->GetSequencedTaskRunnerWithShutdownBehavior( |
| 44 blocking_pool->GetSequenceToken(), |
| 45 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); |
| 42 | 46 |
| 43 return init_params; | 47 return init_params; |
| 44 } | 48 } |
| 45 | 49 |
| 46 std::unique_ptr<KeyedService> BuildMockProfileSyncService( | 50 std::unique_ptr<KeyedService> BuildMockProfileSyncService( |
| 47 web::BrowserState* context) { | 51 web::BrowserState* context) { |
| 48 return base::MakeUnique<browser_sync::ProfileSyncServiceMock>( | 52 return base::MakeUnique<browser_sync::ProfileSyncServiceMock>( |
| 49 CreateProfileSyncServiceParamsForTest( | 53 CreateProfileSyncServiceParamsForTest( |
| 50 nullptr, ios::ChromeBrowserState::FromBrowserState(context))); | 54 nullptr, ios::ChromeBrowserState::FromBrowserState(context))); |
| 51 } | 55 } |
| OLD | NEW |