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

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

Issue 772253003: Create an autofill Suggestion class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 6 years 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 | « components/autofill/content/browser/wallet/instrument.cc ('k') | components/autofill/core/browser/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/content/browser/wallet/wallet_items.cc
diff --git a/components/autofill/content/browser/wallet/wallet_items.cc b/components/autofill/content/browser/wallet/wallet_items.cc
index 3b1c26df30d876da5c1b1dddd6d662d941b58f0b..1bace885444935b2964aea86cff36a61af09ba9c 100644
--- a/components/autofill/content/browser/wallet/wallet_items.cc
+++ b/components/autofill/content/browser/wallet/wallet_items.cc
@@ -12,6 +12,7 @@
#include "base/values.h"
#include "components/autofill/content/browser/wallet/gaia_account.h"
#include "components/autofill/content/browser/wallet/wallet_service_url.h"
+#include "components/autofill/core/browser/autofill_sync_constants.h"
#include "components/autofill/core/browser/autofill_type.h"
#include "components/autofill/core/browser/credit_card.h"
#include "grit/components_scaled_resources.h"
@@ -42,19 +43,19 @@ bool VectorsAreEqual(const std::vector<T*>& a, const std::vector<T*>& b) {
WalletItems::MaskedInstrument::Type
TypeFromString(const std::string& type_string) {
- if (type_string == "VISA")
+ if (type_string == kSyncCardTypeVisa)
return WalletItems::MaskedInstrument::VISA;
- if (type_string == "MASTER_CARD")
+ if (type_string == kSyncCardTypeMasterCard)
return WalletItems::MaskedInstrument::MASTER_CARD;
- if (type_string == "AMEX")
+ if (type_string == kSyncCardTypeAmex)
return WalletItems::MaskedInstrument::AMEX;
- if (type_string == "DISCOVER")
+ if (type_string == kSyncCardTypeDiscover)
return WalletItems::MaskedInstrument::DISCOVER;
- if (type_string == "SOLO")
+ if (type_string == kSyncCardTypeSolo)
return WalletItems::MaskedInstrument::SOLO;
- if (type_string == "MAESTRO")
+ if (type_string == kSyncCardTypeSolo)
return WalletItems::MaskedInstrument::MAESTRO;
- if (type_string == "SWITCH")
+ if (type_string == kSyncCardTypeSwitch)
return WalletItems::MaskedInstrument::SWITCH;
return WalletItems::MaskedInstrument::UNKNOWN;
}
« no previous file with comments | « components/autofill/content/browser/wallet/instrument.cc ('k') | components/autofill/core/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698