| Index: chrome/browser/extensions/external_component_loader.cc
|
| diff --git a/chrome/browser/extensions/external_component_loader.cc b/chrome/browser/extensions/external_component_loader.cc
|
| index 8a1e6af22fb7333a379fa25e495caf3b3a763e23..68f6f74a8a2f2ea1b405cc90a7916f8e76fcf14e 100644
|
| --- a/chrome/browser/extensions/external_component_loader.cc
|
| +++ b/chrome/browser/extensions/external_component_loader.cc
|
| @@ -15,6 +15,7 @@
|
| #include "chrome/common/features.h"
|
| #include "components/signin/core/browser/signin_manager.h"
|
| #include "extensions/common/extension_urls.h"
|
| +#include "extensions/common/feature_switch.h"
|
| #include "extensions/common/manifest.h"
|
|
|
| #if defined(OS_CHROMEOS)
|
| @@ -26,7 +27,7 @@
|
| #include "chrome/browser/ui/app_list/google_now_extension.h"
|
| #endif
|
|
|
| -#if defined(ENABLE_MEDIA_ROUTER) && defined(GOOGLE_CHROME_BUILD)
|
| +#if defined(ENABLE_MEDIA_ROUTER)
|
| #include "chrome/browser/media/router/media_router_feature.h"
|
| #endif
|
|
|
| @@ -54,10 +55,12 @@ void ExternalComponentLoader::StartLoading() {
|
| }
|
| #endif
|
|
|
| -#if defined(ENABLE_MEDIA_ROUTER) && defined(GOOGLE_CHROME_BUILD)
|
| - if (media_router::MediaRouterEnabled(profile_))
|
| +#if defined(ENABLE_MEDIA_ROUTER)
|
| + if (media_router::MediaRouterEnabled(profile_) &&
|
| + FeatureSwitch::load_media_router_component_extension()->IsEnabled()) {
|
| AddExternalExtension(extension_misc::kMediaRouterStableExtensionId);
|
| -#endif // defined(ENABLE_MEDIA_ROUTER) && defined(GOOGLE_CHROME_BUILD)
|
| + }
|
| +#endif // defined(ENABLE_MEDIA_ROUTER)
|
|
|
| #if BUILDFLAG(ENABLE_APP_LIST) && defined(OS_CHROMEOS)
|
| std::string google_now_extension_id;
|
|
|