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

Unified 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, 8 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 | « components/payments/core/test_payment_request_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/payments/core/test_payment_request_delegate.cc
diff --git a/components/payments/core/test_payment_request_delegate.cc b/components/payments/core/test_payment_request_delegate.cc
new file mode 100644
index 0000000000000000000000000000000000000000..35daf8b6f4f26969899391e7cf9c4785fb96dd8c
--- /dev/null
+++ b/components/payments/core/test_payment_request_delegate.cc
@@ -0,0 +1,60 @@
+// 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.
+
+#include "components/payments/core/test_payment_request_delegate.h"
+
+#include "base/strings/utf_string_conversions.h"
+
+namespace payments {
+
+TestPaymentRequestDelegate::TestPaymentRequestDelegate(
+ autofill::PersonalDataManager* personal_data_manager)
+ : personal_data_manager_(personal_data_manager),
+ locale_("en-US"),
+ last_committed_url_("https://shop.com") {}
+
+TestPaymentRequestDelegate::~TestPaymentRequestDelegate() {}
+
+autofill::PersonalDataManager*
+TestPaymentRequestDelegate::GetPersonalDataManager() {
+ return personal_data_manager_;
+}
+
+const std::string& TestPaymentRequestDelegate::GetApplicationLocale() const {
+ return locale_;
+}
+
+bool TestPaymentRequestDelegate::IsIncognito() const {
+ return false;
+}
+
+bool TestPaymentRequestDelegate::IsSslCertificateValid() {
+ return true;
+}
+
+const GURL& TestPaymentRequestDelegate::GetLastCommittedURL() const {
+ return last_committed_url_;
+}
+
+void TestPaymentRequestDelegate::DoFullCardRequest(
+ const autofill::CreditCard& credit_card,
+ base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate>
+ result_delegate) {
+ result_delegate->OnFullCardRequestSucceeded(credit_card,
+ base::ASCIIToUTF16("123"));
+}
+
+AddressNormalizer* TestPaymentRequestDelegate::GetAddressNormalizer() {
+ return &address_normalizer_;
+}
+
+TestAddressNormalizer* TestPaymentRequestDelegate::GetTestAddressNormalizer() {
+ return &address_normalizer_;
+}
+
+autofill::RegionDataLoader* TestPaymentRequestDelegate::GetRegionDataLoader() {
+ return nullptr;
+}
+
+} // namespace payments
« 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