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

Unified Diff: ios/chrome/browser/ui/payments/payment_request_coordinator.mm

Issue 2955263002: [Payment Request] Moves some of PR coordinator logic to PR manager (Closed)
Patch Set: Created 3 years, 6 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
Index: ios/chrome/browser/ui/payments/payment_request_coordinator.mm
diff --git a/ios/chrome/browser/ui/payments/payment_request_coordinator.mm b/ios/chrome/browser/ui/payments/payment_request_coordinator.mm
index b0ca87fb9546e6410ed836c9ec4037f4175102f5..16b0de1b170a9c97cf7d8bd659012099aa9d8dd9 100644
--- a/ios/chrome/browser/ui/payments/payment_request_coordinator.mm
+++ b/ios/chrome/browser/ui/payments/payment_request_coordinator.mm
@@ -8,7 +8,6 @@
#include "components/autofill/core/browser/autofill_profile.h"
#include "components/autofill/core/browser/credit_card.h"
#include "components/payments/core/payment_address.h"
-#include "components/payments/core/payment_request_data_util.h"
#include "components/strings/grit/components_strings.h"
#include "ios/chrome/browser/application_context.h"
#include "ios/chrome/browser/payments/payment_request.h"
@@ -21,8 +20,6 @@
#endif
namespace {
-using ::payments::data_util::GetPaymentAddressFromAutofillProfile;
-
// Time interval before updating the Payment Summary item in seconds.
const NSTimeInterval kUpdatePaymentSummaryItemIntervalSeconds = 10.0;
} // namespace
@@ -373,9 +370,8 @@ contactInfoSelectionCoordinator:(ContactInfoSelectionCoordinator*)coordinator
(autofill::AutofillProfile*)shippingAddress {
_pendingShippingAddress = shippingAddress;
DCHECK(shippingAddress);
- payments::PaymentAddress address = GetPaymentAddressFromAutofillProfile(
- *shippingAddress, GetApplicationContext()->GetApplicationLocale());
- [_delegate paymentRequestCoordinator:self didSelectShippingAddress:address];
+ [_delegate paymentRequestCoordinator:self
+ didSelectShippingAddress:*shippingAddress];
}
- (void)shippingAddressSelectionCoordinatorDidReturn:
@@ -391,11 +387,7 @@ contactInfoSelectionCoordinator:(ContactInfoSelectionCoordinator*)coordinator
didFinishEditingAddress:(autofill::AutofillProfile*)address {
_pendingShippingAddress = address;
DCHECK(address);
- payments::PaymentAddress shippingAddress =
- GetPaymentAddressFromAutofillProfile(
- *address, GetApplicationContext()->GetApplicationLocale());
- [_delegate paymentRequestCoordinator:self
- didSelectShippingAddress:shippingAddress];
+ [_delegate paymentRequestCoordinator:self didSelectShippingAddress:*address];
}
- (void)addressEditCoordinatorDidCancel:(AddressEditCoordinator*)coordinator {

Powered by Google App Engine
This is Rietveld 408576698