WebUI: Add InternalWebUIConfig along with related flag and pref
Add
- A pref for controlling whether to display internal-only WebUIs.
- A feature flag, that the pref controls and logic will be gated with
during development.
- A new DefaultInternalWebUIConfig class for internal-only WebUIs to
inherit from, that overrides CreateWebUIController() to return a
"internal debug pages disabled" UI when the feature flag is enabled
and the pref is not set
- Tests for the new config class
- Very simple implementation of the InternalDebugPagesDisabledUI,
containing a single message to that effect.
Bug: 379889249
Change-Id: Ie8df90e93ffdc7c773cc9dac526dd90293ba2cc7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6021177
Reviewed-by: Demetrios Papadopoulos <[email protected]>
Reviewed-by: Charlie Reis <[email protected]>
Reviewed-by: Erik Chen <[email protected]>
Commit-Queue: Rebekah Potter <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1385701}
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 5c44222..ce6bafc4 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -1690,6 +1690,7 @@
#if BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
registry->RegisterBooleanPref(prefs::kFeatureNotificationsEnabled, true);
#endif // BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ registry->RegisterBooleanPref(prefs::kInternalOnlyUisEnabled, false);
#if BUILDFLAG(IS_ANDROID)
registry->RegisterBooleanPref(policy::policy_prefs::kBackForwardCacheEnabled,
true);