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

Unified Diff: components/password_manager/core/browser/password_syncable_service.cc

Issue 493233003: PasswordSyncableService shouldn't tolerate the situation when 2 or more passwords in the password s… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 6 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698