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

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

Issue 554081: First revision of the AutoFill settings dialog.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | « chrome/browser/autofill/credit_card.h ('k') | chrome/chrome_browser.gypi » ('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) 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 "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/autofill/autofill_type.h" 10 #include "chrome/browser/autofill/autofill_type.h"
(...skipping 16 matching lines...) Expand all
27 CreditCard::CreditCard(const string16& label, int unique_id) 27 CreditCard::CreditCard(const string16& label, int unique_id)
28 : expiration_month_(0), 28 : expiration_month_(0),
29 expiration_year_(0), 29 expiration_year_(0),
30 label_(label), 30 label_(label),
31 unique_id_(unique_id) { 31 unique_id_(unique_id) {
32 } 32 }
33 33
34 CreditCard::CreditCard(const CreditCard& card) { 34 CreditCard::CreditCard(const CreditCard& card) {
35 operator=(card); 35 operator=(card);
36 } 36 }
37
38 CreditCard::CreditCard()
39 : expiration_month_(0),
40 expiration_year_(0) {
41 }
42
43
37 FormGroup* CreditCard::Clone() const { 44 FormGroup* CreditCard::Clone() const {
38 return new CreditCard(*this); 45 return new CreditCard(*this);
39 } 46 }
40 47
41 void CreditCard::GetPossibleFieldTypes(const string16& text, 48 void CreditCard::GetPossibleFieldTypes(const string16& text,
42 FieldTypeSet* possible_types) const { 49 FieldTypeSet* possible_types) const {
43 if (IsNameOnCard(text)) 50 if (IsNameOnCard(text))
44 possible_types->insert(CREDIT_CARD_NAME); 51 possible_types->insert(CREDIT_CARD_NAME);
45 52
46 if (IsCreditCardNumber(text)) 53 if (IsCreditCardNumber(text))
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 << " " 459 << " "
453 << UTF16ToUTF8(creditcard.GetFieldText( 460 << UTF16ToUTF8(creditcard.GetFieldText(
454 AutoFillType(CREDIT_CARD_VERIFICATION_CODE))) 461 AutoFillType(CREDIT_CARD_VERIFICATION_CODE)))
455 << " " 462 << " "
456 << UTF16ToUTF8(creditcard.GetFieldText( 463 << UTF16ToUTF8(creditcard.GetFieldText(
457 AutoFillType(CREDIT_CARD_EXP_MONTH))) 464 AutoFillType(CREDIT_CARD_EXP_MONTH)))
458 << " " 465 << " "
459 << UTF16ToUTF8(creditcard.GetFieldText( 466 << UTF16ToUTF8(creditcard.GetFieldText(
460 AutoFillType(CREDIT_CARD_EXP_4_DIGIT_YEAR))); 467 AutoFillType(CREDIT_CARD_EXP_4_DIGIT_YEAR)));
461 } 468 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/credit_card.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698