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 44126e7a6d82c7147011ead9bdee0e8fe8379eff..9fc817a502c2037dec8142874f7f3d1e2b82b7cd 100644 |
--- a/chrome/browser/payments/chrome_payment_request_delegate.cc |
+++ b/chrome/browser/payments/chrome_payment_request_delegate.cc |
@@ -20,7 +20,11 @@ namespace payments { |
ChromePaymentRequestDelegate::ChromePaymentRequestDelegate( |
content::WebContents* web_contents) |
- : dialog_(nullptr), web_contents_(web_contents) {} |
+ : dialog_(nullptr), |
+ web_contents_(web_contents), |
+ address_normalizer_(GetAddressInputSource(), GetAddressInputStorage()) {} |
+ |
+ChromePaymentRequestDelegate::~ChromePaymentRequestDelegate() {} |
void ChromePaymentRequestDelegate::ShowDialog(PaymentRequest* request) { |
DCHECK_EQ(nullptr, dialog_); |
@@ -71,7 +75,7 @@ void ChromePaymentRequestDelegate::DoFullCardRequest( |
dialog_->ShowCvcUnmaskPrompt(credit_card, result_delegate, web_contents_); |
} |
-std::unique_ptr<const ::i18n::addressinput::Source> |
+std::unique_ptr<::i18n::addressinput::Source> |
ChromePaymentRequestDelegate::GetAddressInputSource() { |
return base::WrapUnique(new autofill::ChromeMetadataSource( |
I18N_ADDRESS_VALIDATION_DATA_URL, |
@@ -82,4 +86,8 @@ ChromePaymentRequestDelegate::GetAddressInputStorage() { |
return autofill::ValidationRulesStorageFactory::CreateStorage(); |
} |
+AddressNormalizer* ChromePaymentRequestDelegate::GetAddressNormalizer() { |
+ return &address_normalizer_; |
+} |
+ |
} // namespace payments |