Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: components/payments/core/test_payment_request_delegate.cc

Issue 2836353002: [Payments] Normalize shipping address change on Desktop (Closed)
Patch Set: Addressed Math's comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/payments/core/test_payment_request_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/payments/core/test_payment_request_delegate.h"
6
7 #include "base/strings/utf_string_conversions.h"
8
9 namespace payments {
10
11 TestPaymentRequestDelegate::TestPaymentRequestDelegate(
12 autofill::PersonalDataManager* personal_data_manager)
13 : personal_data_manager_(personal_data_manager),
14 locale_("en-US"),
15 last_committed_url_("https://shop.com") {}
16
17 TestPaymentRequestDelegate::~TestPaymentRequestDelegate() {}
18
19 autofill::PersonalDataManager*
20 TestPaymentRequestDelegate::GetPersonalDataManager() {
21 return personal_data_manager_;
22 }
23
24 const std::string& TestPaymentRequestDelegate::GetApplicationLocale() const {
25 return locale_;
26 }
27
28 bool TestPaymentRequestDelegate::IsIncognito() const {
29 return false;
30 }
31
32 bool TestPaymentRequestDelegate::IsSslCertificateValid() {
33 return true;
34 }
35
36 const GURL& TestPaymentRequestDelegate::GetLastCommittedURL() const {
37 return last_committed_url_;
38 }
39
40 void TestPaymentRequestDelegate::DoFullCardRequest(
41 const autofill::CreditCard& credit_card,
42 base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate>
43 result_delegate) {
44 result_delegate->OnFullCardRequestSucceeded(credit_card,
45 base::ASCIIToUTF16("123"));
46 }
47
48 AddressNormalizer* TestPaymentRequestDelegate::GetAddressNormalizer() {
49 return &address_normalizer_;
50 }
51
52 TestAddressNormalizer* TestPaymentRequestDelegate::GetTestAddressNormalizer() {
53 return &address_normalizer_;
54 }
55
56 autofill::RegionDataLoader* TestPaymentRequestDelegate::GetRegionDataLoader() {
57 return nullptr;
58 }
59
60 } // namespace payments
OLDNEW
« no previous file with comments | « components/payments/core/test_payment_request_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698