Disable-media-router-and-remoting-by-default.patch
This commit is contained in:
parent
055486e862
commit
0b745978c9
1 changed files with 19 additions and 19 deletions
|
@ -3,36 +3,36 @@ Date: Thu, 4 Jul 2019 19:08:52 -0400
|
|||
Subject: Disable media router and remoting by default
|
||||
|
||||
---
|
||||
.../media/router/media_router_feature.cc | 17 ++++++++---------
|
||||
.../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(-)
|
||||
3 files changed, 9 insertions(+), 12 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
|
||||
@@ -66,17 +66,16 @@ bool MediaRouterEnabled(content::BrowserContext* context) {
|
||||
#endif // !defined(OFFICIAL_BUILD) && !defined(OS_ANDROID)
|
||||
@@ -80,18 +80,15 @@ bool MediaRouterEnabled(content::BrowserContext* context) {
|
||||
if (it != stored_pref_values->end())
|
||||
return it->second;
|
||||
|
||||
#if defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
- // Check the enterprise policy.
|
||||
- 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;
|
||||
- bool allowed;
|
||||
- CHECK(pref->GetValue()->GetAsBoolean(&allowed));
|
||||
- stored_pref_values->insert(std::make_pair(context, 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;
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
- // The component extension cannot be loaded in guest sessions.
|
||||
- // TODO(crbug.com/756243): Figure out why.
|
||||
- return !Profile::FromBrowserContext(context)->IsGuestSession();
|
||||
+ const PrefService::Preference* pref = GetMediaRouterPref(context);
|
||||
+ bool allowed = false;
|
||||
+ pref->GetValue()->GetAsBoolean(&allowed);
|
||||
+ stored_pref_values->insert(std::make_pair(context, allowed));
|
||||
+ return allowed;
|
||||
#else // !(defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS))
|
||||
return false;
|
||||
|
@ -40,7 +40,7 @@ diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browse
|
|||
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
|
||||
@@ -356,7 +356,7 @@ void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
@@ -327,7 +327,7 @@ void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
media_router::prefs::kMediaRouterEnableCloudServices, false,
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
registry->RegisterBooleanPref(
|
||||
|
@ -52,15 +52,15 @@ diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profil
|
|||
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
|
||||
@@ -409,7 +409,7 @@ void ProfileImpl::RegisterProfilePrefs(
|
||||
@@ -455,7 +455,7 @@ void ProfileImpl::RegisterProfilePrefs(
|
||||
#endif
|
||||
|
||||
registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false);
|
||||
- registry->RegisterBooleanPref(prefs::kEnableMediaRouter, true);
|
||||
+ registry->RegisterBooleanPref(prefs::kEnableMediaRouter, false);
|
||||
#if defined(OS_CHROMEOS)
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kOobeMarketingOptInScreenFinished, false,
|
||||
#if !defined(OS_ANDROID)
|
||||
registry->RegisterBooleanPref(prefs::kShowCastIconInToolbar, false);
|
||||
#endif // !defined(OS_ANDROID)
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue