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

Unified Diff: chrome/browser/media/webrtc/media_stream_capture_indicator.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
« no previous file with comments | « chrome/browser/media/webrtc/media_capture_devices_dispatcher.cc ('k') | chrome/browser/memory_details.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/webrtc/media_stream_capture_indicator.cc
diff --git a/chrome/browser/media/webrtc/media_stream_capture_indicator.cc b/chrome/browser/media/webrtc/media_stream_capture_indicator.cc
index d97d9c6961d58703d6b3b99d5f4ee75311e5e980..2e7fe1abf57509103afe3cc74d6bee532f9c940f 100644
--- a/chrome/browser/media/webrtc/media_stream_capture_indicator.cc
+++ b/chrome/browser/media/webrtc/media_stream_capture_indicator.cc
@@ -27,11 +27,12 @@
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_contents_observer.h"
+#include "extensions/features/features.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image_skia.h"
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/common/extensions/extension_constants.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/common/extension.h"
@@ -42,7 +43,7 @@ using content::WebContents;
namespace {
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
const extensions::Extension* GetExtension(WebContents* web_contents) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -69,7 +70,7 @@ bool IsWhitelistedExtension(const extensions::Extension* extension) {
return false;
}
-#endif // defined(ENABLE_EXTENSIONS)
+#endif // BUILDFLAG(ENABLE_EXTENSIONS)
base::string16 GetTitle(WebContents* web_contents) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -77,7 +78,7 @@ base::string16 GetTitle(WebContents* web_contents) {
if (!web_contents)
return base::string16();
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
const extensions::Extension* const extension = GetExtension(web_contents);
if (extension)
return base::UTF8ToUTF16(extension->name());
@@ -406,7 +407,7 @@ void MediaStreamCaptureIndicator::UpdateNotificationUserInterface() {
// The audio/video icon is shown only for non-whitelisted extensions or on
// Android. For regular tabs on desktop, we show an indicator in the tab
// icon.
-#if defined(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_EXTENSIONS)
const extensions::Extension* extension = GetExtension(web_contents);
if (!extension || IsWhitelistedExtension(extension))
continue;
« no previous file with comments | « chrome/browser/media/webrtc/media_capture_devices_dispatcher.cc ('k') | chrome/browser/memory_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698