Chromium Code Reviews| 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..01a5e0fdc7493528149314f32627535f4a392204 100644 |
| --- a/components/autofill/core/browser/webdata/autofill_profile_syncable_service.cc |
| +++ b/components/autofill/core/browser/webdata/autofill_profile_syncable_service.cc |
| @@ -542,14 +542,18 @@ 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()) { |
| - // Add it to candidates for merge - if there is no profile with this |
| - // guid we will merge them. |
| - bundle->candidates_to_merge.insert( |
| - std::make_pair(local_profile->guid(), new_profile)); |
| + } else { |
| + base::string16 local_profile_primary_value( |
| + local_profile->PrimaryValue(app_locale_)); |
| + if (!local_profile->IsVerified() && !new_profile->IsVerified() && |
|
Roger McFarlane (Chromium)
2016/06/13 15:12:52
maybe break up this if
if (!local_profile->IsVeri
sebsg
2016/06/13 17:57:59
Done.
|
| + !local_profile_primary_value.empty() && |
| + local_profile_primary_value == |
| + 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( |
| + std::make_pair(local_profile->guid(), new_profile)); |
| + } |
| } |
| } |
| profiles_.push_back(new_profile); |