Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1459)

Unified Diff: chrome/browser/extensions/api/sessions/sessions_apitest.cc

Issue 1421003007: [Sync] Componentize ProfileSyncComponentsFactoryImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix sessions api test Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/sessions/sessions_apitest.cc
diff --git a/chrome/browser/extensions/api/sessions/sessions_apitest.cc b/chrome/browser/extensions/api/sessions/sessions_apitest.cc
index 29990032ab0f71efb8734625e37d309c09c4cc9a..c53b02b460cef7b9be60ed560cb53fdb5268dfed 100644
--- a/chrome/browser/extensions/api/sessions/sessions_apitest.cc
+++ b/chrome/browser/extensions/api/sessions/sessions_apitest.cc
@@ -137,10 +137,12 @@ scoped_ptr<KeyedService> ExtensionSessionsTest::BuildProfileSyncService(
sync_pb::SyncEnums_DeviceType_TYPE_LINUX,
"device_id")));
- return make_scoped_ptr(new ProfileSyncServiceMock(
- make_scoped_ptr(new browser_sync::ChromeSyncClient(
- static_cast<Profile*>(context), factory.Pass())),
- static_cast<Profile*>(context)));
+ Profile* profile = static_cast<Profile*>(context);
+ ProfileSyncServiceMock* sync_service = new ProfileSyncServiceMock(
+ make_scoped_ptr(new browser_sync::ChromeSyncClient(profile)), profile);
+ static_cast<browser_sync::ChromeSyncClient*>(sync_service->GetSyncClient())
+ ->SetSyncApiComponentFactoryForTesting(factory.Pass());
+ return make_scoped_ptr(sync_service);
}
void ExtensionSessionsTest::CreateTestProfileSyncService() {

Powered by Google App Engine
This is Rietveld 408576698