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

Side by Side Diff: chrome/browser/autofill/credit_card.h

Issue 11819016: [Autofill] Require callers to pass in locale when parsing named months like "January" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/autofill/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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_AUTOFILL_CREDIT_CARD_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_CREDIT_CARD_H_
6 #define CHROME_BROWSER_AUTOFILL_CREDIT_CARD_H_ 6 #define CHROME_BROWSER_AUTOFILL_CREDIT_CARD_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 virtual void GetSupportedTypes(FieldTypeSet* supported_types) const OVERRIDE; 99 virtual void GetSupportedTypes(FieldTypeSet* supported_types) const OVERRIDE;
100 100
101 // The month and year are zero if not present. 101 // The month and year are zero if not present.
102 int Expiration4DigitYear() const { return expiration_year_; } 102 int Expiration4DigitYear() const { return expiration_year_; }
103 int Expiration2DigitYear() const { return expiration_year_ % 100; } 103 int Expiration2DigitYear() const { return expiration_year_ % 100; }
104 string16 ExpirationMonthAsString() const; 104 string16 ExpirationMonthAsString() const;
105 string16 Expiration4DigitYearAsString() const; 105 string16 Expiration4DigitYearAsString() const;
106 string16 Expiration2DigitYearAsString() const; 106 string16 Expiration2DigitYearAsString() const;
107 107
108 // Sets |expiration_month_| to the integer conversion of |text|. 108 // Sets |expiration_month_| to the integer conversion of |text|.
109 void SetExpirationMonthFromString(const string16& text); 109 void SetExpirationMonthFromString(const string16& text,
110 const std::string& app_locale);
110 111
111 // Sets |expiration_year_| to the integer conversion of |text|. 112 // Sets |expiration_year_| to the integer conversion of |text|.
112 void SetExpirationYearFromString(const string16& text); 113 void SetExpirationYearFromString(const string16& text);
113 114
114 // Sets |number_| to |number| and computes the appropriate card |type_|. 115 // Sets |number_| to |number| and computes the appropriate card |type_|.
115 void SetNumber(const string16& number); 116 void SetNumber(const string16& number);
116 117
117 // These setters verify that the month and year are within appropriate 118 // These setters verify that the month and year are within appropriate
118 // ranges. 119 // ranges.
119 void SetExpirationMonth(int expiration_month); 120 void SetExpirationMonth(int expiration_month);
(...skipping 18 matching lines...) Expand all
138 extern const char* const kAmericanExpressCard; 139 extern const char* const kAmericanExpressCard;
139 extern const char* const kDinersCard; 140 extern const char* const kDinersCard;
140 extern const char* const kDiscoverCard; 141 extern const char* const kDiscoverCard;
141 extern const char* const kGenericCard; 142 extern const char* const kGenericCard;
142 extern const char* const kJCBCard; 143 extern const char* const kJCBCard;
143 extern const char* const kMasterCard; 144 extern const char* const kMasterCard;
144 extern const char* const kSoloCard; 145 extern const char* const kSoloCard;
145 extern const char* const kVisaCard; 146 extern const char* const kVisaCard;
146 147
147 #endif // CHROME_BROWSER_AUTOFILL_CREDIT_CARD_H_ 148 #endif // CHROME_BROWSER_AUTOFILL_CREDIT_CARD_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autofill/credit_card.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698