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

Unified Diff: components/autofill/core/browser/autofill_merge_unittest.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/autofill_merge_unittest.cc
diff --git a/components/autofill/core/browser/autofill_merge_unittest.cc b/components/autofill/core/browser/autofill_merge_unittest.cc
index 37a5a87ae88b2aab891bbb972df7eef2a128f4ac..7b6fcb9e9f9729955ab63d8c399524ff39acd41a 100644
--- a/components/autofill/core/browser/autofill_merge_unittest.cc
+++ b/components/autofill/core/browser/autofill_merge_unittest.cc
@@ -111,7 +111,9 @@ void PersonalDataManagerMock::Reset() {
void PersonalDataManagerMock::SaveImportedProfile(
const AutofillProfile& profile) {
std::vector<AutofillProfile> profiles;
- if (!MergeProfile(profile, profiles_.get(), "en-US", &profiles))
+ std::string merged_guid =
+ MergeProfile(profile, profiles_.get(), "en-US", &profiles);
+ if (merged_guid != profile.guid())
profiles_.push_back(new AutofillProfile(profile));
}

Powered by Google App Engine
This is Rietveld 408576698