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

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

Issue 2721553004: Remove auto raw pointer deduction from non-linux specific code. (Closed)
Patch Set: rebase Created 3 years, 9 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_method_selection_view_controller.h" 5 #import "ios/chrome/browser/payments/payment_method_selection_view_controller.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "base/strings/sys_string_conversions.h" 8 #include "base/strings/sys_string_conversions.h"
9 #include "components/autofill/core/browser/autofill_data_util.h" 9 #include "components/autofill/core/browser/autofill_data_util.h"
10 #include "components/autofill/core/browser/credit_card.h" 10 #include "components/autofill/core/browser/credit_card.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 #pragma mark - CollectionViewController methods 90 #pragma mark - CollectionViewController methods
91 91
92 - (void)loadModel { 92 - (void)loadModel {
93 [super loadModel]; 93 [super loadModel];
94 CollectionViewModel* model = self.collectionViewModel; 94 CollectionViewModel* model = self.collectionViewModel;
95 _selectedItem = nil; 95 _selectedItem = nil;
96 96
97 [model addSectionWithIdentifier:SectionIdentifierPayment]; 97 [model addSectionWithIdentifier:SectionIdentifierPayment];
98 98
99 for (const auto& paymentMethod : _paymentRequest->credit_cards()) { 99 for (const auto* paymentMethod : _paymentRequest->credit_cards()) {
100 PaymentMethodItem* paymentMethodItem = 100 PaymentMethodItem* paymentMethodItem =
101 [[PaymentMethodItem alloc] initWithType:ItemTypePaymentMethod]; 101 [[PaymentMethodItem alloc] initWithType:ItemTypePaymentMethod];
102 paymentMethodItem.accessibilityTraits |= UIAccessibilityTraitButton; 102 paymentMethodItem.accessibilityTraits |= UIAccessibilityTraitButton;
103 paymentMethodItem.methodID = 103 paymentMethodItem.methodID =
104 base::SysUTF16ToNSString(paymentMethod->TypeAndLastFourDigits()); 104 base::SysUTF16ToNSString(paymentMethod->TypeAndLastFourDigits());
105 paymentMethodItem.methodDetail = base::SysUTF16ToNSString( 105 paymentMethodItem.methodDetail = base::SysUTF16ToNSString(
106 paymentMethod->GetRawInfo(autofill::CREDIT_CARD_NAME_FULL)); 106 paymentMethod->GetRawInfo(autofill::CREDIT_CARD_NAME_FULL));
107 int methodTypeIconID = 107 int methodTypeIconID =
108 autofill::data_util::GetPaymentRequestData(paymentMethod->type()) 108 autofill::data_util::GetPaymentRequestData(paymentMethod->type())
109 .icon_resource_id; 109 .icon_resource_id;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 return [MDCCollectionViewCell 189 return [MDCCollectionViewCell
190 cr_preferredHeightForWidth:CGRectGetWidth(collectionView.bounds) 190 cr_preferredHeightForWidth:CGRectGetWidth(collectionView.bounds)
191 forItem:item]; 191 forItem:item];
192 default: 192 default:
193 NOTREACHED(); 193 NOTREACHED();
194 return MDCCellDefaultOneLineHeight; 194 return MDCCellDefaultOneLineHeight;
195 } 195 }
196 } 196 }
197 197
198 @end 198 @end
OLDNEW
« no previous file with comments | « ios/chrome/app/spotlight/bookmarks_spotlight_manager.mm ('k') | ios/chrome/browser/payments/payment_request.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698