Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 07985cf5 authored by csagan5's avatar csagan5
Browse files

Release 75.0.3770.139

parent 32386466
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
# 75.0.3770.139
* disable media router and remoting by default (fixes https://github.com/bromite/bromite/issues/281)
* enable CFI in builds

# 75.0.3770.132

# 75.0.3770.109
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ enable_reporting=false
enable_resource_whitelist_generation=false
enable_vr=false
fieldtrial_testing_like_official_build=true
is_cfi=true
is_component_build=false
is_debug=false
is_official_build=true
+526 −152

File changed.

Preview size limit exceeded, changes collapsed.

+66 −0
Original line number Diff line number Diff line
From: Daniel Micay <danielmicay@gmail.com>
Date: Thu, 4 Jul 2019 19:08:52 -0400
Subject: Disable media router and remoting by default

---
 chrome/browser/media/router/media_router_feature.cc | 17 ++++++++---------
 chrome/browser/profiles/profile.cc                  |  2 +-
 chrome/browser/profiles/profile_impl.cc             |  2 +-
 3 files changed, 10 insertions(+), 11 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
@@ -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/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc
--- a/chrome/browser/profiles/profile.cc
+++ b/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);
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
@@ -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.11.0
+1 −0
Original line number Diff line number Diff line
@@ -121,3 +121,4 @@ Enable-download-rename-option-by-default.patch
disable-payment-support-by-default.patch
disable-background-sync-by-default.patch
disable-sensors-access-site-setting-by-default.patch
Disable-media-router-and-remoting-by-default.patch