From 30bde7b80c189829017af3abb4302a2881d60e4c Mon Sep 17 00:00:00 2001 From: rbpotter Date: Tue, 2 Mar 2021 20:13:34 +0000 Subject: [PATCH] Print Preview: Remove privet printing flag Privet printing has been deprecated since M88. Remove the flag to force enable it from chrome://flags, so that privet printing will only be supported if the EnableDeprecatedPrivetPrinting policy is turned on. This policy (and additional privet code) will be removed in a future milestone. Bug: 1144931 Change-Id: I15432805b94388f9512abae6aa07c174ffa9a781 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2728455 Reviewed-by: Daniel Hosseinian Commit-Queue: Rebekah Potter Cr-Commit-Position: refs/heads/master@{#859095} --- chrome/browser/about_flags.cc | 4 ---- chrome/browser/flag_descriptions.cc | 5 ----- chrome/browser/flag_descriptions.h | 3 --- chrome/browser/ui/ui_features.cc | 5 ----- chrome/browser/ui/ui_features.h | 2 -- chrome/browser/ui/webui/print_preview/print_preview_ui.cc | 3 +-- tools/metrics/histograms/enums.xml | 2 -- 7 files changed, 1 insertion(+), 23 deletions(-) diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index f4fc91695ad9d..81e0767dbc0c9 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc @@ -3216,10 +3216,6 @@ const FeatureEntry kFeatureEntries[] = { flag_descriptions::kDeviceDiscoveryNotificationsName, flag_descriptions::kDeviceDiscoveryNotificationsDescription, kOsDesktop, SINGLE_VALUE_TYPE(switches::kEnableDeviceDiscoveryNotifications)}, - {"force-enable-privet-printing", - flag_descriptions::kForceEnablePrivetPrintingName, - flag_descriptions::kForceEnablePrivetPrintingDescription, kOsDesktop, - FEATURE_VALUE_TYPE(features::kForceEnablePrivetPrinting)}, #endif // BUILDFLAG(ENABLE_SERVICE_DISCOVERY) {"enable-webgl-draft-extensions", flag_descriptions::kWebglDraftExtensionsName, diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index 4334c5e3422fb..07be3e73a7500 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc @@ -1962,11 +1962,6 @@ const char kPrivacySandboxSettingsDescription[] = "Enables privacy sandbox settings. Requires at least one of the Privacy " "Sandbox APIs to be enabled."; -const char kForceEnablePrivetPrintingName[] = "Force enable Privet Printing"; -const char kForceEnablePrivetPrintingDescription[] = - "Override to force enabling printing to existing registered Privet " - "printers in Print Preview. Will be removed in M90."; - const char kSafetyCheckAndroidName[] = "Safety Check on Android"; const char kSafetyCheckAndroidDescription[] = "A settings component for checking multiple areas of browser safety. " diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index 50062e545b584..878d56a9d0a9e 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h @@ -1149,9 +1149,6 @@ extern const char kPrivacyReorderedAndroidDescription[]; extern const char kPrivacySandboxSettingsName[]; extern const char kPrivacySandboxSettingsDescription[]; -extern const char kForceEnablePrivetPrintingName[]; -extern const char kForceEnablePrivetPrintingDescription[]; - extern const char kSafetyCheckAndroidName[]; extern const char kSafetyCheckAndroidDescription[]; diff --git a/chrome/browser/ui/ui_features.cc b/chrome/browser/ui/ui_features.cc index ded0e63a4942d..485f8268115b6 100644 --- a/chrome/browser/ui/ui_features.cc +++ b/chrome/browser/ui/ui_features.cc @@ -39,11 +39,6 @@ const base::Feature kExtensionSettingsOverriddenDialogs{ const base::Feature kExtensionsToolbarMenu{"ExtensionsToolbarMenu", base::FEATURE_ENABLED_BY_DEFAULT}; -// Force enables legacy privet printers that are already registered in Print -// Preview. To be removed in M90. -const base::Feature kForceEnablePrivetPrinting{ - "ForceEnablePrivetPrinting", base::FEATURE_DISABLED_BY_DEFAULT}; - // Enables the new profile picker. // https:://crbug.com/1063856 const base::Feature kNewProfilePicker{"NewProfilePicker", diff --git a/chrome/browser/ui/ui_features.h b/chrome/browser/ui/ui_features.h index 167abf54e4c33..8c8e5308e0080 100644 --- a/chrome/browser/ui/ui_features.h +++ b/chrome/browser/ui/ui_features.h @@ -37,8 +37,6 @@ extern const base::Feature kExtensionSettingsOverriddenDialogs; extern const base::Feature kExtensionsToolbarMenu; -extern const base::Feature kForceEnablePrivetPrinting; - extern const base::Feature kNewProfilePicker; extern const base::Feature kNewTabstripAnimation; diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc index 60b1fe2311c09..82a5b9b0f2493 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc +++ b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc @@ -412,8 +412,7 @@ void AddPrintPreviewFlags(content::WebUIDataSource* source, Profile* profile) { #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) source->AddBoolean( "forceEnablePrivetPrinting", - profile->GetPrefs()->GetBoolean(prefs::kForceEnablePrivetPrinting) || - base::FeatureList::IsEnabled(features::kForceEnablePrivetPrinting)); + profile->GetPrefs()->GetBoolean(prefs::kForceEnablePrivetPrinting)); #endif #if BUILDFLAG(IS_CHROMEOS_ASH) diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 9afc5707a9961..4c54f8b862cb9 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml @@ -44615,7 +44615,6 @@ from previous Chrome versions. - @@ -45339,7 +45338,6 @@ from previous Chrome versions. label="OmniboxUIExperimentHideSuggestionUrlPath:enabled"/> -