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

Side by Side Diff: components/autofill/core/browser/credit_card_field.cc

Issue 1106313002: Revert of Limit form-less Autofilling to pages that look like checkout pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
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 #include "components/autofill/core/browser/credit_card_field.h" 5 #include "components/autofill/core/browser/credit_card_field.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "components/autofill/core/browser/autofill_field.h" 16 #include "components/autofill/core/browser/autofill_field.h"
17 #include "components/autofill/core/browser/autofill_regex_constants.h" 17 #include "components/autofill/core/browser/autofill_regex_constants.h"
18 #include "components/autofill/core/browser/autofill_regexes.h"
18 #include "components/autofill/core/browser/autofill_scanner.h" 19 #include "components/autofill/core/browser/autofill_scanner.h"
19 #include "components/autofill/core/browser/field_types.h" 20 #include "components/autofill/core/browser/field_types.h"
20 #include "components/autofill/core/common/autofill_regexes.h"
21 #include "grit/components_strings.h" 21 #include "grit/components_strings.h"
22 #include "ui/base/l10n/l10n_util.h" 22 #include "ui/base/l10n/l10n_util.h"
23 23
24 namespace autofill { 24 namespace autofill {
25 25
26 namespace { 26 namespace {
27 27
28 // Credit card numbers are at most 19 digits in length. 28 // Credit card numbers are at most 19 digits in length.
29 // [Ref: http://en.wikipedia.org/wiki/Bank_card_number] 29 // [Ref: http://en.wikipedia.org/wiki/Bank_card_number]
30 const size_t kMaxValidCardNumberSize = 19; 30 const size_t kMaxValidCardNumberSize = 19;
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 451
452 ServerFieldType CreditCardField::GetExpirationYearType() const { 452 ServerFieldType CreditCardField::GetExpirationYearType() const {
453 return (expiration_date_ 453 return (expiration_date_
454 ? exp_year_type_ 454 ? exp_year_type_
455 : ((expiration_year_ && expiration_year_->max_length == 2) 455 : ((expiration_year_ && expiration_year_->max_length == 2)
456 ? CREDIT_CARD_EXP_2_DIGIT_YEAR 456 ? CREDIT_CARD_EXP_2_DIGIT_YEAR
457 : CREDIT_CARD_EXP_4_DIGIT_YEAR)); 457 : CREDIT_CARD_EXP_4_DIGIT_YEAR));
458 } 458 }
459 459
460 } // namespace autofill 460 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/credit_card.cc ('k') | components/autofill/core/browser/form_field.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698