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

Unified Diff: ios/chrome/browser/ui/settings/save_passwords_collection_view_controller.mm

Issue 2768933005: Use CollectionViewTextItem instead of a cast (Closed)
Patch Set: Remove MDFRoboto 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/settings/save_passwords_collection_view_controller.mm
diff --git a/ios/chrome/browser/ui/settings/save_passwords_collection_view_controller.mm b/ios/chrome/browser/ui/settings/save_passwords_collection_view_controller.mm
index 3f27c1d2e10d259eefa0419257ce9f851b670334..200802df22d43a84d64ecfe29a68c315f5f8b09f 100644
--- a/ios/chrome/browser/ui/settings/save_passwords_collection_view_controller.mm
+++ b/ios/chrome/browser/ui/settings/save_passwords_collection_view_controller.mm
@@ -234,6 +234,7 @@ void SavePasswordsConsumer::OnGetPasswordStoreResults(
initWithType:ItemTypeHeader] autorelease];
headerItem.text =
l10n_util::GetNSString(IDS_PASSWORD_MANAGER_SHOW_PASSWORDS_TAB_TITLE);
+ headerItem.textColor = [[MDCPalette greyPalette] tint500];
[model setHeader:headerItem
forSectionWithIdentifier:SectionIdentifierSavedPasswords];
for (const auto& form : savedForms_) {
@@ -247,6 +248,7 @@ void SavePasswordsConsumer::OnGetPasswordStoreResults(
initWithType:ItemTypeHeader] autorelease];
headerItem.text =
l10n_util::GetNSString(IDS_PASSWORD_MANAGER_EXCEPTIONS_TAB_TITLE);
+ headerItem.textColor = [[MDCPalette greyPalette] tint500];
[model setHeader:headerItem
forSectionWithIdentifier:SectionIdentifierBlacklist];
for (const auto& form : blacklistedForms_) {
@@ -384,20 +386,6 @@ void SavePasswordsConsumer::OnGetPasswordStoreResults(
return cell;
}
-- (UICollectionReusableView*)collectionView:(UICollectionView*)collectionView
- viewForSupplementaryElementOfKind:(NSString*)kind
- atIndexPath:(NSIndexPath*)indexPath {
- UICollectionReusableView* view = [super collectionView:collectionView
- viewForSupplementaryElementOfKind:kind
- atIndexPath:indexPath];
- MDCCollectionViewTextCell* textCell =
- base::mac::ObjCCast<MDCCollectionViewTextCell>(view);
- if (textCell) {
- textCell.textLabel.textColor = [[MDCPalette greyPalette] tint500];
- }
- return view;
-};
-
#pragma mark - BooleanObserver
- (void)booleanDidChange:(id<ObservableBoolean>)observableBoolean {

Powered by Google App Engine
This is Rietveld 408576698