| Index: components/sync/model/fake_model_type_sync_bridge.cc
|
| diff --git a/components/sync/model/fake_model_type_sync_bridge.cc b/components/sync/model/fake_model_type_sync_bridge.cc
|
| index 538fba0f337b0f7985798253737b9974d6fe94cc..d1e44c3c43c8f27c70ee6a749068e99912f36315 100644
|
| --- a/components/sync/model/fake_model_type_sync_bridge.cc
|
| +++ b/components/sync/model/fake_model_type_sync_bridge.cc
|
| @@ -9,6 +9,7 @@
|
|
|
| #include "base/bind.h"
|
| #include "base/memory/ptr_util.h"
|
| +#include "base/stl_util.h"
|
| #include "components/sync/base/hash_util.h"
|
| #include "components/sync/model/mutable_data_batch.h"
|
| #include "components/sync/model_impl/in_memory_metadata_change_list.h"
|
| @@ -213,8 +214,12 @@ base::Optional<ModelError> FakeModelTypeSyncBridge::MergeSyncData(
|
| EXPECT_NE(SupportsGetStorageKey(), storage_key.empty());
|
| if (storage_key.empty()) {
|
| storage_key = GetStorageKeyImpl(change.data());
|
| - change_processor()->UpdateStorageKey(change.data(), storage_key,
|
| - metadata_change_list.get());
|
| + if (base::ContainsKey(keys_to_ignore_, storage_key)) {
|
| + change_processor()->UntrackEntity(change.data());
|
| + } else {
|
| + change_processor()->UpdateStorageKey(change.data(), storage_key,
|
| + metadata_change_list.get());
|
| + }
|
| }
|
| remote_storage_keys.insert(storage_key);
|
| db_->PutData(storage_key, change.data());
|
| @@ -382,4 +387,8 @@ std::unique_ptr<EntityData> FakeModelTypeSyncBridge::CopyEntityData(
|
| return new_data;
|
| }
|
|
|
| +void FakeModelTypeSyncBridge::SetKeyToIgnore(const std::string key) {
|
| + keys_to_ignore_.insert(key);
|
| +}
|
| +
|
| } // namespace syncer
|
|
|