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

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

Issue 1540423004: Add card details and legal message to Android save credit card infobar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Justin's nits. Created 4 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
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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 default: 126 default:
127 return shipping_address_->GetInfo(type, app_locale); 127 return shipping_address_->GetInfo(type, app_locale);
128 } 128 }
129 } 129 }
130 } 130 }
131 } 131 }
132 132
133 base::string16 FullWallet::TypeAndLastFourDigits() { 133 base::string16 FullWallet::TypeAndLastFourDigits() {
134 CreditCard card; 134 CreditCard card;
135 card.SetRawInfo(CREDIT_CARD_NUMBER, base::ASCIIToUTF16(GetPan())); 135 card.SetRawInfo(CREDIT_CARD_NUMBER, base::ASCIIToUTF16(GetPan()));
136 return card.TypeAndLastFourDigits(); 136 return card.TypeAndLastFourDigitsForDisplay();
137 } 137 }
138 138
139 const std::string& FullWallet::GetPan() { 139 const std::string& FullWallet::GetPan() {
140 if (pan_.empty()) 140 if (pan_.empty())
141 DecryptCardInfo(); 141 DecryptCardInfo();
142 return pan_; 142 return pan_;
143 } 143 }
144 144
145 bool FullWallet::operator==(const FullWallet& other) const { 145 bool FullWallet::operator==(const FullWallet& other) const {
146 if (expiration_month_ != other.expiration_month_) 146 if (expiration_month_ != other.expiration_month_)
(...skipping 79 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

Powered by Google App Engine
This is Rietveld 408576698