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

Unified Diff: ios/chrome/browser/ui/payments/payment_request_manager.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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/payments/payment_request_manager.mm
diff --git a/ios/chrome/browser/ui/payments/payment_request_manager.mm b/ios/chrome/browser/ui/payments/payment_request_manager.mm
index 73d6d0eb47b0a805e8ea42971bec42b2044367e5..1a5be16f4b5029f638ce60d45e299792c62e8de8 100644
--- a/ios/chrome/browser/ui/payments/payment_request_manager.mm
+++ b/ios/chrome/browser/ui/payments/payment_request_manager.mm
@@ -24,8 +24,10 @@
#include "components/payments/core/address_normalization_manager.h"
#include "components/payments/core/can_make_payment_query.h"
#include "components/payments/core/payment_address.h"
+#include "components/payments/core/payment_prefs.h"
#include "components/payments/core/payment_request_base_delegate.h"
#include "components/payments/core/payment_request_data_util.h"
+#include "components/prefs/pref_service.h"
#include "ios/chrome/browser/application_context.h"
#include "ios/chrome/browser/autofill/personal_data_manager_factory.h"
#include "ios/chrome/browser/autofill/validation_rules_storage_factory.h"
@@ -778,6 +780,9 @@ struct PendingPaymentResponse {
_paymentRequest->RecordUseStats();
+ _paymentRequest->GetPrefService()->SetBoolean(
+ payments::kPaymentsFirstTransactionCompleted, true);
+
[_paymentRequestJsManager
resolveRequestPromiseWithPaymentResponse:paymentResponse
completionHandler:nil];

Powered by Google App Engine
This is Rietveld 408576698