Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5087)

Unified Diff: chrome/browser/media/router/media_router_feature.cc

Issue 2479593006: Move enable extensions define to a build flag. (Closed)
Patch Set: Merge Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)

Powered by Google App Engine
This is Rietveld 408576698