Index: components/password_manager/core/browser/password_syncable_service.cc |
diff --git a/components/password_manager/core/browser/password_syncable_service.cc b/components/password_manager/core/browser/password_syncable_service.cc |
index 8cf38174c4a4eb9901884adcdcc1602c828ce28a..bef3bdc4cc0d971b6d4ce675b2b18fb19b62b2f2 100644 |
--- a/components/password_manager/core/browser/password_syncable_service.cc |
+++ b/components/password_manager/core/browser/password_syncable_service.cc |
@@ -142,6 +142,13 @@ syncer::SyncMergeResult PasswordSyncableService::MergeDataAndStartSyncing( |
return merge_result; |
} |
+ if (password_entries.size() != new_local_entries.size()) { |
+ merge_result.set_error(sync_error_factory_->CreateAndUploadError( |
+ FROM_HERE, |
+ "There are passwords with identical sync tags in the database.")); |
+ return merge_result; |
+ } |
+ |
merge_result.set_num_items_before_association(new_local_entries.size()); |
// List that contains the entries that are known only to sync. |