This repository has been archived by the owner on Apr 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
91 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
patches/Vanadium/0020-disable-media-router-media-remoting-by-default.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
From 99cfe5951292db607db5399f7e7526266bb273ab Mon Sep 17 00:00:00 2001 | ||
From: Daniel Micay <danielmicay@gmail.com> | ||
Date: Thu, 4 Jul 2019 18:11:27 -0400 | ||
Subject: [PATCH 20/30] disable media router media remoting by default | ||
|
||
--- | ||
chrome/browser/profiles/profile.cc | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/src/chrome/browser/profiles/profile.cc b/src/chrome/browser/profiles/profile.cc | ||
index e56624c60f42..dc2479bc4ad0 100644 | ||
--- a/src/chrome/browser/profiles/profile.cc | ||
+++ b/src/chrome/browser/profiles/profile.cc | ||
@@ -218,7 +218,7 @@ void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | ||
prefs::kMediaRouterFirstRunFlowAcknowledged, | ||
false, | ||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | ||
- registry->RegisterBooleanPref(prefs::kMediaRouterMediaRemotingEnabled, true); | ||
+ registry->RegisterBooleanPref(prefs::kMediaRouterMediaRemotingEnabled, false); | ||
registry->RegisterListPref(prefs::kMediaRouterTabMirroringSources); | ||
|
||
registry->RegisterDictionaryPref(prefs::kWebShareVisitedTargets); | ||
-- | ||
2.22.0 |
55 changes: 55 additions & 0 deletions
55
patches/Vanadium/0021-disable-media-router-by-default.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
From 75c087d108655330beabb7729432b083e625e925 Mon Sep 17 00:00:00 2001 | ||
From: Daniel Micay <danielmicay@gmail.com> | ||
Date: Thu, 4 Jul 2019 19:08:52 -0400 | ||
Subject: [PATCH 21/30] disable media router by default | ||
|
||
--- | ||
.../media/router/media_router_feature.cc | 17 ++++++++--------- | ||
chrome/browser/profiles/profile_impl.cc | 2 +- | ||
2 files changed, 9 insertions(+), 10 deletions(-) | ||
|
||
diff --git a/src/chrome/browser/media/router/media_router_feature.cc b/src/chrome/browser/media/router/media_router_feature.cc | ||
index 9c42d30ecd22..e773dd54ad9e 100644 | ||
--- a/src/chrome/browser/media/router/media_router_feature.cc | ||
+++ b/src/chrome/browser/media/router/media_router_feature.cc | ||
@@ -56,17 +56,16 @@ const PrefService::Preference* GetMediaRouterPref( | ||
|
||
bool MediaRouterEnabled(content::BrowserContext* context) { | ||
#if defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS) | ||
- const PrefService::Preference* pref = GetMediaRouterPref(context); | ||
- // Only use the pref value if it set from a mandatory policy. | ||
- if (pref->IsManaged() && !pref->IsDefaultValue()) { | ||
- bool allowed = false; | ||
- CHECK(pref->GetValue()->GetAsBoolean(&allowed)); | ||
- return allowed; | ||
- } | ||
- | ||
// The component extension cannot be loaded in guest sessions. | ||
// TODO(crbug.com/756243): Figure out why. | ||
- return !Profile::FromBrowserContext(context)->IsGuestSession(); | ||
+ if (Profile::FromBrowserContext(context)->IsGuestSession()) { | ||
+ return false; | ||
+ } | ||
+ | ||
+ const PrefService::Preference* pref = GetMediaRouterPref(context); | ||
+ bool allowed = false; | ||
+ pref->GetValue()->GetAsBoolean(&allowed); | ||
+ return allowed; | ||
#else // !(defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS)) | ||
return false; | ||
#endif // defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS) | ||
diff --git a/src/chrome/browser/profiles/profile_impl.cc b/src/chrome/browser/profiles/profile_impl.cc | ||
index 86ffb0c6cfc3..e32f0e7b83fe 100644 | ||
--- a/src/chrome/browser/profiles/profile_impl.cc | ||
+++ b/src/chrome/browser/profiles/profile_impl.cc | ||
@@ -443,7 +443,7 @@ void ProfileImpl::RegisterProfilePrefs( | ||
registry->RegisterStringPref( | ||
prefs::kPrintPreviewDefaultDestinationSelectionRules, std::string()); | ||
registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false); | ||
- registry->RegisterBooleanPref(prefs::kEnableMediaRouter, true); | ||
+ registry->RegisterBooleanPref(prefs::kEnableMediaRouter, false); | ||
#if defined(OS_CHROMEOS) | ||
registry->RegisterBooleanPref( | ||
prefs::kOobeMarketingOptInScreenFinished, false, | ||
-- | ||
2.22.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters