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

Unified Diff: ios/chrome/browser/payments/payment_request.mm

Issue 2970233002: [Payment Request] Adds a JourneyLogger instance to the PaymentRequest (Closed)
Patch Set: Addressed comments 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/payments/payment_request.mm
diff --git a/ios/chrome/browser/payments/payment_request.mm b/ios/chrome/browser/payments/payment_request.mm
index f3b5aba0c89c0a12e86efb1050a1a3cc293098f9..c4be009513a744130a7b01b85b5f9ae0be3a81fc 100644
--- a/ios/chrome/browser/payments/payment_request.mm
+++ b/ios/chrome/browser/payments/payment_request.mm
@@ -28,6 +28,7 @@
#import "ios/chrome/browser/payments/payment_request_util.h"
#include "ios/chrome/browser/signin/signin_manager_factory.h"
#include "ios/web/public/payments/payment_request.h"
+#include "ios/web/public/web_state/web_state.h"
#include "third_party/libaddressinput/chromium/chrome_metadata_source.h"
#include "third_party/libaddressinput/src/cpp/include/libaddressinput/source.h"
#include "third_party/libaddressinput/src/cpp/include/libaddressinput/storage.h"
@@ -56,10 +57,12 @@ namespace payments {
PaymentRequest::PaymentRequest(
const web::PaymentRequest& web_payment_request,
ios::ChromeBrowserState* browser_state,
+ web::WebState* web_state,
autofill::PersonalDataManager* personal_data_manager,
id<PaymentRequestUIDelegate> payment_request_ui_delegate)
: web_payment_request_(web_payment_request),
browser_state_(browser_state),
+ web_state_(web_state),
personal_data_manager_(personal_data_manager),
payment_request_ui_delegate_(payment_request_ui_delegate),
address_normalizer_(new AddressNormalizerImpl(
@@ -71,7 +74,8 @@ PaymentRequest::PaymentRequest(
selected_payment_method_(nullptr),
selected_shipping_option_(nullptr),
profile_comparator_(GetApplicationContext()->GetApplicationLocale(),
- *this) {
+ *this),
+ journey_logger_(IsIncognito(), GetLastCommittedURL(), GetUkmRecorder()) {
PopulateAvailableShippingOptions();
PopulateProfileCache();
PopulateAvailableProfiles();
@@ -129,8 +133,7 @@ bool PaymentRequest::IsSslCertificateValid() {
}
const GURL& PaymentRequest::GetLastCommittedURL() const {
- NOTREACHED() << "Implementation is never used";
- return GURL::EmptyGURL();
+ return web_state_->GetLastCommittedURL();
}
void PaymentRequest::DoFullCardRequest(
« no previous file with comments | « ios/chrome/browser/payments/payment_request.h ('k') | ios/chrome/browser/payments/payment_request_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698