OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/wallet/wallet_items.h" | 5 #include "components/autofill/browser/wallet/wallet_items.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
10 #include "grit/webkit_resources.h" | 10 #include "grit/webkit_resources.h" |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
199 return !(*this == other); | 199 return !(*this == other); |
200 } | 200 } |
201 | 201 |
202 bool WalletItems::HasRequiredAction(RequiredAction action) const { | 202 bool WalletItems::HasRequiredAction(RequiredAction action) const { |
203 DCHECK(ActionAppliesToWalletItems(action)); | 203 DCHECK(ActionAppliesToWalletItems(action)); |
204 return std::find(required_actions_.begin(), | 204 return std::find(required_actions_.begin(), |
205 required_actions_.end(), | 205 required_actions_.end(), |
206 action) != required_actions_.end(); | 206 action) != required_actions_.end(); |
207 } | 207 } |
208 | 208 |
209 // TODO(aruslan): improve this stub implementation. | |
210 string16 WalletItems::MaskedInstrument::DisplaySummaryLine1() const { | |
211 return descriptive_name(); | |
ahutter
2013/03/12 00:03:13
Not sure how often this is actually populated... Y
aruslan
2013/03/13 00:00:00
Yes, I think we would have to revisit this anyway.
| |
212 } | |
213 | |
214 string16 WalletItems::MaskedInstrument::DisplaySummaryLine2() const { | |
215 return address().DisplayName(); | |
216 } | |
217 | |
209 const gfx::Image& WalletItems::MaskedInstrument::CardIcon() const { | 218 const gfx::Image& WalletItems::MaskedInstrument::CardIcon() const { |
210 int idr = 0; | 219 int idr = 0; |
211 switch (type_) { | 220 switch (type_) { |
212 case AMEX: | 221 case AMEX: |
213 idr = IDR_AUTOFILL_CC_AMEX; | 222 idr = IDR_AUTOFILL_CC_AMEX; |
214 break; | 223 break; |
215 | 224 |
216 case DISCOVER: | 225 case DISCOVER: |
217 idr = IDR_AUTOFILL_CC_DISCOVER; | 226 idr = IDR_AUTOFILL_CC_DISCOVER; |
218 break; | 227 break; |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
402 required_actions_ == other.required_actions_ && | 411 required_actions_ == other.required_actions_ && |
403 obfuscated_gaia_id_ == other.obfuscated_gaia_id_; | 412 obfuscated_gaia_id_ == other.obfuscated_gaia_id_; |
404 } | 413 } |
405 | 414 |
406 bool WalletItems::operator!=(const WalletItems& other) const { | 415 bool WalletItems::operator!=(const WalletItems& other) const { |
407 return !(*this == other); | 416 return !(*this == other); |
408 } | 417 } |
409 | 418 |
410 } // namespace wallet | 419 } // namespace wallet |
411 } // namespace autofill | 420 } // namespace autofill |
OLD | NEW |