Commit 6164d2ca authored by Ewann's avatar Ewann Committed by Commit Bot

[iOS][Chrome-Guard] Adds a footer to cookies settings

This CL adds a footer to cookies settings, explaining to the user
how to apply the new cookies setting.

Bug: 1063824
Change-Id: Ib683b385115f30f6b46eceb7a30741ca0a0a99d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2248563
Commit-Queue: Ewann Pellé <ewannpv@chromium.org>
Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#779764}
parent 1ed4cc1e
...@@ -1224,6 +1224,9 @@ While in incognito, sites can't use cookies to see your browsing activity across ...@@ -1224,6 +1224,9 @@ While in incognito, sites can't use cookies to see your browsing activity across
<message name="IDS_IOS_OPTIONS_PRIVACY_COOKIES_BLOCK_THIRD_PARTY_COOKIES_TITLE" desc="Option title to block third party cookies"> <message name="IDS_IOS_OPTIONS_PRIVACY_COOKIES_BLOCK_THIRD_PARTY_COOKIES_TITLE" desc="Option title to block third party cookies">
Block Third-Party Cookies Block Third-Party Cookies
</message> </message>
<message name="IDS_IOS_OPTIONS_PRIVACY_COOKIES_FOOTER" desc="Footer description explaining how to apply the new cookies setting">
Your cookies setting applies to all tabs. To apply a new setting to an open tab, reload the tab.
</message>
<message name="IDS_IOS_OPTIONS_PRIVACY_GOOGLE_SERVICES_FOOTER" desc="Footer to invite the user to open the Sync and Google Services settings."> <message name="IDS_IOS_OPTIONS_PRIVACY_GOOGLE_SERVICES_FOOTER" desc="Footer to invite the user to open the Sync and Google Services settings.">
For more settings that relate to privacy, security, and data collection, see <ph name="BEGIN_LINK">BEGIN_LINK</ph>Sync and Google Services<ph name="END_LINK">END_LINK</ph>. For more settings that relate to privacy, security, and data collection, see <ph name="BEGIN_LINK">BEGIN_LINK</ph>Sync and Google Services<ph name="END_LINK">END_LINK</ph>.
</message> </message>
......
27898f72ae64a660f82db16f46cbe8aefe7329ab
\ No newline at end of file
...@@ -10,10 +10,8 @@ ...@@ -10,10 +10,8 @@
#import "ios/chrome/browser/ui/settings/settings_navigation_controller.h" #import "ios/chrome/browser/ui/settings/settings_navigation_controller.h"
#import "ios/chrome/browser/ui/table_view/cells/table_view_info_button_cell.h" #import "ios/chrome/browser/ui/table_view/cells/table_view_info_button_cell.h"
#import "ios/chrome/browser/ui/table_view/cells/table_view_info_button_item.h" #import "ios/chrome/browser/ui/table_view/cells/table_view_info_button_item.h"
#import "ios/chrome/browser/ui/table_view/cells/table_view_text_header_footer_item.h"
#import "ios/chrome/browser/ui/table_view/cells/table_view_text_item.h" #import "ios/chrome/browser/ui/table_view/cells/table_view_text_item.h"
#import "ios/chrome/browser/ui/table_view/cells/table_view_text_link_item.h" #import "ios/chrome/browser/ui/table_view/cells/table_view_text_link_item.h"
#import "ios/chrome/browser/ui/table_view/cells/table_view_url_item.h"
#import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" #import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h"
#include "ios/chrome/browser/ui/ui_feature_flags.h" #include "ios/chrome/browser/ui/ui_feature_flags.h"
#import "ios/chrome/common/ui/colors/UIColor+cr_semantic_colors.h" #import "ios/chrome/common/ui/colors/UIColor+cr_semantic_colors.h"
...@@ -33,6 +31,7 @@ typedef NS_ENUM(NSInteger, ItemType) { ...@@ -33,6 +31,7 @@ typedef NS_ENUM(NSInteger, ItemType) {
ItemTypeBlockThirdPartyCookiesIncognito, ItemTypeBlockThirdPartyCookiesIncognito,
ItemTypeBlockThirdPartyCookies, ItemTypeBlockThirdPartyCookies,
ItemTypeBlockAllCookies, ItemTypeBlockAllCookies,
ItemTypeCookiesDescriptionFooter,
}; };
typedef NS_ENUM(NSInteger, SectionIdentifier) { typedef NS_ENUM(NSInteger, SectionIdentifier) {
...@@ -130,6 +129,14 @@ typedef NS_ENUM(NSInteger, SectionIdentifier) { ...@@ -130,6 +129,14 @@ typedef NS_ENUM(NSInteger, SectionIdentifier) {
blockAllCookies.iconImageName = @"accessory_no_checkmark"; blockAllCookies.iconImageName = @"accessory_no_checkmark";
[self.tableViewModel addItem:blockAllCookies [self.tableViewModel addItem:blockAllCookies
toSectionWithIdentifier:SectionIdentifierCookiesContent]; toSectionWithIdentifier:SectionIdentifierCookiesContent];
TableViewTextLinkItem* cookiesDescriptionFooter =
[[TableViewTextLinkItem alloc]
initWithType:ItemTypeCookiesDescriptionFooter];
cookiesDescriptionFooter.text =
l10n_util::GetNSString(IDS_IOS_OPTIONS_PRIVACY_COOKIES_FOOTER);
[self.tableViewModel addItem:cookiesDescriptionFooter
toSectionWithIdentifier:SectionIdentifierCookiesContent];
} }
#pragma mark - Private #pragma mark - Private
...@@ -238,6 +245,10 @@ typedef NS_ENUM(NSInteger, SectionIdentifier) { ...@@ -238,6 +245,10 @@ typedef NS_ENUM(NSInteger, SectionIdentifier) {
cellForRowAtIndexPath:(NSIndexPath*)indexPath { cellForRowAtIndexPath:(NSIndexPath*)indexPath {
UITableViewCell* cell = [super tableView:tableView UITableViewCell* cell = [super tableView:tableView
cellForRowAtIndexPath:indexPath]; cellForRowAtIndexPath:indexPath];
if ([self.tableViewModel itemTypeForIndexPath:indexPath] ==
ItemTypeCookiesDescriptionFooter)
return cell;
TableViewInfoButtonCell* managedCell = TableViewInfoButtonCell* managedCell =
base::mac::ObjCCastStrict<TableViewInfoButtonCell>(cell); base::mac::ObjCCastStrict<TableViewInfoButtonCell>(cell);
[managedCell.trailingButton addTarget:self [managedCell.trailingButton addTarget:self
......
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