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

Unified Diff: chrome/browser/ui/autofill/data_model_wrapper.cc

Issue 1153663004: [Autofill] Remove (most) support for variants in chrome/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/ui/autofill/data_model_wrapper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/autofill/data_model_wrapper.cc
diff --git a/chrome/browser/ui/autofill/data_model_wrapper.cc b/chrome/browser/ui/autofill/data_model_wrapper.cc
index aa07d1cf0aceebb6af1dabe83e5da0270a5d8641..2bc42aa7f0921de9509f6228848e2b6974cc9023 100644
--- a/chrome/browser/ui/autofill/data_model_wrapper.cc
+++ b/chrome/browser/ui/autofill/data_model_wrapper.cc
@@ -102,17 +102,7 @@ DataModelWrapper::DataModelWrapper() {}
// AutofillProfileWrapper
AutofillProfileWrapper::AutofillProfileWrapper(const AutofillProfile* profile)
- : profile_(profile),
- variant_group_(NO_GROUP),
- variant_(0) {}
-
-AutofillProfileWrapper::AutofillProfileWrapper(
- const AutofillProfile* profile,
- const AutofillType& type,
- size_t variant)
- : profile_(profile),
- variant_group_(type.group()),
- variant_(variant) {}
+ : profile_(profile) {}
AutofillProfileWrapper::~AutofillProfileWrapper() {}
@@ -124,18 +114,15 @@ base::string16 AutofillProfileWrapper::GetInfo(const AutofillType& type) const {
if (type.GetStorableType() == CREDIT_CARD_NAME)
effective_type = AutofillType(NAME_BILLING_FULL);
- size_t variant = GetVariantForType(effective_type);
const std::string& app_locale = g_browser_process->GetApplicationLocale();
- return profile_->GetInfoForVariant(effective_type, variant, app_locale);
+ return profile_->GetInfo(effective_type, app_locale);
}
base::string16 AutofillProfileWrapper::GetInfoForDisplay(
const AutofillType& type) const {
// We display the "raw" phone number which contains user-defined formatting.
if (type.GetStorableType() == PHONE_HOME_WHOLE_NUMBER) {
- std::vector<base::string16> values;
- profile_->GetRawMultiInfo(type.GetStorableType(), &values);
- const base::string16& phone_number = values[GetVariantForType(type)];
+ base::string16 phone_number = profile_->GetRawInfo(type.GetStorableType());
// If there is no user-defined formatting at all, add some standard
// formatting.
@@ -160,14 +147,6 @@ const std::string& AutofillProfileWrapper::GetLanguageCode() const {
return profile_->language_code();
}
-size_t AutofillProfileWrapper::GetVariantForType(const AutofillType& type)
- const {
- if (type.group() == variant_group_)
- return variant_;
-
- return 0;
-}
-
// AutofillShippingAddressWrapper
AutofillShippingAddressWrapper::AutofillShippingAddressWrapper(
« no previous file with comments | « chrome/browser/ui/autofill/data_model_wrapper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698