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

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

Issue 23882013: [rAc] Persist selection of newly added cards and addresses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test compile Created 7 years, 3 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_table.cc
diff --git a/components/autofill/core/browser/webdata/autofill_table.cc b/components/autofill/core/browser/webdata/autofill_table.cc
index 9066d9c0df0c8cf151f4d7f87bed3d2985e5d4ed..1f61bb3967ed94f9b0de5e772f11d7db3d2933af 100644
--- a/components/autofill/core/browser/webdata/autofill_table.cc
+++ b/components/autofill/core/browser/webdata/autofill_table.cc
@@ -2095,7 +2095,7 @@ bool AutofillTable::MigrateToVersion37MergeAndCullOlderProfiles() {
if (PersonalDataManager::IsValidLearnableProfile(*profile, app_locale_)) {
std::vector<AutofillProfile> merged_profiles;
- bool merged = PersonalDataManager::MergeProfile(
+ std::string merged_guid = PersonalDataManager::MergeProfile(
*profile, accumulated_profiles_p, app_locale_, &merged_profiles);
std::swap(accumulated_profiles, merged_profiles);
@@ -2108,9 +2108,8 @@ bool AutofillTable::MigrateToVersion37MergeAndCullOlderProfiles() {
address_of<AutofillProfile>);
// If the profile got merged trash the original.
- if (merged)
+ if (merged_guid != profile->guid())
AddAutofillGUIDToTrash(profile->guid());
-
} else {
// An invalid profile, so trash it.
AddAutofillGUIDToTrash(profile->guid());

Powered by Google App Engine
This is Rietveld 408576698