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

Unified Diff: components/autofill/core/browser/webdata/autofill_profile_syncable_service.cc

Issue 1989173005: [Autofill] Dedupe similar profiles on insertion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 6 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
Index: components/autofill/core/browser/webdata/autofill_profile_syncable_service.cc
diff --git a/components/autofill/core/browser/webdata/autofill_profile_syncable_service.cc b/components/autofill/core/browser/webdata/autofill_profile_syncable_service.cc
index b150b38dd318ca196c64ca4d9b9285c8defe2f01..32dcc68e5fb951416585b5e3edcaf4883e35906f 100644
--- a/components/autofill/core/browser/webdata/autofill_profile_syncable_service.cc
+++ b/components/autofill/core/browser/webdata/autofill_profile_syncable_service.cc
@@ -542,10 +542,10 @@ AutofillProfileSyncableService::CreateOrUpdateProfile(
<< ". Profile to be deleted " << local_profile->guid();
profile_map->erase(it);
break;
- } else if (!local_profile->IsVerified() &&
- !new_profile->IsVerified() &&
- !local_profile->PrimaryValue().empty() &&
- local_profile->PrimaryValue() == new_profile->PrimaryValue()) {
+ } else if (!local_profile->IsVerified() && !new_profile->IsVerified() &&
+ !local_profile->PrimaryValue(app_locale_).empty() &&
+ local_profile->PrimaryValue(app_locale_) ==
+ new_profile->PrimaryValue(app_locale_)) {
// Add it to candidates for merge - if there is no profile with this
// guid we will merge them.
bundle->candidates_to_merge.insert(

Powered by Google App Engine
This is Rietveld 408576698