Commit 3457db5d authored by Jérôme Lebel's avatar Jérôme Lebel Committed by Commit Bot

[iOS] Adding title for AccountSignInItem

Setting "Sign in to Chrome" as the AccountSignInItem title.
Related to crrev.com/c/1392962

Change-Id: I2b2eef3320dd1455e0b1db6a564699ee9e0596a1
Reviewed-on: https://chromium-review.googlesource.com/c/1396125
Commit-Queue: Jérôme Lebel <jlebel@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619994}
parent 4b82a65d
......@@ -10,9 +10,7 @@
// Item to display a non-personnalized sign-in cell.
@interface AccountSignInItem : TableViewItem
// Title for the sign-in cell (required).
@property(nonatomic, strong) NSString* text;
// Subtitle for the sign-in cell.
// Subtitle for the sign-in cell (optional).
@property(nonatomic, strong) NSString* detailText;
@end
......
......@@ -6,8 +6,10 @@
#import "ios/chrome/browser/ui/settings/cells/settings_image_detail_text_cell.h"
#import "ios/chrome/browser/ui/util/uikit_ui_util.h"
#include "ios/chrome/grit/ios_chromium_strings.h"
#include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
#include "ios/public/provider/chrome/browser/signin/signin_resources_provider.h"
#include "ui/base/l10n/l10n_util.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
......@@ -36,8 +38,8 @@ const CGFloat kAccountProfilePhotoDimension = 40.0f;
- (void)configureCell:(SettingsImageDetailTextCell*)cell
withStyler:(ChromeTableViewStyler*)styler {
[super configureCell:cell withStyler:styler];
DCHECK(self.text);
cell.textLabel.text = self.text;
cell.textLabel.text =
l10n_util::GetNSString(IDS_IOS_SIGN_IN_TO_CHROME_SETTING_TITLE);
cell.detailTextLabel.text = self.detailText;
cell.image = CircularImageFromImage(ios::GetChromeBrowserProvider()
->GetSigninResourcesProvider()
......
......@@ -185,7 +185,6 @@ typedef NS_ENUM(NSInteger, ItemType) {
AccountSignInItem* accountSignInItem =
[[AccountSignInItem alloc] initWithType:ItemTypeAccountSignInItem];
accountSignInItem.text = @"Account sign-in cell";
accountSignInItem.detailText = @"Get cool stuff on all your devices";
[model addItem:accountSignInItem
toSectionWithIdentifier:SectionIdentifierSettings];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment