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

Side by Side Diff: components/autofill/content/browser/wallet/full_wallet.cc

Issue 1694443004: [Autofill] Add credit card first and last name heuristics predictions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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
« no previous file with comments | « components/autofill.gypi ('k') | components/autofill/core/browser/BUILD.gn » ('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 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/content/browser/wallet/full_wallet.h" 5 #include "components/autofill/content/browser/wallet/full_wallet.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 wallet->cvn_ = cvn; 65 wallet->cvn_ = cvn;
66 return wallet; 66 return wallet;
67 } 67 }
68 68
69 base::string16 FullWallet::GetInfo(const std::string& app_locale, 69 base::string16 FullWallet::GetInfo(const std::string& app_locale,
70 const AutofillType& type) { 70 const AutofillType& type) {
71 switch (type.GetStorableType()) { 71 switch (type.GetStorableType()) {
72 case CREDIT_CARD_NUMBER: 72 case CREDIT_CARD_NUMBER:
73 return base::ASCIIToUTF16(GetPan()); 73 return base::ASCIIToUTF16(GetPan());
74 74
75 case CREDIT_CARD_NAME: 75 case CREDIT_CARD_NAME_FULL:
76 return billing_address()->recipient_name(); 76 return billing_address()->recipient_name();
77 77
78 case CREDIT_CARD_VERIFICATION_CODE: 78 case CREDIT_CARD_VERIFICATION_CODE:
79 return base::ASCIIToUTF16(GetCvn()); 79 return base::ASCIIToUTF16(GetCvn());
80 80
81 case CREDIT_CARD_EXP_MONTH: 81 case CREDIT_CARD_EXP_MONTH:
82 if (expiration_month() == 0) 82 if (expiration_month() == 0)
83 return base::string16(); 83 return base::string16();
84 return base::IntToString16(expiration_month()); 84 return base::IntToString16(expiration_month());
85 85
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 226 }
227 227
228 const std::string& FullWallet::GetCvn() { 228 const std::string& FullWallet::GetCvn() {
229 if (cvn_.empty()) 229 if (cvn_.empty())
230 DecryptCardInfo(); 230 DecryptCardInfo();
231 return cvn_; 231 return cvn_;
232 } 232 }
233 233
234 } // namespace wallet 234 } // namespace wallet
235 } // namespace autofill 235 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill.gypi ('k') | components/autofill/core/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698