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

Unified Diff: content/renderer/media/media_stream_audio_processor.cc

Issue 190643003: Fix/Add content_unittests to work for the code behind --enable-audio-track-processing (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: ready for review Created 6 years, 9 months 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/renderer/media/media_stream_audio_processor.cc
diff --git a/content/renderer/media/media_stream_audio_processor.cc b/content/renderer/media/media_stream_audio_processor.cc
index ef693b241cee6b352a6c28efe5ba97d58cacd7a6..cdaa7f127d2e6a1bafc8a225fd8ef39310633071 100644
--- a/content/renderer/media/media_stream_audio_processor.cc
+++ b/content/renderer/media/media_stream_audio_processor.cc
@@ -264,10 +264,8 @@ void MediaStreamAudioProcessor::InitializeAudioProcessingModule(
const blink::WebMediaConstraints& constraints, int effects,
MediaStreamType type) {
DCHECK(!audio_processing_);
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableAudioTrackProcessing)) {
+ if (!IsAudioTrackProcessingEnabled())
return;
- }
RTCMediaConstraints native_constraints(constraints);
@@ -488,4 +486,9 @@ void MediaStreamAudioProcessor::StopAudioProcessing() {
audio_processing_.reset();
}
+bool MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled() const {
+ return CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableAudioTrackProcessing);
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698