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

Side by Side Diff: ios/chrome/browser/payments/payment_request_view_controller.mm

Issue 2804853002: Cancels payment request when Settings is tapped, and opens the Autofill settings page. (Closed)
Patch Set: Rebase and Addresses comments from mahmadi@. Created 3 years, 8 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/payments/payment_request_view_controller.h" 5 #import "ios/chrome/browser/payments/payment_request_view_controller.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 8
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 DCHECK(profile); 494 DCHECK(profile);
495 item.name = GetNameLabelFromAutofillProfile(*profile); 495 item.name = GetNameLabelFromAutofillProfile(*profile);
496 item.phoneNumber = GetPhoneNumberLabelFromAutofillProfile(*profile); 496 item.phoneNumber = GetPhoneNumberLabelFromAutofillProfile(*profile);
497 item.email = GetEmailLabelFromAutofillProfile(*profile); 497 item.email = GetEmailLabelFromAutofillProfile(*profile);
498 } 498 }
499 499
500 #pragma mark - CollectionViewFooterLinkDelegate 500 #pragma mark - CollectionViewFooterLinkDelegate
501 501
502 - (void)cell:(CollectionViewFooterCell*)cell didTapLinkURL:(GURL)url { 502 - (void)cell:(CollectionViewFooterCell*)cell didTapLinkURL:(GURL)url {
503 DCHECK_EQ(url, GURL(kSettingsURL)) << "Unknown URL tapped"; 503 DCHECK_EQ(url, GURL(kSettingsURL)) << "Unknown URL tapped";
504 NOTIMPLEMENTED(); // TODO(macourteau): take the user to the right place. 504 [_delegate paymentRequestViewControllerDidSelectSettings:self];
505 } 505 }
506 506
507 #pragma mark UICollectionViewDataSource 507 #pragma mark UICollectionViewDataSource
508 508
509 - (UICollectionViewCell*)collectionView:(UICollectionView*)collectionView 509 - (UICollectionViewCell*)collectionView:(UICollectionView*)collectionView
510 cellForItemAtIndexPath:(nonnull NSIndexPath*)indexPath { 510 cellForItemAtIndexPath:(nonnull NSIndexPath*)indexPath {
511 UICollectionViewCell* cell = 511 UICollectionViewCell* cell =
512 [super collectionView:collectionView cellForItemAtIndexPath:indexPath]; 512 [super collectionView:collectionView cellForItemAtIndexPath:indexPath];
513 513
514 NSInteger itemType = 514 NSInteger itemType =
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 618
619 - (BOOL)collectionView:(UICollectionView*)collectionView 619 - (BOOL)collectionView:(UICollectionView*)collectionView
620 shouldHideItemBackgroundAtIndexPath:(NSIndexPath*)indexPath { 620 shouldHideItemBackgroundAtIndexPath:(NSIndexPath*)indexPath {
621 // No background on the footer text item. 621 // No background on the footer text item.
622 NSInteger sectionIdentifier = 622 NSInteger sectionIdentifier =
623 [self.collectionViewModel sectionIdentifierForSection:indexPath.section]; 623 [self.collectionViewModel sectionIdentifierForSection:indexPath.section];
624 return sectionIdentifier == SectionIdentifierFooter ? YES : NO; 624 return sectionIdentifier == SectionIdentifierFooter ? YES : NO;
625 } 625 }
626 626
627 @end 627 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698