Commit 3d6f939e authored by pavely's avatar pavely Committed by Commit Bot

[Sync] Migrate bridge implementations to change list based MergeSyncData

In the previous change (http://crrev.com/2915763005) I added version of
MergeSyncData that takes EntityChangeList instead of EntityDataMap. This is
needed to support bridges that can't generate storage key based on EntityData.

In this change I switch already implemented bridges to the new MergeSyncData
signature.

MergeSyncData takes EntityChangeList where each change has type ACTION_ADD, and
prepopulated storage_key.

R=skym@chromium.org
TBR=olivierrobin@chromium.org
BUG=719570

Review-Url: https://codereview.chromium.org/2923363004
Cr-Commit-Position: refs/heads/master@{#478844}
parent 9ff9c319
......@@ -183,16 +183,18 @@ PrintersSyncBridge::CreateMetadataChangeList() {
base::Optional<syncer::ModelError> PrintersSyncBridge::MergeSyncData(
std::unique_ptr<MetadataChangeList> metadata_change_list,
syncer::EntityDataMap entity_data_map) {
syncer::EntityChangeList entity_data) {
DCHECK(change_processor()->IsTrackingMetadata());
std::unique_ptr<ModelTypeStore::WriteBatch> batch =
store_delegate_->CreateWriteBatch();
for (const auto& entry : entity_data_map) {
std::set<std::string> sync_entity_ids;
for (const auto& change : entity_data) {
const sync_pb::PrinterSpecifics& specifics =
entry.second.value().specifics.printer();
change.data().specifics.printer();
DCHECK_EQ(entry.first, specifics.id());
DCHECK_EQ(change.storage_key(), specifics.id());
sync_entity_ids.insert(specifics.id());
// Write the update to local storage even if we already have it.
StoreSpecifics(base::MakeUnique<sync_pb::PrinterSpecifics>(specifics),
......@@ -203,7 +205,7 @@ base::Optional<syncer::ModelError> PrintersSyncBridge::MergeSyncData(
// appropriate metadata.
for (const auto& entry : all_data_) {
const std::string& local_entity_id = entry.first;
if (!base::ContainsKey(entity_data_map, local_entity_id)) {
if (!base::ContainsKey(sync_entity_ids, local_entity_id)) {
// Only local objects which were not updated are uploaded. Objects for
// which there was a remote copy are overwritten.
change_processor()->Put(local_entity_id, CopyToEntityData(*entry.second),
......
......@@ -35,7 +35,7 @@ class PrintersSyncBridge : public syncer::ModelTypeSyncBridge {
override;
base::Optional<syncer::ModelError> MergeSyncData(
std::unique_ptr<syncer::MetadataChangeList> metadata_change_list,
syncer::EntityDataMap entity_data_map) override;
syncer::EntityChangeList entity_data) override;
base::Optional<syncer::ModelError> ApplySyncChanges(
std::unique_ptr<syncer::MetadataChangeList> metadata_change_list,
syncer::EntityChangeList entity_changes) override;
......
......@@ -31,7 +31,6 @@ using sync_pb::AutofillSpecifics;
using syncer::EntityChange;
using syncer::EntityChangeList;
using syncer::EntityData;
using syncer::EntityDataMap;
using syncer::MetadataChangeList;
using syncer::ModelError;
using syncer::ModelTypeChangeProcessor;
......@@ -326,14 +325,14 @@ AutocompleteSyncBridge::CreateMetadataChangeList() {
Optional<syncer::ModelError> AutocompleteSyncBridge::MergeSyncData(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityDataMap entity_data_map) {
EntityChangeList entity_data) {
DCHECK(thread_checker_.CalledOnValidThread());
SyncDifferenceTracker tracker(GetAutofillTable());
for (auto kv : entity_data_map) {
DCHECK(kv.second->specifics.has_autofill());
for (const auto& change : entity_data) {
DCHECK(change.data().specifics.has_autofill());
RETURN_IF_ERROR(tracker.IncorporateRemoteSpecifics(
kv.first, kv.second->specifics.autofill()));
change.storage_key(), change.data().specifics.autofill()));
}
RETURN_IF_ERROR(tracker.FlushToLocal(web_data_backend_));
......
......@@ -47,7 +47,7 @@ class AutocompleteSyncBridge : public base::SupportsUserData::Data,
override;
base::Optional<syncer::ModelError> MergeSyncData(
std::unique_ptr<syncer::MetadataChangeList> metadata_change_list,
syncer::EntityDataMap entity_data_map) override;
syncer::EntityChangeList entity_data) override;
base::Optional<syncer::ModelError> ApplySyncChanges(
std::unique_ptr<syncer::MetadataChangeList> metadata_change_list,
syncer::EntityChangeList entity_changes) override;
......
......@@ -43,7 +43,6 @@ using syncer::EntityChange;
using syncer::EntityChangeList;
using syncer::EntityData;
using syncer::EntityDataPtr;
using syncer::EntityDataMap;
using syncer::FakeModelTypeChangeProcessor;
using syncer::KeyAndData;
using syncer::ModelError;
......@@ -194,7 +193,7 @@ class AutocompleteSyncBridgeTest : public testing::Test {
return key;
}
EntityChangeList EntityAddList(
EntityChangeList CreateEntityAddList(
const std::vector<AutofillSpecifics>& specifics_vector) {
EntityChangeList changes;
for (const auto& specifics : specifics_vector) {
......@@ -204,28 +203,19 @@ class AutocompleteSyncBridgeTest : public testing::Test {
return changes;
}
EntityDataMap CreateEntityDataMap(
const std::vector<AutofillSpecifics>& specifics_vector) {
EntityDataMap map;
for (const auto& specifics : specifics_vector) {
map[GetStorageKey(specifics)] = SpecificsToEntity(specifics);
}
return map;
}
void VerifyApplyChanges(const std::vector<EntityChange>& changes) {
void VerifyApplyChanges(const EntityChangeList& changes) {
const auto error = bridge()->ApplySyncChanges(
bridge()->CreateMetadataChangeList(), changes);
EXPECT_FALSE(error);
}
void VerifyApplyAdds(const std::vector<AutofillSpecifics>& specifics) {
VerifyApplyChanges(EntityAddList(specifics));
VerifyApplyChanges(CreateEntityAddList(specifics));
}
void VerifyMerge(const std::vector<AutofillSpecifics>& specifics) {
const auto error = bridge()->MergeSyncData(
bridge()->CreateMetadataChangeList(), CreateEntityDataMap(specifics));
bridge()->CreateMetadataChangeList(), CreateEntityAddList(specifics));
EXPECT_FALSE(error);
}
......
......@@ -81,7 +81,7 @@ TypedURLSyncBridge::CreateMetadataChangeList() {
base::Optional<syncer::ModelError> TypedURLSyncBridge::MergeSyncData(
std::unique_ptr<syncer::MetadataChangeList> metadata_change_list,
syncer::EntityDataMap entity_data_map) {
syncer::EntityChangeList entity_data) {
DCHECK(sequence_checker_.CalledOnValidSequence());
NOTIMPLEMENTED();
return {};
......
......@@ -29,7 +29,7 @@ class TypedURLSyncBridge : public syncer::ModelTypeSyncBridge,
override;
base::Optional<syncer::ModelError> MergeSyncData(
std::unique_ptr<syncer::MetadataChangeList> metadata_change_list,
syncer::EntityDataMap entity_data_map) override;
syncer::EntityChangeList entity_data) override;
base::Optional<syncer::ModelError> ApplySyncChanges(
std::unique_ptr<syncer::MetadataChangeList> metadata_change_list,
syncer::EntityChangeList entity_changes) override;
......
......@@ -115,7 +115,7 @@ class TestReadingListStorage : public ReadingListModelStorage {
base::Optional<syncer::ModelError> MergeSyncData(
std::unique_ptr<syncer::MetadataChangeList> metadata_change_list,
syncer::EntityDataMap entity_data_map) override {
syncer::EntityChangeList entity_data) override {
NOTREACHED();
return {};
}
......
......@@ -195,19 +195,18 @@ ReadingListStore::CreateMetadataChangeList() {
// Perform the initial merge between local and sync data. This should only be
// called when a data type is first enabled to start syncing, and there is no
// sync metadata. Best effort should be made to match local and sync data. The
// keys in the |entity_data_map| will have been created via GetClientTag(...),
// and if a local and sync data should match/merge but disagree on tags, the
// service should use the sync data's tag. Any local pieces of data that are
// not present in sync should immediately be Put(...) to the processor before
// returning. The same MetadataChangeList that was passed into this function
// can be passed to Put(...) calls. Delete(...) can also be called but should
// not be needed for most model types. Durable storage writes, if not able to
// combine all change atomically, should save the metadata after the data
// changes, so that this merge will be re-driven by sync if is not completely
// saved during the current run.
// storage keys in the |entity_data| are populated with GetStorageKey(...),
// local and sync copies of the same entity should resolve to the same storage
// key. Any local pieces of data that are not present in sync should immediately
// be Put(...) to the processor before returning. The same MetadataChangeList
// that was passed into this function can be passed to Put(...) calls.
// Delete(...) can also be called but should not be needed for most model types.
// Durable storage writes, if not able to combine all change atomically, should
// save the metadata after the data changes, so that this merge will be re-
// driven by sync if is not completely saved during the current run.
base::Optional<syncer::ModelError> ReadingListStore::MergeSyncData(
std::unique_ptr<syncer::MetadataChangeList> metadata_change_list,
syncer::EntityDataMap entity_data_map) {
syncer::EntityChangeList entity_data) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
auto token = EnsureBatchCreated();
// Keep track of the last update of each item.
......@@ -216,10 +215,10 @@ base::Optional<syncer::ModelError> ReadingListStore::MergeSyncData(
model_batch_updates = model_->BeginBatchUpdates();
// Merge sync to local data.
for (const auto& kv : entity_data_map) {
synced_entries.insert(kv.first);
for (const auto& change : entity_data) {
synced_entries.insert(change.storage_key());
const sync_pb::ReadingListSpecifics& specifics =
kv.second.value().specifics.reading_list();
change.data().specifics.reading_list();
// Deserialize entry.
std::unique_ptr<ReadingListEntry> entry(
ReadingListEntry::FromReadingListSpecifics(specifics, clock_->Now()));
......
......@@ -48,19 +48,19 @@ class ReadingListStore : public ReadingListModelStorage {
// Perform the initial merge between local and sync data. This should only be
// called when a data type is first enabled to start syncing, and there is no
// sync metadata. Best effort should be made to match local and sync data. The
// keys in the |entity_data_map| will have been created via GetClientTag(...),
// and if a local and sync data should match/merge but disagree on tags, the
// service should use the sync data's tag. Any local pieces of data that are
// not present in sync should immediately be Put(...) to the processor before
// returning. The same MetadataChangeList that was passed into this function
// can be passed to Put(...) calls. Delete(...) can also be called but should
// not be needed for most model types. Durable storage writes, if not able to
// combine all change atomically, should save the metadata after the data
// changes, so that this merge will be re-driven by sync if is not completely
// saved during the current run.
// storage keys in the |entity_data| are populated with GetStorageKey(...),
// local and sync copies of the same entity should resolve to the same storage
// key. Any local pieces of data that are not present in sync should
// immediately be Put(...) to the processor before returning. The same
// MetadataChangeList that was passed into this function can be passed to
// Put(...) calls. Delete(...) can also be called but should not be needed for
// most model types. Durable storage writes, if not able to combine all change
// atomically, should save the metadata after the data changes, so that this
// merge will be re-driven by sync if is not completely saved during the
// current run.
base::Optional<syncer::ModelError> MergeSyncData(
std::unique_ptr<syncer::MetadataChangeList> metadata_change_list,
syncer::EntityDataMap entity_data_map) override;
syncer::EntityChangeList entity_data) override;
// Apply changes from the sync server locally.
// Please note that |entity_changes| might have fewer entries than
......
......@@ -224,7 +224,7 @@ TEST_F(ReadingListStoreTest, SaveOneUnread) {
}
TEST_F(ReadingListStoreTest, SyncMergeOneEntry) {
syncer::EntityDataMap remote_input;
syncer::EntityChangeList remote_input;
ReadingListEntry entry(GURL("http://read.example.com/"), "read title",
AdvanceAndGetTime(clock_));
entry.SetRead(true, AdvanceAndGetTime(clock_));
......@@ -235,7 +235,8 @@ TEST_F(ReadingListStoreTest, SyncMergeOneEntry) {
data.client_tag_hash = "http://read.example.com/";
*data.specifics.mutable_reading_list() = *specifics;
remote_input["http://read.example.com/"] = data.PassToPtr();
remote_input.push_back(syncer::EntityChange::CreateAdd(
"http://read.example.com/", data.PassToPtr()));
std::unique_ptr<syncer::MetadataChangeList> metadata_changes(
reading_list_store_->CreateMetadataChangeList());
......@@ -248,7 +249,6 @@ TEST_F(ReadingListStoreTest, SyncMergeOneEntry) {
}
TEST_F(ReadingListStoreTest, ApplySyncChangesOneAdd) {
syncer::EntityDataMap remote_input;
ReadingListEntry entry(GURL("http://read.example.com/"), "read title",
AdvanceAndGetTime(clock_));
entry.SetRead(true, AdvanceAndGetTime(clock_));
......@@ -271,7 +271,6 @@ TEST_F(ReadingListStoreTest, ApplySyncChangesOneAdd) {
}
TEST_F(ReadingListStoreTest, ApplySyncChangesOneMerge) {
syncer::EntityDataMap remote_input;
AdvanceAndGetTime(clock_);
model_->AddEntry(GURL("http://unread.example.com/"), "unread title",
reading_list::ADDED_VIA_CURRENT_APP);
......@@ -302,7 +301,6 @@ TEST_F(ReadingListStoreTest, ApplySyncChangesOneIgnored) {
"old unread title", AdvanceAndGetTime(clock_));
old_entry.SetRead(true, AdvanceAndGetTime(clock_));
syncer::EntityDataMap remote_input;
AdvanceAndGetTime(clock_);
model_->AddEntry(GURL("http://unread.example.com/"), "new unread title",
reading_list::ADDED_VIA_CURRENT_APP);
......
......@@ -114,7 +114,7 @@ DeviceInfoSyncBridge::CreateMetadataChangeList() {
base::Optional<ModelError> DeviceInfoSyncBridge::MergeSyncData(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityDataMap entity_data_map) {
EntityChangeList entity_data) {
DCHECK(has_provider_initialized_);
DCHECK(change_processor()->IsTrackingMetadata());
const DeviceInfo* local_info =
......@@ -138,10 +138,10 @@ base::Optional<ModelError> DeviceInfoSyncBridge::MergeSyncData(
bool has_changes = false;
std::string local_guid = local_info->guid();
std::unique_ptr<WriteBatch> batch = store_->CreateWriteBatch();
for (const auto& kv : entity_data_map) {
for (const auto& change : entity_data) {
const DeviceInfoSpecifics& specifics =
kv.second.value().specifics.device_info();
DCHECK_EQ(kv.first, specifics.cache_guid());
change.data().specifics.device_info();
DCHECK_EQ(change.storage_key(), specifics.cache_guid());
if (specifics.cache_guid() == local_guid) {
// Don't Put local data if it's the same as the remote copy.
if (local_info->Equals(*SpecificsToModel(specifics))) {
......
......@@ -43,7 +43,7 @@ class DeviceInfoSyncBridge : public ModelTypeSyncBridge,
std::unique_ptr<MetadataChangeList> CreateMetadataChangeList() override;
base::Optional<ModelError> MergeSyncData(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityDataMap entity_data_map) override;
EntityChangeList entity_data) override;
base::Optional<ModelError> ApplySyncChanges(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityChangeList entity_changes) override;
......
......@@ -158,19 +158,6 @@ EntityChangeList EntityAddList(
return changes;
}
// Similar helper to EntityAddList(...), only wraps in a EntityDataMap for a
// merge call. Order is irrelevant, since the map sorts by key. Should not
// contain multiple specifics with the same guid.
EntityDataMap InlineEntityDataMap(
const std::vector<DeviceInfoSpecifics>& specifics_list) {
EntityDataMap map;
for (const auto& specifics : specifics_list) {
EXPECT_EQ(map.end(), map.find(specifics.cache_guid()));
map[specifics.cache_guid()] = SpecificsToEntity(specifics);
}
return map;
}
} // namespace
class DeviceInfoSyncBridgeTest : public testing::Test,
......@@ -572,7 +559,7 @@ TEST_F(DeviceInfoSyncBridgeTest, MergeEmpty) {
InitializeAndPump();
EXPECT_EQ(1, change_count());
auto error = bridge()->MergeSyncData(bridge()->CreateMetadataChangeList(),
EntityDataMap());
EntityChangeList());
EXPECT_FALSE(error);
EXPECT_EQ(1, change_count());
// TODO(skym): Stop sending local twice. The first of the two puts will
......@@ -603,9 +590,9 @@ TEST_F(DeviceInfoSyncBridgeTest, MergeWithData) {
bridge()->CreateMetadataChangeList();
metadata_changes->UpdateModelTypeState(state);
auto error = bridge()->MergeSyncData(
std::move(metadata_changes),
InlineEntityDataMap({conflict_remote, unique_remote}));
auto error =
bridge()->MergeSyncData(std::move(metadata_changes),
EntityAddList({conflict_remote, unique_remote}));
EXPECT_FALSE(error);
EXPECT_EQ(2, change_count());
......@@ -639,7 +626,7 @@ TEST_F(DeviceInfoSyncBridgeTest, MergeLocalGuid) {
InitializeAndPump();
auto error = bridge()->MergeSyncData(bridge()->CreateMetadataChangeList(),
InlineEntityDataMap({specifics}));
EntityAddList({specifics}));
EXPECT_FALSE(error);
EXPECT_EQ(0, change_count());
EXPECT_EQ(1u, bridge()->GetAllDeviceInfo().size());
......@@ -655,7 +642,7 @@ TEST_F(DeviceInfoSyncBridgeTest, MergeLocalGuidBeforeReconcile) {
// EntityData because its cache guid is the same the local device's.
auto error = bridge()->MergeSyncData(
bridge()->CreateMetadataChangeList(),
InlineEntityDataMap({CreateSpecifics(kDefaultLocalSuffix)}));
EntityAddList({CreateSpecifics(kDefaultLocalSuffix)}));
EXPECT_FALSE(error);
EXPECT_EQ(0, change_count());
EXPECT_EQ(0u, bridge()->GetAllDeviceInfo().size());
......@@ -670,13 +657,13 @@ TEST_F(DeviceInfoSyncBridgeTest, ClearProviderAndMerge) {
local_device()->Clear();
auto error1 = bridge()->MergeSyncData(bridge()->CreateMetadataChangeList(),
InlineEntityDataMap({specifics}));
EntityAddList({specifics}));
EXPECT_FALSE(error1);
EXPECT_EQ(1u, bridge()->GetAllDeviceInfo().size());
local_device()->Initialize(CreateModel(kDefaultLocalSuffix));
auto error2 = bridge()->MergeSyncData(bridge()->CreateMetadataChangeList(),
InlineEntityDataMap({specifics}));
EntityAddList({specifics}));
EXPECT_FALSE(error2);
EXPECT_EQ(2u, bridge()->GetAllDeviceInfo().size());
}
......
......@@ -28,10 +28,6 @@ class EntityChange {
std::string storage_key() const { return storage_key_; }
ChangeType type() const { return type_; }
const EntityData& data() const { return data_.value(); }
// TODO(pavely): data_ptr() is added temporarily to support converting
// ModelTypeSyncBridge::MergeSyncData from map to change list. Should be
// removed as part of crbug.com/719570.
const EntityDataPtr& data_ptr() const { return data_; }
private:
EntityChange(const std::string& storage_key,
......
......@@ -28,7 +28,6 @@ struct EntityDataTraits {
using EntityDataPtr = ProtoValuePtr<EntityData, EntityDataTraits>;
using EntityDataList = std::vector<EntityDataPtr>;
using EntityDataMap = std::map<std::string, EntityDataPtr>;
// A light-weight container for sync entity data which represents either
// local data created on the ModelTypeSyncBridge side or remote data created
......
......@@ -232,13 +232,6 @@ base::Optional<ModelError> FakeModelTypeSyncBridge::MergeSyncData(
return {};
}
base::Optional<ModelError> FakeModelTypeSyncBridge::MergeSyncData(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityDataMap entity_data) {
NOTREACHED();
return {};
}
base::Optional<ModelError> FakeModelTypeSyncBridge::ApplySyncChanges(
std::unique_ptr<MetadataChangeList> metadata_changes,
EntityChangeList entity_changes) {
......
......@@ -107,9 +107,6 @@ class FakeModelTypeSyncBridge : public ModelTypeSyncBridge {
base::Optional<ModelError> MergeSyncData(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityChangeList entity_data) override;
base::Optional<ModelError> MergeSyncData(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityDataMap entity_data) override;
base::Optional<ModelError> ApplySyncChanges(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityChangeList entity_changes) override;
......
......@@ -21,19 +21,6 @@ ModelTypeSyncBridge::ModelTypeSyncBridge(
ModelTypeSyncBridge::~ModelTypeSyncBridge() {}
base::Optional<ModelError> ModelTypeSyncBridge::MergeSyncData(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityChangeList entity_data) {
EntityDataMap entity_data_map;
for (const auto& change : entity_data) {
DCHECK_EQ(EntityChange::ACTION_ADD, change.type());
DCHECK(!change.storage_key().empty());
DCHECK(entity_data_map.find(change.storage_key()) == entity_data_map.end());
entity_data_map.emplace(change.storage_key(), change.data_ptr());
}
return MergeSyncData(std::move(metadata_change_list), entity_data_map);
}
bool ModelTypeSyncBridge::SupportsGetStorageKey() const {
return true;
}
......
......@@ -66,28 +66,7 @@ class ModelTypeSyncBridge : public base::SupportsWeakPtr<ModelTypeSyncBridge> {
// completely saved during the current run.
virtual base::Optional<ModelError> MergeSyncData(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityChangeList entity_data);
// Perform the initial merge between local and sync data. This should only be
// called when a data type is first enabled to start syncing, and there is no
// sync metadata. Best effort should be made to match local and sync data. The
// keys in the |entity_data_map| will have been created via
// GetStorageKey(...), and if a local and sync data should match/merge but
// disagree on storage key, the bridge should delete one of the records
// (preferably local). Any local pieces of data that are not present in sync
// should immediately be Put(...) to the processor before returning. The same
// MetadataChangeList that was passed into this function can be passed to
// Put(...) calls. Delete(...) can also be called but should not be needed for
// most model types. Durable storage writes, if not able to combine all change
// atomically, should save the metadata after the data changes, so that this
// merge will be re-driven by sync if is not completely saved during the
// current run.
// TODO(pavely): This function should be removed as part of crbug.com/719570
// once all bridge implementations are switched to the other MergeSyncData
// signature.
virtual base::Optional<ModelError> MergeSyncData(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityDataMap entity_data_map) = 0;
EntityChangeList entity_data) = 0;
// Apply changes from the sync server locally.
// Please note that |entity_changes| might have fewer entries than
......
......@@ -27,7 +27,7 @@ StubModelTypeSyncBridge::CreateMetadataChangeList() {
base::Optional<ModelError> StubModelTypeSyncBridge::MergeSyncData(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityDataMap entity_data_map) {
EntityChangeList entity_data) {
return {};
}
......
......@@ -25,7 +25,7 @@ class StubModelTypeSyncBridge : public ModelTypeSyncBridge {
std::unique_ptr<MetadataChangeList> CreateMetadataChangeList() override;
base::Optional<ModelError> MergeSyncData(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityDataMap entity_data_map) override;
EntityChangeList entity_data) override;
base::Optional<ModelError> ApplySyncChanges(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityChangeList entity_changes) override;
......
......@@ -76,7 +76,7 @@ UserEventSyncBridge::CreateMetadataChangeList() {
base::Optional<ModelError> UserEventSyncBridge::MergeSyncData(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityDataMap entity_data_map) {
EntityChangeList entity_data) {
NOTREACHED();
return {};
}
......
......@@ -24,7 +24,7 @@ class UserEventSyncBridge : public ModelTypeSyncBridge {
std::unique_ptr<MetadataChangeList> CreateMetadataChangeList() override;
base::Optional<ModelError> MergeSyncData(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityDataMap entity_data_map) override;
EntityChangeList entity_data) override;
base::Optional<ModelError> ApplySyncChanges(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityChangeList entity_changes) override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment