summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-22 00:37:08 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-22 00:37:08 +0000
commita0bb8138f4fe105fc68f88cf9e721c849272d2b3 (patch)
treece91f7e4c0706a623d542db3a5e29206ff306a0f
parent5bcb63daf6671ff2770a672c142d702fa6e95dea (diff)
downloadchromium_src-a0bb8138f4fe105fc68f88cf9e721c849272d2b3.zip
chromium_src-a0bb8138f4fe105fc68f88cf9e721c849272d2b3.tar.gz
chromium_src-a0bb8138f4fe105fc68f88cf9e721c849272d2b3.tar.bz2
Avoid DCHECK in AutofillModelAssociator::Associate
BUG=100848 TEST=no DCHECK when syncing the accounts described in bug 87188 (check with Anna Popivanova before testing this) Review URL: http://codereview.chromium.org/8347031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106818 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/sync/glue/autofill_model_associator.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/sync/glue/autofill_model_associator.cc b/chrome/browser/sync/glue/autofill_model_associator.cc
index 106cc3a..a9ec19f 100644
--- a/chrome/browser/sync/glue/autofill_model_associator.cc
+++ b/chrome/browser/sync/glue/autofill_model_associator.cc
@@ -320,6 +320,11 @@ void AutofillModelAssociator::AddNativeEntryIfNeeded(
std::string tag(KeyToTag(key.name(), key.value()));
Associate(&tag, node.GetId());
bundle->new_entries.push_back(AutofillEntry(key, timestamps));
+
+ // It seems that name/value pairs are not always unique on the sync server.
+ // As a result, we have to filter out duplicates here. This probably stems
+ // from a bug in the database. http://crbug.com/100848
+ bundle->current_entries.insert(key);
}
}