| 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 "chrome/browser/ui/autofill/data_model_wrapper.h" | 5 #include "chrome/browser/ui/autofill/data_model_wrapper.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 185 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 186 return rb.GetImageNamed(CreditCard::IconResourceId(card_->type())); | 186 return rb.GetImageNamed(CreditCard::IconResourceId(card_->type())); |
| 187 } | 187 } |
| 188 | 188 |
| 189 bool AutofillCreditCardWrapper::GetDisplayText( | 189 bool AutofillCreditCardWrapper::GetDisplayText( |
| 190 base::string16* vertically_compact, | 190 base::string16* vertically_compact, |
| 191 base::string16* horizontally_compact) { | 191 base::string16* horizontally_compact) { |
| 192 if (!card_->IsValid()) | 192 if (!card_->IsValid()) |
| 193 return false; | 193 return false; |
| 194 | 194 |
| 195 *vertically_compact = *horizontally_compact = card_->TypeAndLastFourDigits(); | 195 *vertically_compact = *horizontally_compact = |
| 196 card_->TypeAndLastFourDigitsForDisplay(); |
| 196 return true; | 197 return true; |
| 197 } | 198 } |
| 198 | 199 |
| 199 const std::string& AutofillCreditCardWrapper::GetLanguageCode() const { | 200 const std::string& AutofillCreditCardWrapper::GetLanguageCode() const { |
| 200 // Formatting a credit card for display does not depend on language code. | 201 // Formatting a credit card for display does not depend on language code. |
| 201 return base::EmptyString(); | 202 return base::EmptyString(); |
| 202 } | 203 } |
| 203 | 204 |
| 204 // I18nAddressDataWrapper | 205 // I18nAddressDataWrapper |
| 205 | 206 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 223 } | 224 } |
| 224 | 225 |
| 225 return base::UTF8ToUTF16(address_->GetFieldValue(field)); | 226 return base::UTF8ToUTF16(address_->GetFieldValue(field)); |
| 226 } | 227 } |
| 227 | 228 |
| 228 const std::string& I18nAddressDataWrapper::GetLanguageCode() const { | 229 const std::string& I18nAddressDataWrapper::GetLanguageCode() const { |
| 229 return address_->language_code; | 230 return address_->language_code; |
| 230 } | 231 } |
| 231 | 232 |
| 232 } // namespace autofill | 233 } // namespace autofill |
| OLD | NEW |