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

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

Issue 1080883002: Remove some more bad ASCII-centric autofill code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 5 years, 8 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/core/browser/credit_card.h
diff --git a/components/autofill/core/browser/credit_card.h b/components/autofill/core/browser/credit_card.h
index b25ec8c2d2fa728ba6067b4d72c6555bf4a4ac96..2a6990a387d4f20cf991527901750f89cb204d33 100644
--- a/components/autofill/core/browser/credit_card.h
+++ b/components/autofill/core/browser/credit_card.h
@@ -172,6 +172,13 @@ class CreditCard : public AutofillDataModel {
// Sets |number_| to |number| and computes the appropriate card |type_|.
void SetNumber(const base::string16& number);
+ // Converts a string representation of a month (such as "February" or "feb."
+ // or "2") into a numeric value in [1, 12]. Returns true on successful
+ // conversion or false if a month was not recognized.
+ static bool ConvertMonth(const base::string16& month,
+ const std::string& app_locale,
+ int* num);
+
private:
// FormGroup:
void GetSupportedTypes(ServerFieldTypeSet* supported_types) const override;
« no previous file with comments | « components/autofill/core/browser/contact_info_unittest.cc ('k') | components/autofill/core/browser/credit_card.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698