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

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: removed an empty line. 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 640ab05dd87655c2f00029eecd439a38263f5802..4c1a2c90ab299c27846cebd1c56e730cc9f0f22a 100644
--- a/content/renderer/media/media_stream_audio_processor.cc
+++ b/content/renderer/media/media_stream_audio_processor.cc
@@ -265,13 +265,8 @@ void MediaStreamAudioProcessor::InitializeAudioProcessingModule(
const blink::WebMediaConstraints& constraints, int effects,
MediaStreamType type) {
DCHECK(!audio_processing_);
- const std::string group_name =
- base::FieldTrialList::FindFullName("MediaStreamAudioTrackProcessing");
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableAudioTrackProcessing) &&
- group_name != "Enabled") {
+ if (!IsAudioTrackProcessingEnabled())
return;
- }
RTCMediaConstraints native_constraints(constraints);
@@ -492,4 +487,11 @@ void MediaStreamAudioProcessor::StopAudioProcessing() {
audio_processing_.reset();
}
+bool MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled() const {
+ const std::string group_name =
+ base::FieldTrialList::FindFullName("MediaStreamAudioTrackProcessing");
+ return group_name == "Enabled" || CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableAudioTrackProcessing);
+}
+
} // namespace content
« no previous file with comments | « content/renderer/media/media_stream_audio_processor.h ('k') | content/renderer/media/media_stream_audio_processor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698