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

Side by Side Diff: ios/chrome/browser/ui/payments/payment_request_manager.mm

Issue 2970233002: [Payment Request] Adds a JourneyLogger instance to the PaymentRequest (Closed)
Patch Set: Initial 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/chrome/browser/ui/payments/payment_request_manager.h" 5 #import "ios/chrome/browser/ui/payments/payment_request_manager.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/ios/block_types.h" 9 #include "base/ios/block_types.h"
10 #include "base/ios/ios_util.h" 10 #include "base/ios/ios_util.h"
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 } 403 }
404 404
405 // TODO(crbug.com/711419): make sure multiple PaymentRequests can be active 405 // TODO(crbug.com/711419): make sure multiple PaymentRequests can be active
406 // simultaneously. 406 // simultaneously.
407 if (_paymentRequest && 407 if (_paymentRequest &&
408 (_paymentRequest->web_payment_request() == webPaymentRequest)) { 408 (_paymentRequest->web_payment_request() == webPaymentRequest)) {
409 return YES; 409 return YES;
410 } 410 }
411 411
412 _paymentRequest = base::MakeUnique<payments::PaymentRequest>( 412 _paymentRequest = base::MakeUnique<payments::PaymentRequest>(
413 webPaymentRequest, _browserState, _personalDataManager, self); 413 webPaymentRequest, _browserState, _webState, _personalDataManager, self);
414 414
415 return YES; 415 return YES;
416 } 416 }
417 417
418 - (BOOL)handleRequestShow:(const base::DictionaryValue&)message { 418 - (BOOL)handleRequestShow:(const base::DictionaryValue&)message {
419 // TODO(crbug.com/602666): check that there's not already a pending request. 419 // TODO(crbug.com/602666): check that there's not already a pending request.
420 // TODO(crbug.com/602666): compare our supported payment types (i.e. autofill 420 // TODO(crbug.com/602666): compare our supported payment types (i.e. autofill
421 // credit card types) against the merchant supported types and return NO 421 // credit card types) against the merchant supported types and return NO
422 // if the intersection is empty. 422 // if the intersection is empty.
423 423
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 #pragma mark - CRWWebStateObserver methods 796 #pragma mark - CRWWebStateObserver methods
797 797
798 - (void)webState:(web::WebState*)webState 798 - (void)webState:(web::WebState*)webState
799 didCommitNavigationWithDetails: 799 didCommitNavigationWithDetails:
800 (const web::LoadCommittedDetails&)load_details { 800 (const web::LoadCommittedDetails&)load_details {
801 [self dismissUI]; 801 [self dismissUI];
802 [self enableCurrentWebState]; 802 [self enableCurrentWebState];
803 } 803 }
804 804
805 @end 805 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698