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

Side by Side Diff: ios/chrome/browser/ui/settings/material_cell_catalog_view_controller.mm

Issue 2844463004: Rename card 'type' into 'issuer network.' (Closed)
Patch Set: read -> use Created 3 years, 7 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
« no previous file with comments | « ios/chrome/browser/ui/settings/autofill_credit_card_edit_collection_view_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/settings/material_cell_catalog_view_controller.h" 5 #import "ios/chrome/browser/ui/settings/material_cell_catalog_view_controller.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 #import "base/mac/foundation_util.h" 9 #import "base/mac/foundation_util.h"
10 #include "components/autofill/core/browser/autofill_data_util.h" 10 #include "components/autofill/core/browser/autofill_data_util.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 ItemTypeAutofillStorageSwitch, 93 ItemTypeAutofillStorageSwitch,
94 ItemTypeAccountControlDynamicHeight, 94 ItemTypeAccountControlDynamicHeight,
95 ItemTypeFooter, 95 ItemTypeFooter,
96 ItemTypeContentSuggestions, 96 ItemTypeContentSuggestions,
97 }; 97 };
98 98
99 // Image fixed horizontal size. 99 // Image fixed horizontal size.
100 const CGFloat kHorizontalImageFixedSize = 40; 100 const CGFloat kHorizontalImageFixedSize = 40;
101 101
102 // Credit Card icon size. 102 // Credit Card icon size.
103 const CGFloat kCardTypeIconDimension = 25.0; 103 const CGFloat kCardIssuerNetworkIconDimension = 25.0;
104 104
105 } // namespace 105 } // namespace
106 106
107 @implementation MaterialCellCatalogViewController 107 @implementation MaterialCellCatalogViewController
108 108
109 - (instancetype)init { 109 - (instancetype)init {
110 self = [super initWithStyle:CollectionViewControllerStyleAppBar]; 110 self = [super initWithStyle:CollectionViewControllerStyleAppBar];
111 if (self) { 111 if (self) {
112 [self loadModel]; 112 [self loadModel];
113 } 113 }
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 autofill::kMasterCard, 579 autofill::kMasterCard,
580 autofill::kAmericanExpressCard, 580 autofill::kAmericanExpressCard,
581 autofill::kJCBCard, 581 autofill::kJCBCard,
582 autofill::kDinersCard, 582 autofill::kDinersCard,
583 autofill::kDiscoverCard}; 583 autofill::kDiscoverCard};
584 for (const std::string& cardType : cardTypes) { 584 for (const std::string& cardType : cardTypes) {
585 autofill::data_util::PaymentRequestData data = 585 autofill::data_util::PaymentRequestData data =
586 autofill::data_util::GetPaymentRequestData(cardType); 586 autofill::data_util::GetPaymentRequestData(cardType);
587 UIImage* cardTypeIcon = 587 UIImage* cardTypeIcon =
588 ResizeImage(NativeImage(data.icon_resource_id), 588 ResizeImage(NativeImage(data.icon_resource_id),
589 CGSizeMake(kCardTypeIconDimension, kCardTypeIconDimension), 589 CGSizeMake(kCardIssuerNetworkIconDimension,
590 kCardIssuerNetworkIconDimension),
590 ProjectionMode::kAspectFillNoClipping); 591 ProjectionMode::kAspectFillNoClipping);
591 [cardTypeIcons addObject:cardTypeIcon]; 592 [cardTypeIcons addObject:cardTypeIcon];
592 } 593 }
593 item.methodTypeIcons = cardTypeIcons; 594 item.methodTypeIcons = cardTypeIcons;
594 return item; 595 return item;
595 } 596 }
596 597
597 - (CollectionViewItem*)autofillItemWithMainAndTrailingText { 598 - (CollectionViewItem*)autofillItemWithMainAndTrailingText {
598 AutofillDataItem* item = 599 AutofillDataItem* item =
599 [[AutofillDataItem alloc] initWithType:ItemTypeAutofillDynamicHeight]; 600 [[AutofillDataItem alloc] initWithType:ItemTypeAutofillDynamicHeight];
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 - (ContentSuggestionsFooterItem*)contentSuggestionsFooterItem { 741 - (ContentSuggestionsFooterItem*)contentSuggestionsFooterItem {
741 ContentSuggestionsFooterItem* footerItem = 742 ContentSuggestionsFooterItem* footerItem =
742 [[ContentSuggestionsFooterItem alloc] 743 [[ContentSuggestionsFooterItem alloc]
743 initWithType:ItemTypeContentSuggestions 744 initWithType:ItemTypeContentSuggestions
744 title:@"Footer title" 745 title:@"Footer title"
745 block:nil]; 746 block:nil];
746 return footerItem; 747 return footerItem;
747 } 748 }
748 749
749 @end 750 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/settings/autofill_credit_card_edit_collection_view_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698