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

Unified Diff: content/renderer/media/webrtc/peer_connection_dependency_factory.cc

Issue 293023003: Change kEnableAudioTrackProcessing to a disable flag and remove finch code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits to fix more bots. Created 6 years, 7 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/webrtc/peer_connection_dependency_factory.cc
diff --git a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
index c592c79827f422d467b2ea34404e0fe872ee226e..a50e17db3ac850bb08598e67c40844178f90b5e2 100644
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
@@ -12,6 +12,7 @@
#include "content/common/media/media_stream_messages.h"
#include "content/public/common/content_switches.h"
#include "content/renderer/media/media_stream.h"
+#include "content/renderer/media/media_stream_audio_processor.h"
#include "content/renderer/media/media_stream_audio_processor_options.h"
#include "content/renderer/media/media_stream_audio_source.h"
#include "content/renderer/media/media_stream_video_source.h"
@@ -626,14 +627,13 @@ void PeerConnectionDependencyFactory::OnAecDumpFile(
base::File file = IPC::PlatformFileForTransitToFile(file_handle);
DCHECK(file.IsValid());
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableAudioTrackProcessing)) {
+ if (MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled()) {
EnsureWebRtcAudioDeviceImpl();
GetWebRtcAudioDevice()->EnableAecDump(file.Pass());
return;
}
- // TODO(xians): Remove the following code after kEnableAudioTrackProcessing
+ // TODO(xians): Remove the following code after kDisableAudioTrackProcessing
// is removed.
if (PeerConnectionFactoryCreated())
StartAecDump(file.Pass());
@@ -642,13 +642,12 @@ void PeerConnectionDependencyFactory::OnAecDumpFile(
}
void PeerConnectionDependencyFactory::OnDisableAecDump() {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableAudioTrackProcessing)) {
+ if (MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled()) {
GetWebRtcAudioDevice()->DisableAecDump();
return;
}
- // TODO(xians): Remove the following code after kEnableAudioTrackProcessing
+ // TODO(xians): Remove the following code after kDisableAudioTrackProcessing
// is removed.
if (aec_dump_file_.IsValid())
aec_dump_file_.Close();

Powered by Google App Engine
This is Rietveld 408576698