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

Unified Diff: components/autofill/core/browser/personal_data_manager.cc

Issue 1143253012: More work on removing variants from Autofill (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: work around iOS lameness Created 5 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/personal_data_manager.cc
diff --git a/components/autofill/core/browser/personal_data_manager.cc b/components/autofill/core/browser/personal_data_manager.cc
index b1ad2b06659d0ed14b80e9e0f8e2a164ba3ff7ea..82167f9bfa2e6fce90a9c5c1fc186a68238e514d 100644
--- a/components/autofill/core/browser/personal_data_manager.cc
+++ b/components/autofill/core/browser/personal_data_manager.cc
@@ -997,19 +997,14 @@ std::string PersonalDataManager::MergeProfile(
// If we have already saved this address, merge in any missing values.
// Only merge with the first match.
for (AutofillProfile* existing_profile : existing_profiles) {
- if (!matching_profile_found &&
- !new_profile.PrimaryValue().empty() &&
- AutofillProfile::AreProfileStringsSimilar(
- existing_profile->PrimaryValue(),
- new_profile.PrimaryValue())) {
+ if (!matching_profile_found && !new_profile.PrimaryValue().empty() &&
+ existing_profile->SaveAdditionalInfo(new_profile, app_locale)) {
// Unverified profiles should always be updated with the newer data,
// whereas verified profiles should only ever be overwritten by verified
// data. If an automatically aggregated profile would overwrite a
// verified profile, just drop it.
matching_profile_found = true;
guid = existing_profile->guid();
- if (!existing_profile->IsVerified() || new_profile.IsVerified())
- existing_profile->OverwriteWithOrAddTo(new_profile, app_locale);
}
merged_profiles->push_back(*existing_profile);
}

Powered by Google App Engine
This is Rietveld 408576698