Commit 8ef1f5d3 authored by Robbie McElrath's avatar Robbie McElrath Committed by Commit Bot

Remove fully launched ANDROID_SITE_SETTINGS_UI_REFRESH feature.

This CL removes the ANDROID_SITE_SETTINGS_UI_REFRESH feature, which has
been enabled by default since April 2019. This removes a dependency on
//chrome from site settings, which will help componentize it for
WebLayer.

Bug: 1058597, 1057950
Change-Id: I85d34ef3f46fb59490f07d35def2a15084714809
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2103395
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Reviewed-by: default avatarKamila Hasanbega <hkamila@chromium.org>
Cr-Commit-Position: refs/heads/master@{#753341}
parent 8f2771f7
...@@ -510,9 +510,7 @@ public class SingleCategorySettings extends PreferenceFragmentCompat ...@@ -510,9 +510,7 @@ public class SingleCategorySettings extends PreferenceFragmentCompat
// Categories that support adding exceptions also manage the 'Add site' preference. // Categories that support adding exceptions also manage the 'Add site' preference.
// This should only be used for settings that have host-pattern based exceptions. // This should only be used for settings that have host-pattern based exceptions.
if (mCategory.showSites(SiteSettingsCategory.Type.BACKGROUND_SYNC) if (mCategory.showSites(SiteSettingsCategory.Type.BACKGROUND_SYNC)
|| (mCategory.showSites(SiteSettingsCategory.Type.COOKIES) || mCategory.showSites(SiteSettingsCategory.Type.COOKIES)
&& ChromeFeatureList.isEnabled(
ChromeFeatureList.ANDROID_SITE_SETTINGS_UI_REFRESH))
|| mCategory.showSites(SiteSettingsCategory.Type.JAVASCRIPT) || mCategory.showSites(SiteSettingsCategory.Type.JAVASCRIPT)
|| mCategory.showSites(SiteSettingsCategory.Type.SOUND)) { || mCategory.showSites(SiteSettingsCategory.Type.SOUND)) {
if ((boolean) newValue) { if ((boolean) newValue) {
...@@ -685,14 +683,9 @@ public class SingleCategorySettings extends PreferenceFragmentCompat ...@@ -685,14 +683,9 @@ public class SingleCategorySettings extends PreferenceFragmentCompat
boolean exception = false; boolean exception = false;
if (mCategory.showSites(SiteSettingsCategory.Type.SOUND)) { if (mCategory.showSites(SiteSettingsCategory.Type.SOUND)) {
exception = true; exception = true;
} else if (mCategory.showSites(SiteSettingsCategory.Type.JAVASCRIPT) } else if (mCategory.showSites(SiteSettingsCategory.Type.JAVASCRIPT)) {
&& (ChromeFeatureList.isEnabled(ChromeFeatureList.ANDROID_SITE_SETTINGS_UI_REFRESH)
|| !WebsitePreferenceBridge.isCategoryEnabled(
ContentSettingsType.JAVASCRIPT))) {
exception = true; exception = true;
} else if (mCategory.showSites(SiteSettingsCategory.Type.COOKIES) } else if (mCategory.showSites(SiteSettingsCategory.Type.COOKIES)) {
&& ChromeFeatureList.isEnabled(
ChromeFeatureList.ANDROID_SITE_SETTINGS_UI_REFRESH)) {
exception = true; exception = true;
} else if (mCategory.showSites(SiteSettingsCategory.Type.BACKGROUND_SYNC) } else if (mCategory.showSites(SiteSettingsCategory.Type.BACKGROUND_SYNC)
&& !WebsitePreferenceBridge.isCategoryEnabled( && !WebsitePreferenceBridge.isCategoryEnabled(
...@@ -910,10 +903,7 @@ public class SingleCategorySettings extends PreferenceFragmentCompat ...@@ -910,10 +903,7 @@ public class SingleCategorySettings extends PreferenceFragmentCompat
boolean permissionBlockedByOs = mCategory.showPermissionBlockedMessage(getActivity()); boolean permissionBlockedByOs = mCategory.showPermissionBlockedMessage(getActivity());
// For these categories, no binary, tri-state or custom toggles should be shown. // For these categories, no binary, tri-state or custom toggles should be shown.
boolean hideMainToggles = mCategory.showSites(SiteSettingsCategory.Type.ALL_SITES) boolean hideMainToggles = mCategory.showSites(SiteSettingsCategory.Type.ALL_SITES)
|| mCategory.showSites(SiteSettingsCategory.Type.USE_STORAGE) || mCategory.showSites(SiteSettingsCategory.Type.USE_STORAGE);
|| (permissionBlockedByOs
&& !ChromeFeatureList.isEnabled(
ChromeFeatureList.ANDROID_SITE_SETTINGS_UI_REFRESH));
boolean hideSecondaryToggles = hideMainToggles || permissionBlockedByOs; boolean hideSecondaryToggles = hideMainToggles || permissionBlockedByOs;
if (hideMainToggles) { if (hideMainToggles) {
...@@ -1011,8 +1001,7 @@ public class SingleCategorySettings extends PreferenceFragmentCompat ...@@ -1011,8 +1001,7 @@ public class SingleCategorySettings extends PreferenceFragmentCompat
} }
private void maybeShowOsWarning(PreferenceScreen screen) { private void maybeShowOsWarning(PreferenceScreen screen) {
if (ChromeFeatureList.isEnabled(ChromeFeatureList.ANDROID_SITE_SETTINGS_UI_REFRESH) if (isBlocked()) {
&& isBlocked()) {
return; return;
} }
......
...@@ -26,7 +26,6 @@ import androidx.preference.Preference; ...@@ -26,7 +26,6 @@ import androidx.preference.Preference;
import org.chromium.base.ApiCompatibilityUtils; import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.chrome.R; import org.chromium.chrome.R;
import org.chromium.chrome.browser.flags.ChromeFeatureList;
import org.chromium.components.content_settings.ContentSettingsType; import org.chromium.components.content_settings.ContentSettingsType;
import org.chromium.components.subresource_filter.SubresourceFilterFeatureList; import org.chromium.components.subresource_filter.SubresourceFilterFeatureList;
import org.chromium.ui.text.SpanApplier; import org.chromium.ui.text.SpanApplier;
...@@ -467,26 +466,21 @@ public class SiteSettingsCategory { ...@@ -467,26 +466,21 @@ public class SiteSettingsCategory {
@ContentSettingsType @ContentSettingsType
int type = this.getContentSettingsType(); int type = this.getContentSettingsType();
int permission_string = R.string.android_permission_off; int permission_string = R.string.android_permission_off;
if (ChromeFeatureList.isEnabled(ChromeFeatureList.ANDROID_SITE_SETTINGS_UI_REFRESH)) { if (type == ContentSettingsType.GEOLOCATION) {
if (type == ContentSettingsType.GEOLOCATION) { permission_string = R.string.android_location_permission_off;
permission_string = R.string.android_location_permission_off; } else if (type == ContentSettingsType.MEDIASTREAM_MIC) {
} else if (type == ContentSettingsType.MEDIASTREAM_MIC) { permission_string = R.string.android_microphone_permission_off;
permission_string = R.string.android_microphone_permission_off; } else if (type == ContentSettingsType.MEDIASTREAM_CAMERA) {
} else if (type == ContentSettingsType.MEDIASTREAM_CAMERA) { permission_string = R.string.android_camera_permission_off;
permission_string = R.string.android_camera_permission_off; } else if (type == ContentSettingsType.AR) {
} else if (type == ContentSettingsType.AR) { // TODO(https://crbug.com/1058055): Use the missing camera permission
// TODO(https://crbug.com/1058055): Use the missing camera permission // text until we get guidance from UX team.
// text until we get guidance from UX team. permission_string = R.string.android_camera_permission_off;
permission_string = R.string.android_camera_permission_off; } else if (type == ContentSettingsType.NOTIFICATIONS) {
} else if (type == ContentSettingsType.NOTIFICATIONS) { permission_string = R.string.android_notifications_permission_off;
permission_string = R.string.android_notifications_permission_off;
}
return activity.getResources().getString(
plural ? R.string.android_permission_off_plural : permission_string);
} else {
return activity.getResources().getString(plural ? R.string.android_permission_off_plural
: R.string.android_permission_off);
} }
return activity.getResources().getString(
plural ? R.string.android_permission_off_plural : permission_string);
} }
/** /**
......
...@@ -3942,10 +3942,6 @@ const FeatureEntry kFeatureEntries[] = { ...@@ -3942,10 +3942,6 @@ const FeatureEntry kFeatureEntries[] = {
MULTI_VALUE_TYPE(kUseAngleChoices)}, MULTI_VALUE_TYPE(kUseAngleChoices)},
#endif #endif
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
{"android-site-settings-ui-refresh",
flag_descriptions::kAndroidSiteSettingsUIRefreshName,
flag_descriptions::kAndroidSiteSettingsUIRefreshDescription, kOsAndroid,
FEATURE_VALUE_TYPE(chrome::android::kAndroidSiteSettingsUIRefresh)},
{"draw-vertically-edge-to-edge", {"draw-vertically-edge-to-edge",
flag_descriptions::kDrawVerticallyEdgeToEdgeName, flag_descriptions::kDrawVerticallyEdgeToEdgeName,
flag_descriptions::kDrawVerticallyEdgeToEdgeDescription, kOsAndroid, flag_descriptions::kDrawVerticallyEdgeToEdgeDescription, kOsAndroid,
......
...@@ -115,12 +115,6 @@ const char kAndroidPictureInPictureAPIName[] = ...@@ -115,12 +115,6 @@ const char kAndroidPictureInPictureAPIName[] =
const char kAndroidPictureInPictureAPIDescription[] = const char kAndroidPictureInPictureAPIDescription[] =
"Enable Picture-in-Picture Web API for Android"; "Enable Picture-in-Picture Web API for Android";
const char kAndroidSiteSettingsUIRefreshName[] =
"Android Site Settings UI changes.";
const char kAndroidSiteSettingsUIRefreshDescription[] =
"Enable the new UI "
"changes in Site Settings in Android.";
const char kDnsHttpssvcName[] = "Support for HTTPSSVC records in DNS."; const char kDnsHttpssvcName[] = "Support for HTTPSSVC records in DNS.";
const char kDnsHttpssvcDescription[] = const char kDnsHttpssvcDescription[] =
"When enabled, Chrome may query a configured DoH server for HTTPSSVC " "When enabled, Chrome may query a configured DoH server for HTTPSSVC "
......
...@@ -96,9 +96,6 @@ extern const char kUseMessagesStagingUrlDescription[]; ...@@ -96,9 +96,6 @@ extern const char kUseMessagesStagingUrlDescription[];
extern const char kAndroidPictureInPictureAPIName[]; extern const char kAndroidPictureInPictureAPIName[];
extern const char kAndroidPictureInPictureAPIDescription[]; extern const char kAndroidPictureInPictureAPIDescription[];
extern const char kAndroidSiteSettingsUIRefreshName[];
extern const char kAndroidSiteSettingsUIRefreshDescription[];
extern const char kAutofillAlwaysReturnCloudTokenizedCardName[]; extern const char kAutofillAlwaysReturnCloudTokenizedCardName[];
extern const char kAutofillAlwaysReturnCloudTokenizedCardDescription[]; extern const char kAutofillAlwaysReturnCloudTokenizedCardDescription[];
......
...@@ -105,7 +105,6 @@ const base::Feature* kFeaturesExposedToJava[] = { ...@@ -105,7 +105,6 @@ const base::Feature* kFeaturesExposedToJava[] = {
&kAndroidPayIntegrationV1, &kAndroidPayIntegrationV1,
&kAndroidPayIntegrationV2, &kAndroidPayIntegrationV2,
&kAndroidSearchEngineChoiceNotification, &kAndroidSearchEngineChoiceNotification,
&kAndroidSiteSettingsUIRefresh,
&kBookmarksShowInFolder, &kBookmarksShowInFolder,
&kCastDeviceFilter, &kCastDeviceFilter,
&kCloseTabSuggestions, &kCloseTabSuggestions,
...@@ -298,8 +297,6 @@ const base::Feature kAndroidPayIntegrationV2{"AndroidPayIntegrationV2", ...@@ -298,8 +297,6 @@ const base::Feature kAndroidPayIntegrationV2{"AndroidPayIntegrationV2",
const base::Feature kAndroidSearchEngineChoiceNotification{ const base::Feature kAndroidSearchEngineChoiceNotification{
"AndroidSearchEngineChoiceNotification", base::FEATURE_ENABLED_BY_DEFAULT}; "AndroidSearchEngineChoiceNotification", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kAndroidSiteSettingsUIRefresh{
"AndroidSiteSettingsUIRefresh", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kBackgroundTaskComponentUpdate{ const base::Feature kBackgroundTaskComponentUpdate{
"BackgroundTaskComponentUpdate", base::FEATURE_DISABLED_BY_DEFAULT}; "BackgroundTaskComponentUpdate", base::FEATURE_DISABLED_BY_DEFAULT};
......
...@@ -22,7 +22,6 @@ extern const base::Feature kAndroidPayIntegrationV1; ...@@ -22,7 +22,6 @@ extern const base::Feature kAndroidPayIntegrationV1;
extern const base::Feature kAndroidPayIntegrationV2; extern const base::Feature kAndroidPayIntegrationV2;
extern const base::Feature kAndroidPaymentApps; extern const base::Feature kAndroidPaymentApps;
extern const base::Feature kAndroidSearchEngineChoiceNotification; extern const base::Feature kAndroidSearchEngineChoiceNotification;
extern const base::Feature kAndroidSiteSettingsUIRefresh;
extern const base::Feature kBackgroundTaskComponentUpdate; extern const base::Feature kBackgroundTaskComponentUpdate;
extern const base::Feature kBookmarksShowInFolder; extern const base::Feature kBookmarksShowInFolder;
extern const base::Feature kCloseTabSuggestions; extern const base::Feature kCloseTabSuggestions;
......
...@@ -223,7 +223,6 @@ public abstract class ChromeFeatureList { ...@@ -223,7 +223,6 @@ public abstract class ChromeFeatureList {
public static final String ANDROID_PAY_INTEGRATION_V2 = "AndroidPayIntegrationV2"; public static final String ANDROID_PAY_INTEGRATION_V2 = "AndroidPayIntegrationV2";
public static final String ANDROID_SEARCH_ENGINE_CHOICE_NOTIFICATION = public static final String ANDROID_SEARCH_ENGINE_CHOICE_NOTIFICATION =
"AndroidSearchEngineChoiceNotification"; "AndroidSearchEngineChoiceNotification";
public static final String ANDROID_SITE_SETTINGS_UI_REFRESH = "AndroidSiteSettingsUIRefresh";
public static final String APP_NOTIFICATION_STATUS_MESSAGING = "AppNotificationStatusMessaging"; public static final String APP_NOTIFICATION_STATUS_MESSAGING = "AppNotificationStatusMessaging";
public static final String AUTOFILL_ASSISTANT = "AutofillAssistant"; public static final String AUTOFILL_ASSISTANT = "AutofillAssistant";
public static final String AUTOFILL_ASSISTANT_CHROME_ENTRY = "AutofillAssistantChromeEntry"; public static final String AUTOFILL_ASSISTANT_CHROME_ENTRY = "AutofillAssistantChromeEntry";
......
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