| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/profile_sync_test_util.h" | 5 #include "chrome/browser/sync/profile_sync_test_util.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 init_params.oauth2_token_service = | 48 init_params.oauth2_token_service = |
| 49 ProfileOAuth2TokenServiceFactory::GetForProfile(profile); | 49 ProfileOAuth2TokenServiceFactory::GetForProfile(profile); |
| 50 init_params.start_behavior = ProfileSyncService::MANUAL_START; | 50 init_params.start_behavior = ProfileSyncService::MANUAL_START; |
| 51 init_params.sync_client = std::move(sync_client); | 51 init_params.sync_client = std::move(sync_client); |
| 52 init_params.network_time_update_callback = | 52 init_params.network_time_update_callback = |
| 53 base::Bind(&browser_sync::EmptyNetworkTimeUpdate); | 53 base::Bind(&browser_sync::EmptyNetworkTimeUpdate); |
| 54 init_params.base_directory = profile->GetPath(); | 54 init_params.base_directory = profile->GetPath(); |
| 55 init_params.url_request_context = profile->GetRequestContext(); | 55 init_params.url_request_context = profile->GetRequestContext(); |
| 56 init_params.debug_identifier = profile->GetDebugName(); | 56 init_params.debug_identifier = profile->GetDebugName(); |
| 57 init_params.channel = chrome::GetChannel(); | 57 init_params.channel = chrome::GetChannel(); |
| 58 init_params.blocking_pool = content::BrowserThread::GetBlockingPool(); | 58 base::SequencedWorkerPool* blocking_pool = |
| 59 content::BrowserThread::GetBlockingPool(); |
| 60 init_params.blocking_task_runner = |
| 61 blocking_pool->GetSequencedTaskRunnerWithShutdownBehavior( |
| 62 blocking_pool->GetSequenceToken(), |
| 63 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); |
| 59 | 64 |
| 60 return init_params; | 65 return init_params; |
| 61 } | 66 } |
| 62 | 67 |
| 63 std::unique_ptr<TestingProfile> MakeSignedInTestingProfile() { | 68 std::unique_ptr<TestingProfile> MakeSignedInTestingProfile() { |
| 64 auto profile = base::MakeUnique<TestingProfile>(); | 69 auto profile = base::MakeUnique<TestingProfile>(); |
| 65 SigninManagerFactory::GetForProfile(profile.get()) | 70 SigninManagerFactory::GetForProfile(profile.get()) |
| 66 ->SetAuthenticatedAccountInfo("12345", "foo"); | 71 ->SetAuthenticatedAccountInfo("12345", "foo"); |
| 67 return profile; | 72 return profile; |
| 68 } | 73 } |
| 69 | 74 |
| 70 std::unique_ptr<KeyedService> BuildMockProfileSyncService( | 75 std::unique_ptr<KeyedService> BuildMockProfileSyncService( |
| 71 content::BrowserContext* context) { | 76 content::BrowserContext* context) { |
| 72 return base::MakeUnique<browser_sync::ProfileSyncServiceMock>( | 77 return base::MakeUnique<browser_sync::ProfileSyncServiceMock>( |
| 73 CreateProfileSyncServiceParamsForTest( | 78 CreateProfileSyncServiceParamsForTest( |
| 74 Profile::FromBrowserContext(context))); | 79 Profile::FromBrowserContext(context))); |
| 75 } | 80 } |
| OLD | NEW |