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

Side by Side Diff: ios/chrome/browser/payments/test_payment_request.mm

Issue 2970013003: [Payment Request] Displays appropriate footer if first transaction completed (Closed)
Patch Set: Addressed comments + rebase Created 3 years, 5 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 | « ios/chrome/browser/payments/test_payment_request.h ('k') | ios/chrome/browser/prefs/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 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 #import "ios/chrome/browser/payments/test_payment_request.h" 5 #import "ios/chrome/browser/payments/test_payment_request.h"
6 6
7 #include "components/autofill/core/browser/personal_data_manager.h" 7 #include "components/autofill/core/browser/personal_data_manager.h"
8 #include "components/autofill/core/browser/region_data_loader.h" 8 #include "components/autofill/core/browser/region_data_loader.h"
9 #include "components/payments/core/payments_profile_comparator.h" 9 #include "components/payments/core/payments_profile_comparator.h"
10 #include "components/prefs/pref_service.h"
10 #include "ios/web/public/payments/payment_request.h" 11 #include "ios/web/public/payments/payment_request.h"
11 12
12 #if !defined(__has_feature) || !__has_feature(objc_arc) 13 #if !defined(__has_feature) || !__has_feature(objc_arc)
13 #error "This file requires ARC support." 14 #error "This file requires ARC support."
14 #endif 15 #endif
15 16
16 void TestPaymentRequest::ClearShippingProfiles() { 17 void TestPaymentRequest::ClearShippingProfiles() {
17 shipping_profiles_.clear(); 18 shipping_profiles_.clear();
18 } 19 }
19 20
20 void TestPaymentRequest::ClearContactProfiles() { 21 void TestPaymentRequest::ClearContactProfiles() {
21 contact_profiles_.clear(); 22 contact_profiles_.clear();
22 } 23 }
23 24
24 void TestPaymentRequest::ClearCreditCards() { 25 void TestPaymentRequest::ClearCreditCards() {
25 credit_cards_.clear(); 26 credit_cards_.clear();
26 } 27 }
27 28
28 autofill::RegionDataLoader* TestPaymentRequest::GetRegionDataLoader() { 29 autofill::RegionDataLoader* TestPaymentRequest::GetRegionDataLoader() {
29 if (region_data_loader_) 30 if (region_data_loader_)
30 return region_data_loader_; 31 return region_data_loader_;
31 return PaymentRequest::GetRegionDataLoader(); 32 return PaymentRequest::GetRegionDataLoader();
32 } 33 }
33 34
35 PrefService* TestPaymentRequest::GetPrefService() {
36 if (pref_service_)
37 return pref_service_;
38 return PaymentRequest::GetPrefService();
39 }
40
34 payments::PaymentsProfileComparator* TestPaymentRequest::profile_comparator() { 41 payments::PaymentsProfileComparator* TestPaymentRequest::profile_comparator() {
35 if (profile_comparator_) 42 if (profile_comparator_)
36 return profile_comparator_; 43 return profile_comparator_;
37 return PaymentRequest::profile_comparator(); 44 return PaymentRequest::profile_comparator();
38 } 45 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/payments/test_payment_request.h ('k') | ios/chrome/browser/prefs/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698