Added option to specify a maximum file size when recording an AEC dump.

For applications with a strict filesize limit for debug files,
I added an option to specify a maximum filesize for AEC dumps. An
existing unit test is extended to check that the feature works as
advertised.

BUG=webrtc:4741
TBR=glaznev@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#11081}
diff --git a/talk/app/webrtc/peerconnectioninterface.h b/talk/app/webrtc/peerconnectioninterface.h
index 799ca15..ccb527c 100644
--- a/talk/app/webrtc/peerconnectioninterface.h
+++ b/talk/app/webrtc/peerconnectioninterface.h
@@ -637,9 +637,11 @@
   // Starts AEC dump using existing file. Takes ownership of |file| and passes
   // it on to VoiceEngine (via other objects) immediately, which will take
   // the ownerhip. If the operation fails, the file will be closed.
-  // TODO(grunell): Remove when Chromium has started to use AEC in each source.
-  // http://crbug.com/264611.
-  virtual bool StartAecDump(rtc::PlatformFile file) = 0;
+  // A maximum file size in bytes can be specified. When the file size limit is
+  // reached, logging is stopped automatically. If max_size_bytes is set to a
+  // value <= 0, no limit will be used, and logging will continue until the
+  // StopAecDump function is called.
+  virtual bool StartAecDump(rtc::PlatformFile file, int64_t max_size_bytes) = 0;
 
   // Stops logging the AEC dump.
   virtual void StopAecDump() = 0;