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

Unified Diff: ios/chrome/browser/payments/test_payment_request.h

Issue 2893353002: [Payment Request] Address edit view controller (Part 2) (Closed)
Patch Set: Initial 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/payments/payment_request.h ('k') | ios/chrome/browser/payments/test_payment_request.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/payments/test_payment_request.h
diff --git a/ios/chrome/browser/payments/test_payment_request.h b/ios/chrome/browser/payments/test_payment_request.h
new file mode 100644
index 0000000000000000000000000000000000000000..025d38eba03594010d818f7dbf68c541a1a5a848
--- /dev/null
+++ b/ios/chrome/browser/payments/test_payment_request.h
@@ -0,0 +1,44 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CHROME_BROWSER_PAYMENTS_TEST_PAYMENT_REQUEST_H_
+#define IOS_CHROME_BROWSER_PAYMENTS_TEST_PAYMENT_REQUEST_H_
+
+#include "base/macros.h"
+#include "ios/chrome/browser/payments/payment_request.h"
+
+namespace autofill {
+class PersonalDataManager;
+class RegionDataLoader;
+} // namespace autofill
+
+namespace web {
+class PaymentRequest;
+} // namespace web
+
+// PaymentRequest for use in tests.
+class TestPaymentRequest : public PaymentRequest {
+ public:
+ // |personal_data_manager| should not be null and should outlive this object.
+ TestPaymentRequest(const web::PaymentRequest& web_payment_request,
+ autofill::PersonalDataManager* personal_data_manager)
+ : PaymentRequest(web_payment_request, personal_data_manager) {}
+
+ ~TestPaymentRequest() override{};
+
+ void SetRegionDataLoader(autofill::RegionDataLoader* region_data_loader) {
+ region_data_loader_ = region_data_loader;
+ }
+
+ // PaymentRequest
+ autofill::RegionDataLoader* GetRegionDataLoader() override;
+
+ private:
+ // Not owned and must outlive this object.
+ autofill::RegionDataLoader* region_data_loader_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestPaymentRequest);
+};
+
+#endif // IOS_CHROME_BROWSER_PAYMENTS_TEST_PAYMENT_REQUEST_H_
« no previous file with comments | « ios/chrome/browser/payments/payment_request.h ('k') | ios/chrome/browser/payments/test_payment_request.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698