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

Side by Side Diff: components/autofill/core/browser/credit_card.h

Issue 692233002: Use --no-output-all-resource-defines for grit on iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: readd a couple last resource IDs Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « build/ios/grit_whitelist.txt ('k') | components/autofill/core/browser/credit_card.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 13 matching lines...) Expand all
24 CreditCard(); 24 CreditCard();
25 CreditCard(const CreditCard& credit_card); 25 CreditCard(const CreditCard& credit_card);
26 ~CreditCard() override; 26 ~CreditCard() override;
27 27
28 // Returns a version of |number| that has any separator characters removed. 28 // Returns a version of |number| that has any separator characters removed.
29 static const base::string16 StripSeparators(const base::string16& number); 29 static const base::string16 StripSeparators(const base::string16& number);
30 30
31 // The user-visible type of the card, e.g. 'Mastercard'. 31 // The user-visible type of the card, e.g. 'Mastercard'.
32 static base::string16 TypeForDisplay(const std::string& type); 32 static base::string16 TypeForDisplay(const std::string& type);
33 33
34 // This method is not compiled on iOS because the resources are not used and
35 // should not be shipped.
36 #if !defined(OS_IOS)
34 // The ResourceBundle ID for the appropriate credit card image. 37 // The ResourceBundle ID for the appropriate credit card image.
35 static int IconResourceId(const std::string& type); 38 static int IconResourceId(const std::string& type);
39 #endif // #if !defined(OS_IOS)
36 40
37 // Returns the internal representation of credit card type corresponding to 41 // Returns the internal representation of credit card type corresponding to
38 // the given |number|. The credit card type is determined purely according to 42 // the given |number|. The credit card type is determined purely according to
39 // the Issuer Identification Number (IIN), a.k.a. the "Bank Identification 43 // the Issuer Identification Number (IIN), a.k.a. the "Bank Identification
40 // Number (BIN)", which is parsed from the relevant prefix of the |number|. 44 // Number (BIN)", which is parsed from the relevant prefix of the |number|.
41 // This function performs no additional validation checks on the |number|. 45 // This function performs no additional validation checks on the |number|.
42 // Hence, the returned type for both the valid card "4111-1111-1111-1111" and 46 // Hence, the returned type for both the valid card "4111-1111-1111-1111" and
43 // the invalid card "4garbage" will be Visa, which has an IIN of 4. 47 // the invalid card "4garbage" will be Visa, which has an IIN of 4.
44 static const char* GetCreditCardType(const base::string16& number); 48 static const char* GetCreditCardType(const base::string16& number);
45 49
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 extern const char* const kDiscoverCard; 158 extern const char* const kDiscoverCard;
155 extern const char* const kGenericCard; 159 extern const char* const kGenericCard;
156 extern const char* const kJCBCard; 160 extern const char* const kJCBCard;
157 extern const char* const kMasterCard; 161 extern const char* const kMasterCard;
158 extern const char* const kUnionPay; 162 extern const char* const kUnionPay;
159 extern const char* const kVisaCard; 163 extern const char* const kVisaCard;
160 164
161 } // namespace autofill 165 } // namespace autofill
162 166
163 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_ 167 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_CREDIT_CARD_H_
OLDNEW
« no previous file with comments | « build/ios/grit_whitelist.txt ('k') | components/autofill/core/browser/credit_card.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698