Remove locks from AECM and move it into private_submodules_

This drops the locks and annotations in EchoControlMobileImpl,
now that the interface is no longer externally accessible.

Additionally, SetEchoPath and GetEchoPath (with surrounding code) is
removed. They are unused.

Bug: webrtc:9929
Change-Id: Ibc6751754614ed39836f6ee6835d7b53dedd828c
Reviewed-on: https://webrtc-review.googlesource.com/c/109025
Reviewed-by: Per Ã…hgren <peah@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25504}
diff --git a/modules/audio_processing/echo_control_mobile_impl.h b/modules/audio_processing/echo_control_mobile_impl.h
index 6d49ef7..d5a8b0b 100644
--- a/modules/audio_processing/echo_control_mobile_impl.h
+++ b/modules/audio_processing/echo_control_mobile_impl.h
@@ -17,9 +17,6 @@
 #include <vector>
 
 #include "api/array_view.h"
-#include "rtc_base/constructormagic.h"
-#include "rtc_base/criticalsection.h"
-#include "rtc_base/thread_annotations.h"
 
 namespace webrtc {
 
@@ -29,8 +26,7 @@
 // robust option intended for use on mobile devices.
 class EchoControlMobileImpl {
  public:
-  EchoControlMobileImpl(rtc::CriticalSection* crit_render,
-                        rtc::CriticalSection* crit_capture);
+  EchoControlMobileImpl();
 
   ~EchoControlMobileImpl();
 
@@ -58,26 +54,6 @@
   int enable_comfort_noise(bool enable);
   bool is_comfort_noise_enabled() const;
 
-  // A typical use case is to initialize the component with an echo path from a
-  // previous call. The echo path is retrieved using |GetEchoPath()|, typically
-  // at the end of a call. The data can then be stored for later use as an
-  // initializer before the next call, using |SetEchoPath()|.
-  //
-  // Controlling the echo path this way requires the data |size_bytes| to match
-  // the internal echo path size. This size can be acquired using
-  // |echo_path_size_bytes()|. |SetEchoPath()| causes an entire reset, worth
-  // noting if it is to be called during an ongoing call.
-  //
-  // It is possible that version incompatibilities may result in a stored echo
-  // path of the incorrect size. In this case, the stored path should be
-  // discarded.
-  int SetEchoPath(const void* echo_path, size_t size_bytes);
-  int GetEchoPath(void* echo_path, size_t size_bytes) const;
-
-  // The returned path size is guaranteed not to change for the lifetime of
-  // the application.
-  static size_t echo_path_size_bytes();
-
   void ProcessRenderAudio(rtc::ArrayView<const int16_t> packed_render_audio);
   int ProcessCaptureAudio(AudioBuffer* audio, int stream_delay_ms);
 
@@ -99,20 +75,13 @@
 
   int Configure();
 
-  rtc::CriticalSection* const crit_render_ RTC_ACQUIRED_BEFORE(crit_capture_);
-  rtc::CriticalSection* const crit_capture_;
-
   bool enabled_ = false;
 
-  RoutingMode routing_mode_ RTC_GUARDED_BY(crit_capture_);
-  bool comfort_noise_enabled_ RTC_GUARDED_BY(crit_capture_);
-  unsigned char* external_echo_path_ RTC_GUARDED_BY(crit_render_)
-      RTC_GUARDED_BY(crit_capture_);
+  RoutingMode routing_mode_;
+  bool comfort_noise_enabled_;
 
   std::vector<std::unique_ptr<Canceller>> cancellers_;
   std::unique_ptr<StreamProperties> stream_properties_;
-
-  RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(EchoControlMobileImpl);
 };
 }  // namespace webrtc