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

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

Issue 6650014: Autofill extend profiles to include multi-valued fields, part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit Created 9 years, 9 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/browser/autofill/fax_number.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/string16.h" 10 #include "base/string16.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 expiration_year_(0), 141 expiration_year_(0),
142 guid_(guid::GenerateGUID()) { 142 guid_(guid::GenerateGUID()) {
143 } 143 }
144 144
145 CreditCard::CreditCard(const CreditCard& credit_card) : FormGroup() { 145 CreditCard::CreditCard(const CreditCard& credit_card) : FormGroup() {
146 operator=(credit_card); 146 operator=(credit_card);
147 } 147 }
148 148
149 CreditCard::~CreditCard() {} 149 CreditCard::~CreditCard() {}
150 150
151 FormGroup* CreditCard::Clone() const {
152 return new CreditCard(*this);
153 }
154
155 void CreditCard::GetPossibleFieldTypes(const string16& text, 151 void CreditCard::GetPossibleFieldTypes(const string16& text,
156 FieldTypeSet* possible_types) const { 152 FieldTypeSet* possible_types) const {
157 if (IsNameOnCard(text)) 153 if (IsNameOnCard(text))
158 possible_types->insert(CREDIT_CARD_NAME); 154 possible_types->insert(CREDIT_CARD_NAME);
159 155
160 if (IsCreditCardNumber(text)) 156 if (IsCreditCardNumber(text))
161 possible_types->insert(CREDIT_CARD_NUMBER); 157 possible_types->insert(CREDIT_CARD_NUMBER);
162 158
163 if (IsExpirationMonth(text)) 159 if (IsExpirationMonth(text))
164 possible_types->insert(CREDIT_CARD_EXP_MONTH); 160 possible_types->insert(CREDIT_CARD_EXP_MONTH);
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 // 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
664 // data. 660 // data.
665 const char* const kAmericanExpressCard = "americanExpressCC"; 661 const char* const kAmericanExpressCard = "americanExpressCC";
666 const char* const kDinersCard = "dinersCC"; 662 const char* const kDinersCard = "dinersCC";
667 const char* const kDiscoverCard = "discoverCC"; 663 const char* const kDiscoverCard = "discoverCC";
668 const char* const kGenericCard = "genericCC"; 664 const char* const kGenericCard = "genericCC";
669 const char* const kJCBCard = "jcbCC"; 665 const char* const kJCBCard = "jcbCC";
670 const char* const kMasterCard = "masterCardCC"; 666 const char* const kMasterCard = "masterCardCC";
671 const char* const kSoloCard = "soloCC"; 667 const char* const kSoloCard = "soloCC";
672 const char* const kVisaCard = "visaCC"; 668 const char* const kVisaCard = "visaCC";
OLDNEW
« no previous file with comments | « chrome/browser/autofill/credit_card.h ('k') | chrome/browser/autofill/fax_number.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698