Chromium Code Reviews| Index: chrome/browser/payments/chrome_payment_request_delegate.cc |
| diff --git a/chrome/browser/payments/chrome_payment_request_delegate.cc b/chrome/browser/payments/chrome_payment_request_delegate.cc |
| index 57604ce218da93d631c558abc2b23a7244792b46..6fa6a6353140503d8cf6cf77f2be76bb51b563a1 100644 |
| --- a/chrome/browser/payments/chrome_payment_request_delegate.cc |
| +++ b/chrome/browser/payments/chrome_payment_request_delegate.cc |
| @@ -5,11 +5,16 @@ |
| #include "chrome/browser/payments/chrome_payment_request_delegate.h" |
| #include "chrome/browser/autofill/personal_data_manager_factory.h" |
| +#include "chrome/browser/autofill/validation_rules_storage_factory.h" |
| #include "chrome/browser/browser_process.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/ui/browser_dialogs.h" |
| +#include "components/autofill/core/browser/personal_data_manager.h" |
| #include "components/payments/content/payment_request_dialog.h" |
| #include "content/public/browser/web_contents.h" |
| +#include "third_party/libaddressinput/chromium/chrome_metadata_source.h" |
| +#include "third_party/libaddressinput/chromium/chrome_storage_impl.h" |
| +#include "third_party/libaddressinput/messages.h" |
|
Mathieu
2017/04/13 13:28:31
not sure we need this
|
| namespace payments { |
| @@ -58,4 +63,15 @@ void ChromePaymentRequestDelegate::DoFullCardRequest( |
| dialog_->ShowCvcUnmaskPrompt(credit_card, result_delegate, web_contents_); |
| } |
| +std::unique_ptr<const ::i18n::addressinput::Source> |
| +ChromePaymentRequestDelegate::GetAddressInputSource() { |
| + return base::WrapUnique(new autofill::ChromeMetadataSource( |
| + I18N_ADDRESS_VALIDATION_DATA_URL, |
| + GetPersonalDataManager()->GetURLRequestContextGetter())); |
| +} |
| +std::unique_ptr<::i18n::addressinput::Storage> |
| +ChromePaymentRequestDelegate::GetAddressInputStorage() { |
| + return autofill::ValidationRulesStorageFactory::CreateStorage(); |
| +} |
| + |
| } // namespace payments |