| Index: chrome/browser/media/router/media_router_feature.cc
|
| diff --git a/chrome/browser/media/router/media_router_feature.cc b/chrome/browser/media/router/media_router_feature.cc
|
| index a927294a91f2834340f268bff671e3ab7e44684d..d1a617ce836c93d6f09b5245532864509a87c1fd 100644
|
| --- a/chrome/browser/media/router/media_router_feature.cc
|
| +++ b/chrome/browser/media/router/media_router_feature.cc
|
| @@ -6,19 +6,20 @@
|
|
|
| #include "build/build_config.h"
|
| #include "content/public/browser/browser_context.h"
|
| +#include "extensions/features/features.h"
|
|
|
| #if defined(ENABLE_MEDIA_ROUTER)
|
| -#if defined(OS_ANDROID) || defined(ENABLE_EXTENSIONS)
|
| +#if defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS)
|
| #include "chrome/common/pref_names.h"
|
| #include "components/prefs/pref_service.h"
|
| #include "components/user_prefs/user_prefs.h"
|
| -#endif // defined(OS_ANDROID) || defined(ENABLE_EXTENSIONS)
|
| +#endif // defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS)
|
| #endif // defined(ENABLE_MEDIA_ROUTER)
|
|
|
| namespace media_router {
|
|
|
| #if defined(ENABLE_MEDIA_ROUTER)
|
| -#if defined(OS_ANDROID) || defined(ENABLE_EXTENSIONS)
|
| +#if defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS)
|
| namespace {
|
| const PrefService::Preference* GetMediaRouterPref(
|
| content::BrowserContext* context) {
|
| @@ -26,12 +27,12 @@ const PrefService::Preference* GetMediaRouterPref(
|
| ->FindPreference(prefs::kEnableMediaRouter);
|
| }
|
| } // namespace
|
| -#endif // defined(OS_ANDROID) || defined(ENABLE_EXTENSIONS)
|
| +#endif // defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS)
|
| #endif // defined(ENABLE_MEDIA_ROUTER)
|
|
|
| bool MediaRouterEnabled(content::BrowserContext* context) {
|
| #if defined(ENABLE_MEDIA_ROUTER)
|
| -#if defined(OS_ANDROID) || defined(ENABLE_EXTENSIONS)
|
| +#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()) {
|
| @@ -40,9 +41,9 @@ bool MediaRouterEnabled(content::BrowserContext* context) {
|
| return allowed;
|
| }
|
| return true;
|
| -#else // !(defined(OS_ANDROID) || defined(ENABLE_EXTENSIONS))
|
| +#else // !(defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS))
|
| return false;
|
| -#endif // defined(OS_ANDROID) || defined(ENABLE_EXTENSIONS)
|
| +#endif // defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS)
|
| #else // !defined(ENABLE_MEDIA_ROUTER)
|
| return false;
|
| #endif // defined(ENABLE_MEDIA_ROUTER)
|
|
|