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

Unified Diff: chrome/browser/ui/media_utils.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/ui/media_utils.cc
diff --git a/chrome/browser/ui/media_utils.cc b/chrome/browser/ui/media_utils.cc
index ae54995e2f6cc494f3db0024668aa6f7b25551ea..bae2e2e115274f532b04ae6b1d7959b847778e86 100644
--- a/chrome/browser/ui/media_utils.cc
+++ b/chrome/browser/ui/media_utils.cc
@@ -7,15 +7,16 @@
#include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/features/features.h"
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "extensions/browser/extension_registry.h"
#include "extensions/common/constants.h"
#endif
namespace {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
const extensions::Extension* GetExtensionForOrigin(Profile* profile,
const GURL& security_origin) {
if (!security_origin.SchemeIs(extensions::kExtensionScheme))
@@ -37,7 +38,7 @@ void RequestMediaAccessPermission(
const content::MediaStreamRequest& request,
const content::MediaResponseCallback& callback) {
const extensions::Extension* extension = NULL;
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
extension = GetExtensionForOrigin(profile, request.security_origin);
#endif
MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
@@ -47,7 +48,7 @@ void RequestMediaAccessPermission(
bool CheckMediaAccessPermission(content::WebContents* web_contents,
const GURL& security_origin,
content::MediaStreamType type) {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
Profile* profile =
Profile::FromBrowserContext(web_contents->GetBrowserContext());
const extensions::Extension* extension =
« no previous file with comments | « chrome/browser/ui/login/login_handler.cc ('k') | chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698