| 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 #ifndef IOS_CHROME_BROWSER_SYNC_IOS_CHROME_PROFILE_SYNC_TEST_UTIL_H_ | 5 #ifndef IOS_CHROME_BROWSER_SYNC_IOS_CHROME_PROFILE_SYNC_TEST_UTIL_H_ |
| 6 #define IOS_CHROME_BROWSER_SYNC_IOS_CHROME_PROFILE_SYNC_TEST_UTIL_H_ | 6 #define IOS_CHROME_BROWSER_SYNC_IOS_CHROME_PROFILE_SYNC_TEST_UTIL_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include <memory> |
| 9 |
| 9 #include "components/browser_sync/browser/profile_sync_service.h" | 10 #include "components/browser_sync/browser/profile_sync_service.h" |
| 10 | 11 |
| 11 namespace ios { | 12 namespace ios { |
| 12 class ChromeBrowserState; | 13 class ChromeBrowserState; |
| 13 } | 14 } |
| 14 | 15 |
| 15 namespace sync_driver { | 16 namespace sync_driver { |
| 16 class SyncClient; | 17 class SyncClient; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace web { | 20 namespace web { |
| 20 class BrowserState; | 21 class BrowserState; |
| 21 } | 22 } |
| 22 | 23 |
| 23 // Helper method for constructing ProfileSyncService mocks. If |sync_client| | 24 // Helper method for constructing ProfileSyncService mocks. If |sync_client| |
| 24 // is null, a fresh one is created. | 25 // is null, a fresh one is created. |
| 25 ProfileSyncService::InitParams CreateProfileSyncServiceParamsForTest( | 26 ProfileSyncService::InitParams CreateProfileSyncServiceParamsForTest( |
| 26 scoped_ptr<sync_driver::SyncClient> sync_client, | 27 std::unique_ptr<sync_driver::SyncClient> sync_client, |
| 27 ios::ChromeBrowserState* browser_state); | 28 ios::ChromeBrowserState* browser_state); |
| 28 | 29 |
| 29 // Helper routine to be used in conjunction with | 30 // Helper routine to be used in conjunction with |
| 30 // BrowserStateKeyedServiceFactory::SetTestingFactory(). | 31 // BrowserStateKeyedServiceFactory::SetTestingFactory(). |
| 31 scoped_ptr<KeyedService> BuildMockProfileSyncService( | 32 std::unique_ptr<KeyedService> BuildMockProfileSyncService( |
| 32 web::BrowserState* context); | 33 web::BrowserState* context); |
| 33 | 34 |
| 34 #endif // IOS_CHROME_BROWSER_SYNC_IOS_CHROME_PROFILE_SYNC_TEST_UTIL_H_ | 35 #endif // IOS_CHROME_BROWSER_SYNC_IOS_CHROME_PROFILE_SYNC_TEST_UTIL_H_ |
| OLD | NEW |