Index: ios/chrome/browser/payments/payment_request.h |
diff --git a/ios/chrome/browser/payments/payment_request.h b/ios/chrome/browser/payments/payment_request.h |
index bd1b74a662ed341e970da4bf7f1cce351b84b355..d9d16f2d7f9b04f94d59a8f0e431f01ad44b4655 100644 |
--- a/ios/chrome/browser/payments/payment_request.h |
+++ b/ios/chrome/browser/payments/payment_request.h |
@@ -14,6 +14,7 @@ |
#include "base/macros.h" |
#include "base/memory/weak_ptr.h" |
#include "components/autofill/core/browser/credit_card.h" |
+#include "components/payments/core/journey_logger.h" |
#include "components/payments/core/payment_options_provider.h" |
#include "components/payments/core/payment_request_base_delegate.h" |
#include "components/payments/core/payments_profile_comparator.h" |
@@ -37,6 +38,10 @@ namespace ios { |
class ChromeBrowserState; |
} // namepsace ios |
+namespace web { |
+class WebState; |
+} // namespace web |
+ |
// A protocol implementd by any UI classes that the PaymentRequest object |
// needs to communicate with in order to perform certain actions such as |
// initiating UI to request full card details for payment. |
@@ -63,6 +68,7 @@ class PaymentRequest : public PaymentOptionsProvider, |
// |personal_data_manager| should not be null and should outlive this object. |
PaymentRequest(const web::PaymentRequest& web_payment_request, |
ios::ChromeBrowserState* browser_state_, |
please use gerrit instead
2017/07/06 14:52:24
Remove the trailing _ from |browser_state_| on thi
Moe
2017/07/07 02:24:53
Done.
|
+ web::WebState* web_state, |
autofill::PersonalDataManager* personal_data_manager, |
id<PaymentRequestUIDelegate> payment_request_ui_delegate); |
~PaymentRequest() override; |
@@ -93,6 +99,9 @@ class PaymentRequest : public PaymentOptionsProvider, |
return web_payment_request_.details; |
} |
+ // Returns the JourneyLogger for this instance. |
+ const JourneyLogger& journey_logger() const { return journey_logger_; } |
+ |
// Updates the payment details of the |web_payment_request_|. It also updates |
// the cached references to the shipping options in |web_payment_request_| as |
// well as the reference to the selected shipping option. |
@@ -244,6 +253,9 @@ class PaymentRequest : public PaymentOptionsProvider, |
ios::ChromeBrowserState* browser_state_; |
// Never null and outlives this object. |
+ web::WebState* web_state_; |
+ |
+ // Never null and outlives this object. |
autofill::PersonalDataManager* personal_data_manager_; |
// The PaymentRequestUIDelegate as provided by the UI object that originally |
@@ -299,6 +311,9 @@ class PaymentRequest : public PaymentOptionsProvider, |
PaymentsProfileComparator profile_comparator_; |
+ // Keeps track of different stats during the lifetime of this object. |
+ JourneyLogger journey_logger_; |
+ |
DISALLOW_COPY_AND_ASSIGN(PaymentRequest); |
}; |