| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 init_params.oauth2_token_service = | 45 init_params.oauth2_token_service = |
| 46 ProfileOAuth2TokenServiceFactory::GetForProfile(profile); | 46 ProfileOAuth2TokenServiceFactory::GetForProfile(profile); |
| 47 init_params.start_behavior = ProfileSyncService::MANUAL_START; | 47 init_params.start_behavior = ProfileSyncService::MANUAL_START; |
| 48 init_params.sync_client = std::move(sync_client); | 48 init_params.sync_client = std::move(sync_client); |
| 49 init_params.network_time_update_callback = | 49 init_params.network_time_update_callback = |
| 50 base::Bind(&browser_sync::EmptyNetworkTimeUpdate); | 50 base::Bind(&browser_sync::EmptyNetworkTimeUpdate); |
| 51 init_params.base_directory = profile->GetPath(); | 51 init_params.base_directory = profile->GetPath(); |
| 52 init_params.url_request_context = profile->GetRequestContext(); | 52 init_params.url_request_context = profile->GetRequestContext(); |
| 53 init_params.debug_identifier = profile->GetDebugName(); | 53 init_params.debug_identifier = profile->GetDebugName(); |
| 54 init_params.channel = chrome::GetChannel(); | 54 init_params.channel = chrome::GetChannel(); |
| 55 init_params.db_thread = content::BrowserThread::GetMessageLoopProxyForThread( | 55 init_params.db_thread = content::BrowserThread::GetTaskRunnerForThread( |
| 56 content::BrowserThread::DB); | 56 content::BrowserThread::DB); |
| 57 init_params.file_thread = | 57 init_params.file_thread = content::BrowserThread::GetTaskRunnerForThread( |
| 58 content::BrowserThread::GetMessageLoopProxyForThread( | 58 content::BrowserThread::FILE); |
| 59 content::BrowserThread::FILE); | |
| 60 init_params.blocking_pool = content::BrowserThread::GetBlockingPool(); | 59 init_params.blocking_pool = content::BrowserThread::GetBlockingPool(); |
| 61 | 60 |
| 62 return init_params; | 61 return init_params; |
| 63 } | 62 } |
| 64 | 63 |
| 65 std::unique_ptr<TestingProfile> MakeSignedInTestingProfile() { | 64 std::unique_ptr<TestingProfile> MakeSignedInTestingProfile() { |
| 66 auto profile = base::WrapUnique(new TestingProfile()); | 65 auto profile = base::WrapUnique(new TestingProfile()); |
| 67 SigninManagerFactory::GetForProfile(profile.get()) | 66 SigninManagerFactory::GetForProfile(profile.get()) |
| 68 ->SetAuthenticatedAccountInfo("12345", "foo"); | 67 ->SetAuthenticatedAccountInfo("12345", "foo"); |
| 69 return profile; | 68 return profile; |
| 70 } | 69 } |
| 71 | 70 |
| 72 std::unique_ptr<KeyedService> BuildMockProfileSyncService( | 71 std::unique_ptr<KeyedService> BuildMockProfileSyncService( |
| 73 content::BrowserContext* context) { | 72 content::BrowserContext* context) { |
| 74 return base::WrapUnique( | 73 return base::WrapUnique( |
| 75 new ProfileSyncServiceMock(CreateProfileSyncServiceParamsForTest( | 74 new ProfileSyncServiceMock(CreateProfileSyncServiceParamsForTest( |
| 76 Profile::FromBrowserContext(context)))); | 75 Profile::FromBrowserContext(context)))); |
| 77 } | 76 } |
| OLD | NEW |