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

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

Issue 108013004: Build Autofill component on iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_autofill_ipc
Patch Set: Response to review Created 7 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
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 92e82c3125a05c46553a78233c39763d9cc5dd02..2d62c5e116f98e2da5944a068c43e37bf48de1ae 100644
--- a/components/autofill/core/browser/credit_card.cc
+++ b/components/autofill/core/browser/credit_card.cc
@@ -25,11 +25,16 @@
#include "components/autofill/core/browser/validation.h"
#include "components/autofill/core/common/form_field_data.h"
#include "grit/component_strings.h"
-#include "grit/webkit_resources.h"
#include "third_party/icu/source/common/unicode/uloc.h"
#include "third_party/icu/source/i18n/unicode/dtfmtsym.h"
#include "ui/base/l10n/l10n_util.h"
+// TODO(blundell): Eliminate the need for this conditional include.
+// crbug.com/328150
+#if !defined(OS_IOS)
+#include "grit/webkit_resources.h"
+#endif
+
namespace autofill {
namespace {
@@ -164,6 +169,12 @@ base::string16 CreditCard::TypeForDisplay(const std::string& type) {
// static
int CreditCard::IconResourceId(const std::string& type) {
+ // TODO(blundell): Either move these resources out of webkit_resources or
+ // this function into //components/autofill/content/browser to eliminate the
+ // need for this ifdef-ing. crbug.com/328150
+#if defined(OS_IOS)
+ return 0;
+#else
if (type == kAmericanExpressCard)
return IDR_AUTOFILL_CC_AMEX;
if (type == kDinersCard)
@@ -183,6 +194,7 @@ int CreditCard::IconResourceId(const std::string& type) {
// include a new card.
DCHECK_EQ(kGenericCard, type);
return IDR_AUTOFILL_CC_GENERIC;
+#endif // defined(OS_IOS)
}
// static

Powered by Google App Engine
This is Rietveld 408576698