| OLD | NEW |
| 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 #ifndef IOS_CHROME_BROWSER_PAYMENTS_TEST_PAYMENT_REQUEST_H_ | 5 #ifndef IOS_CHROME_BROWSER_PAYMENTS_TEST_PAYMENT_REQUEST_H_ |
| 6 #define IOS_CHROME_BROWSER_PAYMENTS_TEST_PAYMENT_REQUEST_H_ | 6 #define IOS_CHROME_BROWSER_PAYMENTS_TEST_PAYMENT_REQUEST_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "ios/chrome/browser/payments/payment_request.h" | 9 #include "ios/chrome/browser/payments/payment_request.h" |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 } // namespace web | 23 } // namespace web |
| 24 | 24 |
| 25 // PaymentRequest for use in tests. | 25 // PaymentRequest for use in tests. |
| 26 class TestPaymentRequest : public PaymentRequest { | 26 class TestPaymentRequest : public PaymentRequest { |
| 27 public: | 27 public: |
| 28 // |personal_data_manager| should not be null and should outlive this object. | 28 // |personal_data_manager| should not be null and should outlive this object. |
| 29 TestPaymentRequest(const web::PaymentRequest& web_payment_request, | 29 TestPaymentRequest(const web::PaymentRequest& web_payment_request, |
| 30 autofill::PersonalDataManager* personal_data_manager) | 30 autofill::PersonalDataManager* personal_data_manager) |
| 31 : PaymentRequest(web_payment_request, personal_data_manager) {} | 31 : PaymentRequest(web_payment_request, personal_data_manager) {} |
| 32 | 32 |
| 33 ~TestPaymentRequest() override{}; | 33 ~TestPaymentRequest() override {} |
| 34 | 34 |
| 35 void SetRegionDataLoader(autofill::RegionDataLoader* region_data_loader) { | 35 void SetRegionDataLoader(autofill::RegionDataLoader* region_data_loader) { |
| 36 region_data_loader_ = region_data_loader; | 36 region_data_loader_ = region_data_loader; |
| 37 } | 37 } |
| 38 | 38 |
| 39 void SetProfileComparator( | 39 void SetProfileComparator( |
| 40 payments::PaymentsProfileComparator* profile_comparator) { | 40 payments::PaymentsProfileComparator* profile_comparator) { |
| 41 profile_comparator_ = profile_comparator; | 41 profile_comparator_ = profile_comparator; |
| 42 } | 42 } |
| 43 | 43 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 67 // Not owned and must outlive this object. | 67 // Not owned and must outlive this object. |
| 68 autofill::RegionDataLoader* region_data_loader_; | 68 autofill::RegionDataLoader* region_data_loader_; |
| 69 | 69 |
| 70 // Not owned and must outlive this object. | 70 // Not owned and must outlive this object. |
| 71 payments::PaymentsProfileComparator* profile_comparator_; | 71 payments::PaymentsProfileComparator* profile_comparator_; |
| 72 | 72 |
| 73 DISALLOW_COPY_AND_ASSIGN(TestPaymentRequest); | 73 DISALLOW_COPY_AND_ASSIGN(TestPaymentRequest); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 #endif // IOS_CHROME_BROWSER_PAYMENTS_TEST_PAYMENT_REQUEST_H_ | 76 #endif // IOS_CHROME_BROWSER_PAYMENTS_TEST_PAYMENT_REQUEST_H_ |
| OLD | NEW |