55 lines
2.5 KiB
Diff
55 lines
2.5 KiB
Diff
From: Daniel Micay <danielmicay@gmail.com>
|
|
Date: Thu, 4 Jul 2019 19:08:52 -0400
|
|
Subject: Disable media router and remoting by default
|
|
|
|
Original License: MIT - https://spdx.org/licenses/MIT.html
|
|
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
|
---
|
|
chrome/browser/media/router/media_router_feature.cc | 5 +++--
|
|
chrome/browser/profiles/profile_impl.cc | 2 +-
|
|
2 files changed, 4 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browser/media/router/media_router_feature.cc
|
|
--- a/chrome/browser/media/router/media_router_feature.cc
|
|
+++ b/chrome/browser/media/router/media_router_feature.cc
|
|
@@ -49,7 +49,7 @@ BASE_FEATURE(kCastAnotherContentWhileCasting,
|
|
"CastAnotherContentWhileCasting",
|
|
base::FEATURE_ENABLED_BY_DEFAULT);
|
|
#else
|
|
-BASE_FEATURE(kMediaRouter, "MediaRouter", base::FEATURE_ENABLED_BY_DEFAULT);
|
|
+BASE_FEATURE(kMediaRouter, "MediaRouter", base::FEATURE_DISABLED_BY_DEFAULT);
|
|
BASE_FEATURE(kCastAllowAllIPsFeature,
|
|
"CastAllowAllIPs",
|
|
base::FEATURE_DISABLED_BY_DEFAULT);
|
|
@@ -99,6 +99,7 @@ void ClearMediaRouterStoredPrefsForTesting() {
|
|
}
|
|
|
|
bool MediaRouterEnabled(content::BrowserContext* context) {
|
|
+ if ((true)) return false;
|
|
#if !BUILDFLAG(IS_ANDROID)
|
|
if (!base::FeatureList::IsEnabled(kMediaRouter))
|
|
return false;
|
|
@@ -147,7 +148,7 @@ void RegisterProfilePrefs(PrefRegistrySimple* registry) {
|
|
registry->RegisterStringPref(prefs::kMediaRouterReceiverIdHashToken, "",
|
|
PrefRegistry::PUBLIC);
|
|
registry->RegisterBooleanPref(
|
|
- media_router::prefs::kMediaRouterMediaRemotingEnabled, true);
|
|
+ media_router::prefs::kMediaRouterMediaRemotingEnabled, false); // disabled in Bromite
|
|
registry->RegisterBooleanPref(
|
|
media_router::prefs::kMediaRouterShowCastSessionsStartedByOtherDevices,
|
|
true);
|
|
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
|
|
--- a/chrome/browser/profiles/profile_impl.cc
|
|
+++ b/chrome/browser/profiles/profile_impl.cc
|
|
@@ -413,7 +413,7 @@ void ProfileImpl::RegisterProfilePrefs(
|
|
#endif
|
|
|
|
registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false);
|
|
- registry->RegisterBooleanPref(prefs::kEnableMediaRouter, true);
|
|
+ registry->RegisterBooleanPref(prefs::kEnableMediaRouter, false);
|
|
#if !BUILDFLAG(IS_ANDROID)
|
|
registry->RegisterBooleanPref(prefs::kShowCastIconInToolbar, false);
|
|
#endif // !BUILDFLAG(IS_ANDROID)
|
|
--
|
|
2.25.1
|