OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_ | 5 #ifndef COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_ |
6 #define COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_ | 6 #define COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // Call this to register preferences needed for ProfileSyncService creation. | 52 // Call this to register preferences needed for ProfileSyncService creation. |
53 void RegisterPrefsForProfileSyncService( | 53 void RegisterPrefsForProfileSyncService( |
54 user_prefs::PrefRegistrySyncable* registry); | 54 user_prefs::PrefRegistrySyncable* registry); |
55 | 55 |
56 // Aggregate this class to get all necessary support for creating a | 56 // Aggregate this class to get all necessary support for creating a |
57 // ProfileSyncService in tests. The test still needs to have its own | 57 // ProfileSyncService in tests. The test still needs to have its own |
58 // MessageLoop, though. | 58 // MessageLoop, though. |
59 class ProfileSyncServiceBundle { | 59 class ProfileSyncServiceBundle { |
60 public: | 60 public: |
61 #if defined(OS_CHROMEOS) | 61 #if defined(OS_CHROMEOS) |
62 typedef FakeSigninManagerBase FakeSigninManagerType; | 62 using FakeSigninManagerType = FakeSigninManagerBase; |
63 #else | 63 #else |
64 typedef FakeSigninManager FakeSigninManagerType; | 64 using FakeSigninManagerType = FakeSigninManager; |
65 #endif | 65 #endif |
66 | 66 |
67 ProfileSyncServiceBundle(); | 67 ProfileSyncServiceBundle(); |
68 | 68 |
69 ~ProfileSyncServiceBundle(); | 69 ~ProfileSyncServiceBundle(); |
70 | 70 |
71 // Builders | 71 // Builders |
72 | 72 |
73 // Builds a child of FakeSyncClient which overrides some of the client's | 73 // Builds a child of FakeSyncClient which overrides some of the client's |
74 // accessors to return objects from the bundle. | 74 // accessors to return objects from the bundle. |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 sync_sessions::FakeSyncSessionsClient sync_sessions_client_; | 178 sync_sessions::FakeSyncSessionsClient sync_sessions_client_; |
179 invalidation::FakeInvalidationService fake_invalidation_service_; | 179 invalidation::FakeInvalidationService fake_invalidation_service_; |
180 scoped_refptr<net::URLRequestContextGetter> url_request_context_; | 180 scoped_refptr<net::URLRequestContextGetter> url_request_context_; |
181 | 181 |
182 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceBundle); | 182 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceBundle); |
183 }; | 183 }; |
184 | 184 |
185 } // namespace browser_sync | 185 } // namespace browser_sync |
186 | 186 |
187 #endif // COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_ | 187 #endif // COMPONENTS_BROWSER_SYNC_PROFILE_SYNC_TEST_UTIL_H_ |
OLD | NEW |