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

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

Issue 1891903002: [Autofill] Set basic information when adding a new profiles and credit cards. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Further changes to the sync logic Created 4 years, 8 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_profile.cc
diff --git a/components/autofill/core/browser/autofill_profile.cc b/components/autofill/core/browser/autofill_profile.cc
index 86d3e4c05833df0df077c40ea7b75a70aecb292e..442ed9cbf1b30ffb5c6478cf3f213884aa739b1c 100644
--- a/components/autofill/core/browser/autofill_profile.cc
+++ b/components/autofill/core/browser/autofill_profile.cc
@@ -416,11 +416,10 @@ bool AutofillProfile::EqualsSansOrigin(const AutofillProfile& profile) const {
Compare(profile) == 0;
}
-bool AutofillProfile::EqualsForSyncPurposes(const AutofillProfile& profile)
- const {
+bool AutofillProfile::EqualsForSyncPurposes(
Mathieu 2016/04/22 20:54:27 nit: let's revert those lines to previous formatti
sebsg 2016/04/25 15:35:39 Done.
+ const AutofillProfile& profile) const {
return use_count() == profile.use_count() &&
- use_date() == profile.use_date() &&
- EqualsSansGuid(profile);
+ use_date() == profile.use_date() && EqualsSansGuid(profile);
}
bool AutofillProfile::operator==(const AutofillProfile& profile) const {
@@ -432,7 +431,8 @@ bool AutofillProfile::operator!=(const AutofillProfile& profile) const {
}
const base::string16 AutofillProfile::PrimaryValue() const {
- return GetRawInfo(ADDRESS_HOME_LINE1) + GetRawInfo(ADDRESS_HOME_CITY);
+ return GetRawInfo(NAME_FIRST) + GetRawInfo(NAME_LAST) +
+ GetRawInfo(ADDRESS_HOME_LINE1) + GetRawInfo(ADDRESS_HOME_CITY);
}
bool AutofillProfile::IsSubsetOf(const AutofillProfile& profile,
@@ -1031,8 +1031,7 @@ FormGroup* AutofillProfile::MutableFormGroupForType(const AutofillType& type) {
bool AutofillProfile::EqualsSansGuid(const AutofillProfile& profile) const {
return origin() == profile.origin() &&
- language_code() == profile.language_code() &&
- Compare(profile) == 0;
+ language_code() == profile.language_code() && Compare(profile) == 0;
Mathieu 2016/04/22 20:54:27 leave previous formatting?
sebsg 2016/04/25 15:35:39 Done.
}
// So we can compare AutofillProfiles with EXPECT_EQ().

Powered by Google App Engine
This is Rietveld 408576698