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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
65 ->SetAuthenticatedAccountInfo("12345", "foo"); | 65 ->SetAuthenticatedAccountInfo("12345", "foo"); |
66 return profile; | 66 return profile; |
67 } | 67 } |
68 | 68 |
69 std::unique_ptr<KeyedService> BuildMockProfileSyncService( | 69 std::unique_ptr<KeyedService> BuildMockProfileSyncService( |
70 content::BrowserContext* context) { | 70 content::BrowserContext* context) { |
71 return base::MakeUnique<browser_sync::ProfileSyncServiceMock>( | 71 return base::MakeUnique<browser_sync::ProfileSyncServiceMock>( |
72 CreateProfileSyncServiceParamsForTest( | 72 CreateProfileSyncServiceParamsForTest( |
73 Profile::FromBrowserContext(context))); | 73 Profile::FromBrowserContext(context))); |
74 } | 74 } |
75 | |
76 std::unique_ptr<KeyedService> BuildNiceMockProfileSyncService( | |
77 content::BrowserContext* context) { | |
78 ProfileSyncService::InitParams init_params = | |
Peter Kasting
2017/03/28 21:38:39
Nit: I might inline this below just to keep it in
sath
2017/03/29 06:26:15
I can't because of
---
error: taking the address o
| |
79 CreateProfileSyncServiceParamsForTest( | |
80 Profile::FromBrowserContext(context)); | |
81 | |
82 return base::MakeUnique< | |
83 testing::NiceMock<browser_sync::ProfileSyncServiceMock>>(&init_params); | |
84 } | |
OLD | NEW |