OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/autofill/credit_card.h" | 5 #include "chrome/browser/autofill/credit_card.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/string_split.h" | 10 #include "base/string_split.h" |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 NOTREACHED(); | 321 NOTREACHED(); |
322 break; | 322 break; |
323 | 323 |
324 default: | 324 default: |
325 DLOG(ERROR) << "Attempting to set unknown info-type " | 325 DLOG(ERROR) << "Attempting to set unknown info-type " |
326 << type.field_type(); | 326 << type.field_type(); |
327 break; | 327 break; |
328 } | 328 } |
329 } | 329 } |
330 | 330 |
331 const string16 CreditCard::Label() const { | 331 string16 CreditCard::Label() const { |
332 return label_; | 332 return label_; |
333 } | 333 } |
334 | 334 |
335 void CreditCard::SetInfoForMonthInputType(const string16& value) { | 335 void CreditCard::SetInfoForMonthInputType(const string16& value) { |
336 // Check if |text| is "yyyy-mm" format first, and check normal month format. | 336 // Check if |text| is "yyyy-mm" format first, and check normal month format. |
337 WebKit::WebRegularExpression re(WebKit::WebString("^[0-9]{4}\\-[0-9]{1,2}$"), | 337 WebKit::WebRegularExpression re(WebKit::WebString("^[0-9]{4}\\-[0-9]{1,2}$"), |
338 WebKit::WebTextCaseInsensitive); | 338 WebKit::WebTextCaseInsensitive); |
339 bool match = re.match(WebKit::WebString(StringToLowerASCII(value))) != -1; | 339 bool match = re.match(WebKit::WebString(StringToLowerASCII(value))) != -1; |
340 if (match) { | 340 if (match) { |
341 std::vector<string16> year_month; | 341 std::vector<string16> year_month; |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 // send these strings to WK, which then asks WebKitClientImpl to load the image | 659 // send these strings to WK, which then asks WebKitClientImpl to load the image |
660 // data. | 660 // data. |
661 const char* const kAmericanExpressCard = "americanExpressCC"; | 661 const char* const kAmericanExpressCard = "americanExpressCC"; |
662 const char* const kDinersCard = "dinersCC"; | 662 const char* const kDinersCard = "dinersCC"; |
663 const char* const kDiscoverCard = "discoverCC"; | 663 const char* const kDiscoverCard = "discoverCC"; |
664 const char* const kGenericCard = "genericCC"; | 664 const char* const kGenericCard = "genericCC"; |
665 const char* const kJCBCard = "jcbCC"; | 665 const char* const kJCBCard = "jcbCC"; |
666 const char* const kMasterCard = "masterCardCC"; | 666 const char* const kMasterCard = "masterCardCC"; |
667 const char* const kSoloCard = "soloCC"; | 667 const char* const kSoloCard = "soloCC"; |
668 const char* const kVisaCard = "visaCC"; | 668 const char* const kVisaCard = "visaCC"; |
OLD | NEW |