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

Unified Diff: content/browser/renderer_host/media/audio_input_renderer_host.cc

Issue 2517953003: Move enable_webrtc to a buildflag header. (Closed)
Patch Set: Fix 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: content/browser/renderer_host/media/audio_input_renderer_host.cc
diff --git a/content/browser/renderer_host/media/audio_input_renderer_host.cc b/content/browser/renderer_host/media/audio_input_renderer_host.cc
index 84d36838fb8770319723d8a540c843c9ac911085..aefb4244231883e9dc98317e040b713e4f7bf4f9 100644
--- a/content/browser/renderer_host/media/audio_input_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_input_renderer_host.cc
@@ -29,12 +29,13 @@
#include "media/audio/audio_device_description.h"
#include "media/base/audio_bus.h"
#include "media/base/media_switches.h"
+#include "media/media_features.h"
namespace content {
namespace {
-#ifdef ENABLE_WEBRTC
+#if BUILDFLAG(ENABLE_WEBRTC)
const base::FilePath::CharType kDebugRecordingFileNameAddition[] =
FILE_PATH_LITERAL("source_input");
const base::FilePath::CharType kDebugRecordingFileNameExtension[] =
@@ -112,7 +113,7 @@ AudioInputRendererHost::~AudioInputRendererHost() {
DCHECK(audio_entries_.empty());
}
-#ifdef ENABLE_WEBRTC
+#if BUILDFLAG(ENABLE_WEBRTC)
void AudioInputRendererHost::EnableDebugRecording(const base::FilePath& file) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
base::FilePath file_with_extensions =
@@ -388,7 +389,7 @@ void AudioInputRendererHost::DoCreateStream(
return;
}
-#if defined(ENABLE_WEBRTC)
+#if BUILDFLAG(ENABLE_WEBRTC)
std::unique_ptr<media::AudioInputWriter> debug_writer(
new AudioInputDebugWriter(audio_params));
#else
@@ -460,7 +461,7 @@ void AudioInputRendererHost::DoCreateStream(
MediaInternals::GetInstance()->SetWebContentsTitleForAudioLogEntry(
stream_id, render_process_id_, render_frame_id, audio_log_.get());
-#if defined(ENABLE_WEBRTC)
+#if BUILDFLAG(ENABLE_WEBRTC)
BrowserThread::PostTask(
BrowserThread::UI,
FROM_HERE,
@@ -602,7 +603,7 @@ void AudioInputRendererHost::MaybeUnregisterKeyboardMicStream(
#endif
}
-#if defined(ENABLE_WEBRTC)
+#if BUILDFLAG(ENABLE_WEBRTC)
void AudioInputRendererHost::MaybeEnableDebugRecordingForId(int stream_id) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
if (WebRTCInternals::GetInstance()->IsAudioDebugRecordingsEnabled()) {
@@ -645,6 +646,6 @@ void AudioInputRendererHost::EnableDebugRecordingForId(
#undef IntToStringType
-#endif // defined(ENABLE_WEBRTC)
+#endif // BUILDFLAG(ENABLE_WEBRTC)
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698