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

Unified Diff: components/sync/user_events/user_event_service_impl_unittest.cc

Issue 2958303002: [Sync] Maintain a global_id mapping to update UserEvents that references navigations (Closed)
Patch Set: Rebase Created 3 years, 5 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: components/sync/user_events/user_event_service_impl_unittest.cc
diff --git a/components/sync/user_events/user_event_service_impl_unittest.cc b/components/sync/user_events/user_event_service_impl_unittest.cc
index d6f4279f284ee4846c8b93b9a608db05954d5ff4..9f7676bb1c7448d104ea1705bb050f07322bbbe8 100644
--- a/components/sync/user_events/user_event_service_impl_unittest.cc
+++ b/components/sync/user_events/user_event_service_impl_unittest.cc
@@ -39,6 +39,11 @@ class TestSyncService : public FakeSyncService {
ModelTypeSet preferred_data_types_;
};
+class TestGlobalIdMapper : public GlobalIdMapper {
+ void AddGlobalIdChangeObserver(GlobalIdChange callback) override {}
+ int64_t GetLatestGlobalId(int64_t global_id) override { return global_id; }
+};
+
class UserEventServiceImplTest : public testing::Test {
protected:
UserEventServiceImplTest() {
@@ -49,7 +54,8 @@ class UserEventServiceImplTest : public testing::Test {
std::unique_ptr<UserEventSyncBridge> MakeBridge() {
return base::MakeUnique<UserEventSyncBridge>(
ModelTypeStoreTestUtil::FactoryForInMemoryStoreForTest(),
- RecordingModelTypeChangeProcessor::FactoryForBridgeTest(&processor_));
+ RecordingModelTypeChangeProcessor::FactoryForBridgeTest(&processor_),
+ &mapper_);
}
const RecordingModelTypeChangeProcessor& processor() { return *processor_; }
@@ -62,6 +68,7 @@ class UserEventServiceImplTest : public testing::Test {
private:
std::unique_ptr<base::test::ScopedFeatureList> scoped_feature_list_;
RecordingModelTypeChangeProcessor* processor_;
+ TestGlobalIdMapper mapper_;
base::MessageLoop message_loop_;
};

Powered by Google App Engine
This is Rietveld 408576698