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

Unified Diff: components/autofill/content/browser/wallet/full_wallet.cc

Issue 22009003: [Autofill] Distinguish between native field types and potentially HTML field types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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/content/browser/wallet/full_wallet.cc
diff --git a/components/autofill/content/browser/wallet/full_wallet.cc b/components/autofill/content/browser/wallet/full_wallet.cc
index 0a7fef67e6f70df846b65534f8811105fc501ff5..eaadcc464ae158ac0b1a65ed251828e1c5ab9b56 100644
--- a/components/autofill/content/browser/wallet/full_wallet.cc
+++ b/components/autofill/content/browser/wallet/full_wallet.cc
@@ -8,6 +8,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
+#include "components/autofill/core/browser/autofill_type.h"
#include "components/autofill/core/browser/credit_card.h"
namespace {
@@ -126,8 +127,8 @@ scoped_ptr<FullWallet>
required_actions));
}
-base::string16 FullWallet::GetInfo(AutofillFieldType type) {
- switch (type) {
+base::string16 FullWallet::GetInfo(const AutofillType& type) {
+ switch (type.server_type()) {
case CREDIT_CARD_NUMBER:
return UTF8ToUTF16(GetPan());
@@ -188,7 +189,8 @@ bool FullWallet::HasRequiredAction(RequiredAction action) const {
base::string16 FullWallet::TypeAndLastFourDigits() {
CreditCard card;
- card.SetRawInfo(CREDIT_CARD_NUMBER, GetInfo(CREDIT_CARD_NUMBER));
+ card.SetRawInfo(CREDIT_CARD_NUMBER,
+ GetInfo(AutofillType(CREDIT_CARD_NUMBER)));
return card.TypeAndLastFourDigits();
}

Powered by Google App Engine
This is Rietveld 408576698