Move swap_queue.h to base/

This will let us use the SwapQueue as a message queue for the event log's output thread. See https://codereview.webrtc.org/1687703002/

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

Cr-Commit-Position: refs/heads/master@{#12113}
diff --git a/webrtc/base/BUILD.gn b/webrtc/base/BUILD.gn
index d1ff2fb..6f926a2 100644
--- a/webrtc/base/BUILD.gn
+++ b/webrtc/base/BUILD.gn
@@ -151,6 +151,7 @@
     "stringencode.h",
     "stringutils.cc",
     "stringutils.h",
+    "swap_queue.h",
     "systeminfo.cc",
     "systeminfo.h",
     "template_util.h",
diff --git a/webrtc/base/base.gyp b/webrtc/base/base.gyp
index 8f2e72e..f9b1eb2 100644
--- a/webrtc/base/base.gyp
+++ b/webrtc/base/base.gyp
@@ -128,6 +128,7 @@
         'stringencode.h',
         'stringutils.cc',
         'stringutils.h',
+        'swap_queue.h',
         'systeminfo.cc',
         'systeminfo.h',
         'template_util.h',
diff --git a/webrtc/base/base_tests.gyp b/webrtc/base/base_tests.gyp
index 2467b74..caef35c 100644
--- a/webrtc/base/base_tests.gyp
+++ b/webrtc/base/base_tests.gyp
@@ -103,6 +103,7 @@
           'stream_unittest.cc',
           'stringencode_unittest.cc',
           'stringutils_unittest.cc',
+          'swap_queue_unittest.cc',
           # TODO(ronghuawu): Reenable this test.
           # 'systeminfo_unittest.cc',
           'task_unittest.cc',
diff --git a/webrtc/common_audio/swap_queue.h b/webrtc/base/swap_queue.h
similarity index 97%
rename from webrtc/common_audio/swap_queue.h
rename to webrtc/base/swap_queue.h
index d8bb5c0..d3af225 100644
--- a/webrtc/common_audio/swap_queue.h
+++ b/webrtc/base/swap_queue.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef WEBRTC_COMMON_AUDIO_SWAP_QUEUE_H_
-#define WEBRTC_COMMON_AUDIO_SWAP_QUEUE_H_
+#ifndef WEBRTC_BASE_SWAP_QUEUE_H_
+#define WEBRTC_BASE_SWAP_QUEUE_H_
 
 #include <algorithm>
 #include <utility>
@@ -207,4 +207,4 @@
 
 }  // namespace webrtc
 
-#endif  // WEBRTC_COMMON_AUDIO_SWAP_QUEUE_H_
+#endif  // WEBRTC_BASE_SWAP_QUEUE_H_
diff --git a/webrtc/common_audio/swap_queue_unittest.cc b/webrtc/base/swap_queue_unittest.cc
similarity index 98%
rename from webrtc/common_audio/swap_queue_unittest.cc
rename to webrtc/base/swap_queue_unittest.cc
index 104e494..21eb212 100644
--- a/webrtc/common_audio/swap_queue_unittest.cc
+++ b/webrtc/base/swap_queue_unittest.cc
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "webrtc/common_audio/swap_queue.h"
+#include "webrtc/base/swap_queue.h"
 
 #include <vector>
 
diff --git a/webrtc/common_audio/BUILD.gn b/webrtc/common_audio/BUILD.gn
index b4ec1d7..b01b318 100644
--- a/webrtc/common_audio/BUILD.gn
+++ b/webrtc/common_audio/BUILD.gn
@@ -87,7 +87,6 @@
     "signal_processing/vector_scaling_operations.c",
     "sparse_fir_filter.cc",
     "sparse_fir_filter.h",
-    "swap_queue.h",
     "vad/include/vad.h",
     "vad/include/webrtc_vad.h",
     "vad/vad.cc",
