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" |
11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 12 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
13 #include "chrome/browser/signin/signin_manager_factory.h" | 13 #include "chrome/browser/signin/signin_manager_factory.h" |
14 #include "chrome/browser/sync/chrome_sync_client.h" | 14 #include "chrome/browser/sync/chrome_sync_client.h" |
15 #include "chrome/common/channel_info.h" | 15 #include "chrome/common/channel_info.h" |
16 #include "chrome/test/base/testing_profile.h" | 16 #include "chrome/test/base/testing_profile.h" |
17 #include "components/browser_sync/browser/profile_sync_service.h" | 17 #include "components/browser_sync/profile_sync_service.h" |
18 #include "components/browser_sync/browser/profile_sync_test_util.h" | 18 #include "components/browser_sync/profile_sync_test_util.h" |
19 #include "components/signin/core/browser/signin_manager.h" | 19 #include "components/signin/core/browser/signin_manager.h" |
20 #include "components/sync/driver/signin_manager_wrapper.h" | 20 #include "components/sync/driver/signin_manager_wrapper.h" |
21 #include "components/sync/driver/startup_controller.h" | 21 #include "components/sync/driver/startup_controller.h" |
22 #include "components/sync/driver/sync_api_component_factory_mock.h" | 22 #include "components/sync/driver/sync_api_component_factory_mock.h" |
23 | 23 |
24 ProfileSyncService::InitParams CreateProfileSyncServiceParamsForTest( | 24 ProfileSyncService::InitParams CreateProfileSyncServiceParamsForTest( |
25 Profile* profile) { | 25 Profile* profile) { |
26 auto sync_client = base::MakeUnique<browser_sync::ChromeSyncClient>(profile); | 26 auto sync_client = base::MakeUnique<browser_sync::ChromeSyncClient>(profile); |
27 | 27 |
28 sync_client->SetSyncApiComponentFactoryForTesting( | 28 sync_client->SetSyncApiComponentFactoryForTesting( |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 ->SetAuthenticatedAccountInfo("12345", "foo"); | 66 ->SetAuthenticatedAccountInfo("12345", "foo"); |
67 return profile; | 67 return profile; |
68 } | 68 } |
69 | 69 |
70 std::unique_ptr<KeyedService> BuildMockProfileSyncService( | 70 std::unique_ptr<KeyedService> BuildMockProfileSyncService( |
71 content::BrowserContext* context) { | 71 content::BrowserContext* context) { |
72 return base::MakeUnique<ProfileSyncServiceMock>( | 72 return base::MakeUnique<ProfileSyncServiceMock>( |
73 CreateProfileSyncServiceParamsForTest( | 73 CreateProfileSyncServiceParamsForTest( |
74 Profile::FromBrowserContext(context))); | 74 Profile::FromBrowserContext(context))); |
75 } | 75 } |
OLD | NEW |