Reland "Added option to specify a maximum file size when recording an AEC dump.", commit ae2c5ad12afc8cc29fe9c59dea432b697b871a87.

The revert of the original CL was commit 36d4c545007129446e551c45c17b25377dce89a4.
Original review: https://codereview.webrtc.org/1413483003/

The original CL changes a function on audio_processing.h that is used by Chrome, this CL adds back the old function.

TBR=glaznev@webrtc.org, henrik.lundin@webrtc.org, solenberg@google.com, henrikg@webrtc.org, perkj@webrtc.org
BUG=webrtc:4741
Committed: https://crrev.com/f4f5cb09277d5ef6aeac8341e5f54a055867803a
Cr-Commit-Position: refs/heads/master@{#11093}

Review URL: https://codereview.webrtc.org/1540103002

Cr-Commit-Position: refs/heads/master@{#11267}
diff --git a/talk/media/webrtc/webrtcvoiceengine.cc b/talk/media/webrtc/webrtcvoiceengine.cc
index 4285af3..6c07ff4 100644
--- a/talk/media/webrtc/webrtcvoiceengine.cc
+++ b/talk/media/webrtc/webrtcvoiceengine.cc
@@ -1014,7 +1014,8 @@
   return true;
 }
 
-bool WebRtcVoiceEngine::StartAecDump(rtc::PlatformFile file) {
+bool WebRtcVoiceEngine::StartAecDump(rtc::PlatformFile file,
+                                     int64_t max_size_bytes) {
   RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
   FILE* aec_dump_file_stream = rtc::FdopenPlatformFileForWriting(file);
   if (!aec_dump_file_stream) {
@@ -1024,7 +1025,8 @@
     return false;
   }
   StopAecDump();
-  if (voe_wrapper_->processing()->StartDebugRecording(aec_dump_file_stream) !=
+  if (voe_wrapper_->base()->audio_processing()->StartDebugRecording(
+          aec_dump_file_stream, max_size_bytes) !=
       webrtc::AudioProcessing::kNoError) {
     LOG_RTCERR0(StartDebugRecording);
     fclose(aec_dump_file_stream);
@@ -1038,8 +1040,8 @@
   RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
   if (!is_dumping_aec_) {
     // Start dumping AEC when we are not dumping.
-    if (voe_wrapper_->processing()->StartDebugRecording(
-        filename.c_str()) != webrtc::AudioProcessing::kNoError) {
+    if (voe_wrapper_->base()->audio_processing()->StartDebugRecording(
+            filename.c_str(), -1) != webrtc::AudioProcessing::kNoError) {
       LOG_RTCERR1(StartDebugRecording, filename.c_str());
     } else {
       is_dumping_aec_ = true;
@@ -1051,7 +1053,7 @@
   RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
   if (is_dumping_aec_) {
     // Stop dumping AEC when we are dumping.
-    if (voe_wrapper_->processing()->StopDebugRecording() !=
+    if (voe_wrapper_->base()->audio_processing()->StopDebugRecording() !=
         webrtc::AudioProcessing::kNoError) {
       LOG_RTCERR0(StopDebugRecording);
     }