diff --git a/webrtc/common_audio/common_audio.gyp b/webrtc/common_audio/common_audio.gyp
index ca1589a..57d9f1c 100644
--- a/webrtc/common_audio/common_audio.gyp
+++ b/webrtc/common_audio/common_audio.gyp
@@ -101,7 +101,6 @@
         'signal_processing/vector_scaling_operations.c',
         'sparse_fir_filter.cc',
         'sparse_fir_filter.h',
-        'swap_queue.h',
         'vad/include/vad.h',
         'vad/include/webrtc_vad.h',
         'vad/vad.cc',
@@ -256,7 +255,6 @@
             'signal_processing/real_fft_unittest.cc',
             'signal_processing/signal_processing_unittest.cc',
             'sparse_fir_filter_unittest.cc',
-            'swap_queue_unittest.cc',
             'vad/vad_core_unittest.cc',
             'vad/vad_filterbank_unittest.cc',
             'vad/vad_gmm_unittest.cc',
diff --git a/webrtc/modules/audio_processing/echo_cancellation_impl.h b/webrtc/modules/audio_processing/echo_cancellation_impl.h
index f196bca..b91d23d 100644
--- a/webrtc/modules/audio_processing/echo_cancellation_impl.h
+++ b/webrtc/modules/audio_processing/echo_cancellation_impl.h
@@ -12,10 +12,11 @@
 #define WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_
 
 #include <memory>
+#include <vector>
 
 #include "webrtc/base/constructormagic.h"
 #include "webrtc/base/criticalsection.h"
-#include "webrtc/common_audio/swap_queue.h"
+#include "webrtc/base/swap_queue.h"
 #include "webrtc/modules/audio_processing/include/audio_processing.h"
 #include "webrtc/modules/audio_processing/render_queue_item_verifier.h"
 
diff --git a/webrtc/modules/audio_processing/echo_control_mobile_impl.h b/webrtc/modules/audio_processing/echo_control_mobile_impl.h
index b86af72..c59a696 100644
--- a/webrtc/modules/audio_processing/echo_control_mobile_impl.h
+++ b/webrtc/modules/audio_processing/echo_control_mobile_impl.h
@@ -12,10 +12,11 @@
 #define WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_
 
 #include <memory>
+#include <vector>
 
 #include "webrtc/base/constructormagic.h"
 #include "webrtc/base/criticalsection.h"
-#include "webrtc/common_audio/swap_queue.h"
+#include "webrtc/base/swap_queue.h"
 #include "webrtc/modules/audio_processing/include/audio_processing.h"
 #include "webrtc/modules/audio_processing/render_queue_item_verifier.h"
 
diff --git a/webrtc/modules/audio_processing/gain_control_impl.h b/webrtc/modules/audio_processing/gain_control_impl.h
index 6841d5d..a7e7874 100644
--- a/webrtc/modules/audio_processing/gain_control_impl.h
+++ b/webrtc/modules/audio_processing/gain_control_impl.h
@@ -16,8 +16,8 @@
 
 #include "webrtc/base/constructormagic.h"
 #include "webrtc/base/criticalsection.h"
+#include "webrtc/base/swap_queue.h"
 #include "webrtc/base/thread_annotations.h"
-#include "webrtc/common_audio/swap_queue.h"
 #include "webrtc/modules/audio_processing/include/audio_processing.h"
 #include "webrtc/modules/audio_processing/render_queue_item_verifier.h"
 
diff --git a/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h b/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h
index 940b9c5..1413212 100644
--- a/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h
+++ b/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h
@@ -15,9 +15,9 @@
 #include <memory>
 #include <vector>
 
+#include "webrtc/base/swap_queue.h"
 #include "webrtc/common_audio/lapped_transform.h"
 #include "webrtc/common_audio/channel_buffer.h"
-#include "webrtc/common_audio/swap_queue.h"
 #include "webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h"
 #include "webrtc/modules/audio_processing/render_queue_item_verifier.h"
 #include "webrtc/modules/audio_processing/vad/voice_activity_detector.h"