Commit 049f0ca0 authored by Matthias Körber's avatar Matthias Körber Committed by Commit Bot

Removed unused methods from |AutofillProfile|.

Bug: 1007974
Change-Id: Idec48bf99d1c6b2059df2f5e2bdf6b1dc1d09881
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1826877
Commit-Queue: Vadym Doroshenko <dvadym@chromium.org>
Reviewed-by: default avatarVadym Doroshenko <dvadym@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700198}
parent 0dc73838
......@@ -482,14 +482,6 @@ bool AutofillProfile::operator!=(const AutofillProfile& profile) const {
return !operator==(profile);
}
bool AutofillProfile::IsSubsetOf(const AutofillProfile& profile,
const std::string& app_locale) const {
ServerFieldTypeSet types;
GetSupportedTypes(&types);
return IsSubsetOfForFieldSet(AutofillProfileComparator(app_locale), profile,
app_locale, types);
}
bool AutofillProfile::IsSubsetOfForFieldSet(
const AutofillProfileComparator& comparator,
const AutofillProfile& profile,
......
......@@ -124,10 +124,6 @@ class AutofillProfile : public AutofillDataModel {
bool operator==(const AutofillProfile& profile) const;
virtual bool operator!=(const AutofillProfile& profile) const;
// Returns true if this AutofillProfile's data is a subset of |profile|'s.
bool IsSubsetOf(const AutofillProfile& profile,
const std::string& app_locale) const;
// Like IsSubsetOf, but considers only the given |types|.
bool IsSubsetOfForFieldSet(const AutofillProfileComparator& comparator,
const AutofillProfile& profile,
......
......@@ -673,31 +673,6 @@ TEST(AutofillProfileTest, CreateInferredLabelsFlattensMultiLineValues) {
EXPECT_EQ(ASCIIToUTF16("88 Nowhere Ave., Apt. 42"), labels[0]);
}
TEST(AutofillProfileTest, IsSubsetOfForProfiles) {
AutofillProfile profile1 =
AutofillProfile(base::GenerateGUID(), test::kEmptyOrigin);
test::SetProfileInfo(&profile1, "Genevieve", "", "Fox",
"genevieve@hotmail.com", "", "274 Main St", "",
"Northhampton", "MA", "01060", "US", "");
AutofillProfile profile2 =
AutofillProfile(base::GenerateGUID(), test::kEmptyOrigin);
test::SetProfileInfo(&profile2, "Genevieve", "", "Fox",
"genevieve@hotmail.com", "", "", "", "", "", "", "US",
"");
AutofillProfile profile3 =
AutofillProfile(base::GenerateGUID(), test::kEmptyOrigin);
test::SetProfileInfo(&profile3, "Genevieve", "", "Fuller",
"genevieve@hotmail.com", "", "", "", "", "", "", "US",
"");
EXPECT_FALSE(profile1.IsSubsetOf(profile2, "en-US"));
EXPECT_TRUE(profile2.IsSubsetOf(profile1, "en-US"));
EXPECT_FALSE(profile2.IsSubsetOf(profile3, "en-US"));
EXPECT_FALSE(profile3.IsSubsetOf(profile2, "en-US"));
}
TEST(AutofillProfileTest, IsSubsetOfForFieldSet_DifferentMiddleNames) {
AutofillProfile profile1 =
AutofillProfile(base::GenerateGUID(), test::kEmptyOrigin);
......@@ -1460,6 +1435,7 @@ TEST(AutofillProfileTest, IsAnInvalidPhoneNumber) {
}
}
TEST(AutofillProfileTest, ValidityStatesClients) {
AutofillProfile profile;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment