Commit 95731b46 authored by Caitlin Fischer's avatar Caitlin Fischer Committed by Commit Bot

[Autofill] Deleted code that is no longer being used.

Change-Id: I9f2bb110d5014be315af698ad65f0030c38acfd7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1557697
Commit-Queue: Fabio Tirelo <ftirelo@chromium.org>
Reviewed-by: default avatarFabio Tirelo <ftirelo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#648665}
parent 8db5a0d8
......@@ -444,12 +444,6 @@ int AutofillProfile::Compare(const AutofillProfile& profile) const {
return 0;
}
bool AutofillProfile::EqualsSansOrigin(const AutofillProfile& profile) const {
return guid() == profile.guid() &&
language_code() == profile.language_code() &&
Compare(profile) == 0;
}
bool AutofillProfile::EqualsForSyncPurposes(const AutofillProfile& profile)
const {
return use_count() == profile.use_count() &&
......@@ -664,16 +658,6 @@ bool AutofillProfile::SaveAdditionalInfo(const AutofillProfile& profile,
return true;
}
// static
bool AutofillProfile::SupportsMultiValue(ServerFieldType type) {
FieldTypeGroup group = AutofillType(type).group();
return group == NAME ||
group == NAME_BILLING ||
group == EMAIL ||
group == PHONE_HOME ||
group == PHONE_BILLING;
}
// static
void AutofillProfile::CreateDifferentiatingLabels(
const std::vector<AutofillProfile*>& profiles,
......
......@@ -100,9 +100,6 @@ class AutofillProfile : public AutofillDataModel {
// themselves.
int Compare(const AutofillProfile& profile) const;
// Same as operator==, but ignores differences in origin.
bool EqualsSansOrigin(const AutofillProfile& profile) const;
// Same as operator==, but ignores differences in guid and cares about
// differences in usage stats.
bool EqualsForSyncPurposes(const AutofillProfile& profile) const;
......@@ -149,9 +146,6 @@ class AutofillProfile : public AutofillDataModel {
bool SaveAdditionalInfo(const AutofillProfile& profile,
const std::string& app_locale);
// Returns |true| if |type| accepts multi-values.
static bool SupportsMultiValue(ServerFieldType type);
// Creates a differentiating label for each of the |profiles|.
// Labels consist of the minimal differentiating combination of:
// 1. Full name.
......
......@@ -337,12 +337,6 @@ AutofillProfile GetVerifiedProfile() {
return profile;
}
AutofillProfile GetVerifiedProfile2() {
AutofillProfile profile(GetFullProfile2());
profile.set_origin(kSettingsOrigin);
return profile;
}
AutofillProfile GetServerProfile() {
AutofillProfile profile(AutofillProfile::SERVER_PROFILE, "id1");
// Note: server profiles don't have email addresses and only have full names.
......
......@@ -112,9 +112,6 @@ AutofillProfile GetIncompleteProfile2();
// Returns a verified profile full of dummy info.
AutofillProfile GetVerifiedProfile();
// Returns a verified profile full of dummy info, different to the above.
AutofillProfile GetVerifiedProfile2();
// Returns a server profile full of dummy info.
AutofillProfile GetServerProfile();
......@@ -127,12 +124,6 @@ CreditCard GetCreditCard();
// Returns a credit card full of dummy info, different to the above.
CreditCard GetCreditCard2();
// Returns a verified credit card full of dummy info.
CreditCard GetVerifiedCreditCard();
// Returns a verified credit card full of dummy info, different to the above.
CreditCard GetVerifiedCreditCard2();
// Returns a masked server card full of dummy info.
CreditCard GetMaskedServerCard();
CreditCard GetMaskedServerCardAmex();
......
......@@ -1230,24 +1230,6 @@ std::set<base::string16> FormStructure::PossibleValues(ServerFieldType type) {
return values;
}
base::string16 FormStructure::GetUniqueValue(HtmlFieldType type) const {
base::string16 value;
for (const auto& field : fields_) {
if (field->html_type() != type)
continue;
// More than one value found; abort rather than choosing one arbitrarily.
if (!value.empty() && !field->value.empty()) {
value.clear();
break;
}
value = field->value;
}
return value;
}
const AutofillField* FormStructure::field(size_t index) const {
if (index >= fields_.size()) {
NOTREACHED();
......
......@@ -194,10 +194,6 @@ class FormStructure {
// All returned values are standardized to upper case.
std::set<base::string16> PossibleValues(ServerFieldType type);
// Gets the form's current value for |type|. For example, it may return
// the contents of a text input or the currently selected <option>.
base::string16 GetUniqueValue(HtmlFieldType type) const;
// Rationalize phone number fields in a given section, that is only fill
// the fields that are considered composing a first complete phone number.
void RationalizePhoneNumbersInSection(std::string section);
......
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