Commit 113b2b0b authored by vasilii's avatar vasilii Committed by Commit bot

PasswordSyncableService shouldn't tolerate the situation when 2 or more...

PasswordSyncableService shouldn't tolerate the situation when 2 or more passwords in the password store have the same sync tag.

BUG=396900

Review URL: https://codereview.chromium.org/493233003

Cr-Commit-Position: refs/heads/master@{#291661}
parent 5d15ab58
......@@ -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.
......
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