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

Unified Diff: chrome/browser/autofill/autofill_profile.cc

Issue 8169009: Remove FieldTypeSubGroups from the AutofillType class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests compile Created 9 years, 2 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
« no previous file with comments | « chrome/browser/autofill/autofill_metrics.cc ('k') | chrome/browser/autofill/autofill_type.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_profile.cc
diff --git a/chrome/browser/autofill/autofill_profile.cc b/chrome/browser/autofill/autofill_profile.cc
index 5f9ac5ea54efe5606471583bab7089f54596b966..d093d05d0ee9f910528b22adc0634b96b9eed166 100644
--- a/chrome/browser/autofill/autofill_profile.cc
+++ b/chrome/browser/autofill/autofill_profile.cc
@@ -306,7 +306,7 @@ void AutofillProfile::SetMultiInfo(AutofillFieldType type,
case AutofillType::EMAIL:
CopyValuesToItems(type, values, &email_, EmailInfo());
break;
- case AutofillType::PHONE_HOME:
+ case AutofillType::PHONE:
CopyValuesToItems(type,
values,
&home_number_,
@@ -345,7 +345,7 @@ void AutofillProfile::GetMultiInfoImpl(AutofillFieldType type,
case AutofillType::EMAIL:
CopyItemsToValues(type, email_, canonicalize, values);
break;
- case AutofillType::PHONE_HOME:
+ case AutofillType::PHONE:
CopyItemsToValues(type, home_number_, canonicalize, values);
break;
default:
@@ -359,7 +359,7 @@ bool AutofillProfile::SupportsMultiValue(AutofillFieldType type) {
AutofillType::FieldTypeGroup group = AutofillType(type).group();
return group == AutofillType::NAME ||
group == AutofillType::EMAIL ||
- group == AutofillType::PHONE_HOME;
+ group == AutofillType::PHONE;
}
const string16 AutofillProfile::Label() const {
@@ -535,7 +535,7 @@ bool AutofillProfile::IsSubsetOf(const AutofillProfile& profile) const {
// name saved, but |profile| lacks one, |profile| could still be a subset
// of |this|.
continue;
- } else if (AutofillType(*iter).group() == AutofillType::PHONE_HOME) {
+ } else if (AutofillType(*iter).group() == AutofillType::PHONE) {
// Phone numbers should be canonicalized prior to being compared.
if (*iter != PHONE_HOME_WHOLE_NUMBER) {
continue;
@@ -578,7 +578,7 @@ void AutofillProfile::OverwriteWithOrAddTo(const AutofillProfile& profile) {
for (std::vector<string16>::iterator value_iter = new_values.begin();
value_iter != new_values.end(); ++value_iter) {
// Don't add duplicates.
- if (group == AutofillType::PHONE_HOME) {
+ if (group == AutofillType::PHONE) {
AddPhoneIfUnique(*value_iter, &existing_values);
} else {
std::vector<string16>::const_iterator existing_iter = std::find_if(
@@ -739,7 +739,7 @@ FormGroup* AutofillProfile::MutableFormGroupForType(AutofillFieldType type) {
case AutofillType::COMPANY:
form_group = &company_;
break;
- case AutofillType::PHONE_HOME:
+ case AutofillType::PHONE:
form_group = &home_number_[0];
break;
case AutofillType::ADDRESS_HOME:
« no previous file with comments | « chrome/browser/autofill/autofill_metrics.cc ('k') | chrome/browser/autofill/autofill_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698