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

Unified Diff: chrome/browser/sync/profile_sync_service_autofill_unittest.cc

Issue 1314903004: Sync: Refactoring DataTypeController to make the design shareable with USS datatypes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing build on Android Created 5 years, 4 months 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/sync/profile_sync_service_autofill_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
index f49b9667b2bea17a57f958fbaebc3b71bcb313d6..c7a6ce9089ac5209799ea4f98e153317b92174b9 100644
--- a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
@@ -148,8 +148,10 @@ MATCHER_P(MatchProfiles, profile, "") {
class TestSyncClient : public sync_driver::FakeSyncClient {
public:
TestSyncClient(PersonalDataManager* pdm,
+
stanisc 2015/09/02 17:27:05 Will remove this empty line before landing the pat
Nicolas Zea 2015/09/02 22:52:45 Acknowledged.
stanisc 2015/09/03 01:17:42 Done.
const scoped_refptr<AutofillWebDataService>& web_data_service)
: pdm_(pdm),
+ sync_service_(nullptr),
web_data_service_(web_data_service) {}
~TestSyncClient() override {}
@@ -157,6 +159,10 @@ class TestSyncClient : public sync_driver::FakeSyncClient {
autofill::PersonalDataManager* GetPersonalDataManager() override {
return pdm_;
}
+ sync_driver::SyncService* GetSyncService() override {
+ DCHECK(sync_service_);
+ return sync_service_;
+ }
scoped_refptr<autofill::AutofillWebDataService> GetWebDataService() override {
return web_data_service_;
}
@@ -172,8 +178,13 @@ class TestSyncClient : public sync_driver::FakeSyncClient {
}
}
+ void SetSyncService(sync_driver::SyncService* sync_service) {
+ sync_service_ = sync_service;
+ }
+
private:
PersonalDataManager* pdm_;
+ sync_driver::SyncService* sync_service_;
scoped_refptr<AutofillWebDataService> web_data_service_;
};
@@ -499,6 +510,7 @@ class ProfileSyncServiceAutofillTest
signin->SetAuthenticatedAccountInfo("12345", "test_user@gmail.com");
sync_service_ = TestProfileSyncService::BuildAutoStartAsyncInit(profile_,
callback);
+ sync_client_->SetSyncService(sync_service_);
ProfileSyncComponentsFactoryMock* components =
sync_service_->components_factory_mock();

Powered by Google App Engine
This is Rietveld 408576698