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

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

Issue 22040002: [Autofill] Add a separate enumeration for HTML field type hints. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add docs Created 7 years, 4 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/credit_card.cc
diff --git a/components/autofill/core/browser/credit_card.cc b/components/autofill/core/browser/credit_card.cc
index 2a4e8b6cbebe65079417bd575bb4ca994e00eb92..03cdab3d102c1660d65ecd2a53b53a998f0d98ea 100644
--- a/components/autofill/core/browser/credit_card.cc
+++ b/components/autofill/core/browser/credit_card.cc
@@ -371,16 +371,17 @@ void CreditCard::SetRawInfo(NativeFieldType type,
base::string16 CreditCard::GetInfo(const AutofillType& type,
const std::string& app_locale) const {
- if (type.native_type() == CREDIT_CARD_NUMBER)
+ NativeFieldType native_type = type.GetEquivalentNativeType();
+ if (native_type == CREDIT_CARD_NUMBER)
return StripSeparators(number_);
- return GetRawInfo(type.native_type());
+ return GetRawInfo(native_type);
}
bool CreditCard::SetInfo(const AutofillType& type,
const base::string16& value,
const std::string& app_locale) {
- NativeFieldType native_type = type.native_type();
+ NativeFieldType native_type = type.GetEquivalentNativeType();
if (native_type == CREDIT_CARD_NUMBER)
SetRawInfo(native_type, StripSeparators(value));
else if (native_type == CREDIT_CARD_EXP_MONTH)

Powered by Google App Engine
This is Rietveld 408576698