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

Unified Diff: chrome/browser/extensions/api/preferences_private/preferences_private_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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/sessions/sessions_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/preferences_private/preferences_private_apitest.cc
diff --git a/chrome/browser/extensions/api/preferences_private/preferences_private_apitest.cc b/chrome/browser/extensions/api/preferences_private/preferences_private_apitest.cc
index 83934219d5053dd5ff2c601748b478a37e0d7e98..57c7350fc7307c24690dfcb9d0fc1e340ea5814b 100644
--- a/chrome/browser/extensions/api/preferences_private/preferences_private_apitest.cc
+++ b/chrome/browser/extensions/api/preferences_private/preferences_private_apitest.cc
@@ -49,9 +49,7 @@ class FakeProfileSyncService : public ProfileSyncService {
public:
explicit FakeProfileSyncService(Profile* profile)
: ProfileSyncService(
- make_scoped_ptr(new browser_sync::ChromeSyncClient(
- profile,
- make_scoped_ptr(new SyncApiComponentFactoryMock()))),
+ make_scoped_ptr(new browser_sync::ChromeSyncClient(profile)),
make_scoped_ptr<SigninManagerWrapper>(NULL),
ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
browser_sync::MANUAL_START,
@@ -66,7 +64,11 @@ class FakeProfileSyncService : public ProfileSyncService {
content::BrowserThread::FILE),
content::BrowserThread::GetBlockingPool()),
sync_initialized_(true),
- initialized_state_violation_(false) {}
+ initialized_state_violation_(false) {
+ static_cast<browser_sync::ChromeSyncClient*>(GetSyncClient())
+ ->SetSyncApiComponentFactoryForTesting(
+ make_scoped_ptr(new SyncApiComponentFactoryMock()));
+ }
~FakeProfileSyncService() override {}
« no previous file with comments | « no previous file | chrome/browser/extensions/api/sessions/sessions_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698