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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 FullWalletBillingWrapper::FullWalletBillingWrapper( | 321 FullWalletBillingWrapper::FullWalletBillingWrapper( |
322 wallet::FullWallet* full_wallet) | 322 wallet::FullWallet* full_wallet) |
323 : full_wallet_(full_wallet) { | 323 : full_wallet_(full_wallet) { |
324 DCHECK(full_wallet_); | 324 DCHECK(full_wallet_); |
325 } | 325 } |
326 | 326 |
327 FullWalletBillingWrapper::~FullWalletBillingWrapper() {} | 327 FullWalletBillingWrapper::~FullWalletBillingWrapper() {} |
328 | 328 |
329 base::string16 FullWalletBillingWrapper::GetInfo(const AutofillType& type) | 329 base::string16 FullWalletBillingWrapper::GetInfo(const AutofillType& type) |
330 const { | 330 const { |
331 return full_wallet_->GetInfo( | 331 return full_wallet_->GetInfo(g_browser_process->GetApplicationLocale(), type); |
332 g_browser_process->GetApplicationLocale(), | |
333 AutofillType(AutofillType::GetEquivalentBillingFieldType( | |
334 type.GetStorableType()))); | |
335 } | 332 } |
336 | 333 |
337 bool FullWalletBillingWrapper::GetDisplayText( | 334 bool FullWalletBillingWrapper::GetDisplayText( |
338 base::string16* vertically_compact, | 335 base::string16* vertically_compact, |
339 base::string16* horizontally_compact) { | 336 base::string16* horizontally_compact) { |
340 // TODO(dbeam): handle other required actions? http://crbug.com/163508 | 337 // TODO(dbeam): handle other required actions? http://crbug.com/163508 |
341 if (full_wallet_->HasRequiredAction(wallet::UPDATE_EXPIRATION_DATE)) | 338 if (full_wallet_->HasRequiredAction(wallet::UPDATE_EXPIRATION_DATE)) |
342 return false; | 339 return false; |
343 | 340 |
344 return DataModelWrapper::GetDisplayText(vertically_compact, | 341 return DataModelWrapper::GetDisplayText(vertically_compact, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 } | 393 } |
397 | 394 |
398 return base::UTF8ToUTF16(address_->GetFieldValue(field)); | 395 return base::UTF8ToUTF16(address_->GetFieldValue(field)); |
399 } | 396 } |
400 | 397 |
401 const std::string& I18nAddressDataWrapper::GetLanguageCode() const { | 398 const std::string& I18nAddressDataWrapper::GetLanguageCode() const { |
402 return address_->language_code; | 399 return address_->language_code; |
403 } | 400 } |
404 | 401 |
405 } // namespace autofill | 402 } // namespace autofill |
OLD | NEW |