Commit 8e1b58d2 authored by Ewann's avatar Ewann Committed by Commit Bot

[iOS][Chrome-Guard] Merges chrome guard's flags.

This CL merges /#page-info-refactoring with /#improved-cookie-controls.

Bug: 1063824
Change-Id: If3578cd4413a0e171ce59932608913ecf3f6469f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2247735Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#779368}
parent 7aba7946
......@@ -3542,11 +3542,6 @@
"owners": [ "jds" ],
"expiry_milestone": 90
},
{
"name": "page-info-refactoring",
"owners": [ "ewannpv", "gambard" ],
"expiry_milestone": 88
},
{
"name": "page-info-version-2",
"owners": [ "eokoyomon", "dullweber" ],
......
......@@ -51,7 +51,6 @@ source_set("flags") {
"//ios/chrome/browser/ui/download:features",
"//ios/chrome/browser/ui/fullscreen:feature_flags",
"//ios/chrome/browser/ui/infobars:feature_flags",
"//ios/chrome/browser/ui/page_info:features",
"//ios/chrome/browser/ui/settings/autofill:feature_flags",
"//ios/chrome/browser/ui/table_view:feature_flags",
"//ios/chrome/browser/ui/toolbar/public:feature_flags",
......
......@@ -63,7 +63,6 @@
#import "ios/chrome/browser/ui/download/features.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_features.h"
#import "ios/chrome/browser/ui/infobars/infobar_feature.h"
#import "ios/chrome/browser/ui/page_info/features.h"
#include "ios/chrome/browser/ui/settings/autofill/features.h"
#import "ios/chrome/browser/ui/table_view/feature_flags.h"
#import "ios/chrome/browser/ui/toolbar/public/features.h"
......@@ -538,9 +537,6 @@ const flags_ui::FeatureEntry kFeatureEntries[] = {
flag_descriptions::kImprovedCookieControlsDescription,
flag_descriptions::kImprovedCookieControlsDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(content_settings::kImprovedCookieControls)},
{"page-info-refactoring", flag_descriptions::kPageInfoRefactoringName,
flag_descriptions::kPageInfoRefactoringDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kPageInfoRefactoring)},
{"contained-browser-bvc", flag_descriptions::kContainedBVCName,
flag_descriptions::kContainedBVCDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kContainedBVC)},
......
......@@ -375,10 +375,6 @@ const char kPasswordCheckName[] = "Bulk Password Check";
const char kPasswordCheckDescription[] =
"Enables the Bulk Password Check feature for signed-in users.";
const char kPageInfoRefactoringName[] = "New design of the page info";
const char kPageInfoRefactoringDescription[] =
"Uses the new design for the page security info.";
#if defined(__IPHONE_13_4)
const char kPointerSupportName[] = "Enables pointer support on tablets";
const char kPointerSupportDescription[] =
......
......@@ -324,10 +324,6 @@ extern const char kImprovedCookieControlsDescription[];
extern const char kPasswordCheckName[];
extern const char kPasswordCheckDescription[];
// Title and description for the flag to enable the new design of the page info.
extern const char kPageInfoRefactoringName[];
extern const char kPageInfoRefactoringDescription[];
#if defined(__IPHONE_13_4)
// Title and description for the flag to enable pointer support on tablets.
extern const char kPointerSupportName[];
......
......@@ -117,7 +117,6 @@ source_set("browser_view") {
"//ios/chrome/browser/ui/overlays",
"//ios/chrome/browser/ui/overscroll_actions",
"//ios/chrome/browser/ui/page_info:coordinator",
"//ios/chrome/browser/ui/page_info:features",
"//ios/chrome/browser/ui/page_info/requirements",
"//ios/chrome/browser/ui/passwords",
"//ios/chrome/browser/ui/popup_menu",
......
......@@ -8,6 +8,7 @@
#include "base/scoped_observer.h"
#include "base/strings/sys_string_conversions.h"
#import "components/content_settings/core/common/features.h"
#import "ios/chrome/browser/app_launcher/app_launcher_abuse_detector.h"
#import "ios/chrome/browser/app_launcher/app_launcher_tab_helper.h"
#import "ios/chrome/browser/autofill/autofill_tab_helper.h"
......@@ -51,7 +52,6 @@
#import "ios/chrome/browser/ui/infobars/infobar_feature.h"
#import "ios/chrome/browser/ui/open_in/open_in_mediator.h"
#import "ios/chrome/browser/ui/overlays/overlay_container_coordinator.h"
#import "ios/chrome/browser/ui/page_info/features.h"
#import "ios/chrome/browser/ui/page_info/page_info_coordinator.h"
#import "ios/chrome/browser/ui/page_info/page_info_legacy_coordinator.h"
#import "ios/chrome/browser/ui/passwords/password_breach_coordinator.h"
......@@ -721,7 +721,8 @@
}
- (void)showPageInfo {
DCHECK(base::FeatureList::IsEnabled(kPageInfoRefactoring));
DCHECK(
base::FeatureList::IsEnabled(content_settings::kImprovedCookieControls));
PageInfoCoordinator* pageInfoCoordinator = [[PageInfoCoordinator alloc]
initWithBaseViewController:self.viewController
browser:self.browser];
......
......@@ -107,7 +107,6 @@ source_set("ntp_internal") {
"//ios/chrome/browser/ui/content_suggestions/cells",
"//ios/chrome/browser/ui/favicon",
"//ios/chrome/browser/ui/overscroll_actions",
"//ios/chrome/browser/ui/page_info:features",
"//ios/chrome/browser/ui/settings/cells",
"//ios/chrome/browser/ui/toolbar/buttons",
"//ios/chrome/browser/ui/toolbar/public",
......
......@@ -10,7 +10,6 @@
#include "components/strings/grit/components_strings.h"
#include "ios/chrome/browser/application_context.h"
#import "ios/chrome/browser/ui/ntp/incognito_cookies_view.h"
#import "ios/chrome/browser/ui/page_info/features.h"
#import "ios/chrome/browser/ui/toolbar/public/toolbar_constants.h"
#import "ios/chrome/browser/ui/toolbar/public/toolbar_utils.h"
#include "ios/chrome/browser/ui/ui_feature_flags.h"
......
......@@ -31,7 +31,6 @@ source_set("page_info") {
"//ios/chrome/browser/ui:feature_flags",
"//ios/chrome/browser/ui/commands",
"//ios/chrome/browser/ui/fancy_ui",
"//ios/chrome/browser/ui/page_info:features",
"//ios/chrome/browser/ui/page_info/requirements",
"//ios/chrome/browser/ui/popup_menu",
"//ios/chrome/browser/ui/settings/cells",
......@@ -60,15 +59,6 @@ source_set("constants") {
]
}
source_set("features") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"features.h",
"features.mm",
]
deps = [ "//base" ]
}
source_set("coordinator") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
......@@ -80,7 +70,6 @@ source_set("coordinator") {
"page_info_site_security_mediator.mm",
]
deps = [
":features",
":page_info",
"resources:page_info_bad",
"resources:page_info_good",
......
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_UI_PAGE_INFO_FEATURES_H_
#define IOS_CHROME_BROWSER_UI_PAGE_INFO_FEATURES_H_
#include "base/feature_list.h"
// Feature to enable the new design of the page info.
extern const base::Feature kPageInfoRefactoring;
#endif // IOS_CHROME_BROWSER_UI_PAGE_INFO_FEATURES_H_
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "ios/chrome/browser/ui/page_info/features.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
const base::Feature kPageInfoRefactoring{"PageInfoRefactoring",
base::FEATURE_DISABLED_BY_DEFAULT};
......@@ -6,13 +6,13 @@
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#import "components/content_settings/core/common/features.h"
#include "components/security_state/core/security_state.h"
#include "components/ssl_errors/error_info.h"
#include "components/strings/grit/components_chromium_strings.h"
#include "components/strings/grit/components_google_chrome_strings.h"
#include "components/strings/grit/components_strings.h"
#include "ios/chrome/browser/chrome_url_constants.h"
#import "ios/chrome/browser/ui/page_info/features.h"
#import "ios/chrome/browser/ui/page_info/page_info_site_security_description.h"
#include "ios/chrome/grit/ios_chromium_strings.h"
#include "ios/chrome/grit/ios_strings.h"
......@@ -77,7 +77,7 @@ NSString* BuildMessage(NSArray<NSString*>* messageComponents) {
if (offlinePage) {
dataHolder.siteURL =
base::FeatureList::IsEnabled(kPageInfoRefactoring)
base::FeatureList::IsEnabled(content_settings::kImprovedCookieControls)
? l10n_util::GetNSString(IDS_IOS_PAGE_INFO_OFFLINE_PAGE_LABEL)
: l10n_util::GetNSString(IDS_IOS_PAGE_INFO_OFFLINE_TITLE);
dataHolder.message = l10n_util::GetNSString(IDS_IOS_PAGE_INFO_OFFLINE_PAGE);
......@@ -89,7 +89,7 @@ NSString* BuildMessage(NSArray<NSString*>* messageComponents) {
if (URL.SchemeIs(kChromeUIScheme)) {
dataHolder.siteURL =
base::FeatureList::IsEnabled(kPageInfoRefactoring)
base::FeatureList::IsEnabled(content_settings::kImprovedCookieControls)
? l10n_util::GetNSString(IDS_IOS_PAGE_INFO_CHROME_PAGE_LABEL)
: base::SysUTF8ToNSString(URL.spec());
dataHolder.message = l10n_util::GetNSString(IDS_PAGE_INFO_INTERNAL_PAGE);
......@@ -119,7 +119,8 @@ NSString* BuildMessage(NSArray<NSString*>* messageComponents) {
dataHolder.iconImageName = kSecurityIconNotSecure;
}
if (base::FeatureList::IsEnabled(kPageInfoRefactoring)) {
if (base::FeatureList::IsEnabled(
content_settings::kImprovedCookieControls)) {
dataHolder.message =
[NSString stringWithFormat:@"%@ BEGIN_LINK %@ END_LINK",
l10n_util::GetNSString(
......@@ -147,7 +148,8 @@ NSString* BuildMessage(NSArray<NSString*>* messageComponents) {
NSString* certificateDetails = BuildCertificateDetailString(status, URL);
if (base::FeatureList::IsEnabled(kPageInfoRefactoring)) {
if (base::FeatureList::IsEnabled(
content_settings::kImprovedCookieControls)) {
dataHolder.message = BuildMessage(@[
[NSString stringWithFormat:@"%@ BEGIN_LINK %@ END_LINK",
l10n_util::GetNSString(
......@@ -191,7 +193,8 @@ NSString* BuildMessage(NSArray<NSString*>* messageComponents) {
dataHolder.legacyImage = [UIImage imageNamed:@"page_info_info"];
dataHolder.iconImageName = kSecurityIconNotSecure;
}
if (base::FeatureList::IsEnabled(kPageInfoRefactoring)) {
if (base::FeatureList::IsEnabled(
content_settings::kImprovedCookieControls)) {
dataHolder.message = BuildMessage(@[
[NSString stringWithFormat:@"%@ BEGIN_LINK %@ END_LINK",
l10n_util::GetNSString(
......@@ -215,7 +218,7 @@ NSString* BuildMessage(NSArray<NSString*>* messageComponents) {
l10n_util::GetNSString(IDS_IOS_PAGE_INFO_SECURITY_STATUS_SECURE);
dataHolder.legacyImage = [UIImage imageNamed:@"page_info_good"];
dataHolder.iconImageName = kSecurityIconSecure;
if (base::FeatureList::IsEnabled(kPageInfoRefactoring)) {
if (base::FeatureList::IsEnabled(content_settings::kImprovedCookieControls)) {
dataHolder.message = BuildMessage(@[
[NSString
stringWithFormat:@"%@ BEGIN_LINK %@ END_LINK",
......
......@@ -8,7 +8,6 @@
#include "components/content_settings/core/common/features.h"
#include "ios/chrome/browser/chrome_url_constants.h"
#include "ios/chrome/browser/ui/commands/browser_commands.h"
#import "ios/chrome/browser/ui/page_info/features.h"
#import "ios/chrome/browser/ui/page_info/page_info_cookies_commands.h"
#import "ios/chrome/browser/ui/settings/cells/settings_switch_cell.h"
#import "ios/chrome/browser/ui/settings/cells/settings_switch_item.h"
......
......@@ -70,7 +70,6 @@ source_set("popup_menu") {
"//ios/chrome/browser/ui/coordinators:chrome_coordinators",
"//ios/chrome/browser/ui/list_model",
"//ios/chrome/browser/ui/ntp_tile_views:constants",
"//ios/chrome/browser/ui/page_info:features",
"//ios/chrome/browser/ui/popup_menu/cells",
"//ios/chrome/browser/ui/popup_menu/public",
"//ios/chrome/browser/ui/popup_menu/public:popup_menu_ui",
......
......@@ -11,6 +11,7 @@
#include "base/metrics/user_metrics_action.h"
#include "base/notreached.h"
#include "base/strings/sys_string_conversions.h"
#import "components/content_settings/core/common/features.h"
#include "components/open_from_clipboard/clipboard_recent_content.h"
#import "ios/chrome/browser/ui/commands/application_commands.h"
#import "ios/chrome/browser/ui/commands/browser_commands.h"
......@@ -18,7 +19,6 @@
#import "ios/chrome/browser/ui/commands/load_query_commands.h"
#import "ios/chrome/browser/ui/commands/open_new_tab_command.h"
#import "ios/chrome/browser/ui/commands/text_zoom_commands.h"
#import "ios/chrome/browser/ui/page_info/features.h"
#import "ios/chrome/browser/ui/popup_menu/popup_menu_action_handler_commands.h"
#import "ios/chrome/browser/ui/popup_menu/public/cells/popup_menu_item.h"
#import "ios/chrome/browser/ui/popup_menu/public/popup_menu_table_view_controller.h"
......@@ -90,7 +90,8 @@ using base::UserMetricsAction;
break;
case PopupMenuActionSiteInformation:
RecordAction(UserMetricsAction("MobileMenuSiteInformation"));
if (base::FeatureList::IsEnabled(kPageInfoRefactoring)) {
if (base::FeatureList::IsEnabled(
content_settings::kImprovedCookieControls)) {
[self.dispatcher showPageInfo];
} else {
[self.dispatcher
......
......@@ -35,7 +35,6 @@ source_set("privacy_ui") {
"//ios/chrome/browser/ui/colors",
"//ios/chrome/browser/ui/commands",
"//ios/chrome/browser/ui/list_model",
"//ios/chrome/browser/ui/page_info:features",
"//ios/chrome/browser/ui/settings:constants",
"//ios/chrome/browser/ui/settings:settings_root",
"//ios/chrome/browser/ui/settings/cells",
......
......@@ -17,7 +17,6 @@
#include "ios/chrome/browser/browsing_data/browsing_data_features.h"
#import "ios/chrome/browser/main/browser.h"
#import "ios/chrome/browser/ui/commands/open_new_tab_command.h"
#import "ios/chrome/browser/ui/page_info/features.h"
#import "ios/chrome/browser/ui/settings/cells/settings_switch_cell.h"
#import "ios/chrome/browser/ui/settings/cells/settings_switch_item.h"
#import "ios/chrome/browser/ui/settings/privacy/cookies_status_description.h"
......
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