Move optional.h to webrtc/api/
We use Optional in our public API, so its header should be in
webrtc/api/.
BUG=webrtc:8205
Review-Url: https://codereview.webrtc.org/3011943002
Cr-Commit-Position: refs/heads/master@{#19693}
diff --git a/webrtc/modules/audio_processing/BUILD.gn b/webrtc/modules/audio_processing/BUILD.gn
index e0719b4..4887250 100644
--- a/webrtc/modules/audio_processing/BUILD.gn
+++ b/webrtc/modules/audio_processing/BUILD.gn
@@ -238,6 +238,7 @@
"..:module_api",
"../..:webrtc_common",
"../../api:array_view",
+ "../../api:optional",
"../../audio/utility:audio_frame_operations",
"../../rtc_base:gtest_prod",
"../../rtc_base:protobuf_utils",
@@ -553,6 +554,7 @@
"..:module_api",
"../..:webrtc_common",
"../../api:array_view",
+ "../../api:optional",
"../../common_audio:common_audio",
"../../rtc_base:gtest_prod",
"../../rtc_base:protobuf_utils",
@@ -747,6 +749,7 @@
":audioproc_debug_proto",
":audioproc_protobuf_utils",
":audioproc_test_utils",
+ "../../api:optional",
"../../common_audio:common_audio",
"../../rtc_base:protobuf_utils",
"../../rtc_base:rtc_base_approved",
@@ -778,6 +781,7 @@
":audio_processing",
"..:module_api",
"../../api:array_view",
+ "../../api:optional",
"../../common_audio",
"../../rtc_base:rtc_base_approved",
"../../system_wrappers:system_wrappers",
diff --git a/webrtc/modules/audio_processing/aec3/aec_state.h b/webrtc/modules/audio_processing/aec3/aec_state.h
index 8dc4530..38ed3b0 100644
--- a/webrtc/modules/audio_processing/aec3/aec_state.h
+++ b/webrtc/modules/audio_processing/aec3/aec_state.h
@@ -16,6 +16,7 @@
#include <vector>
#include "webrtc/api/array_view.h"
+#include "webrtc/api/optional.h"
#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
#include "webrtc/modules/audio_processing/aec3/echo_path_variability.h"
#include "webrtc/modules/audio_processing/aec3/erl_estimator.h"
@@ -23,7 +24,6 @@
#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/optional.h"
namespace webrtc {
diff --git a/webrtc/modules/audio_processing/aec3/block_processor.cc b/webrtc/modules/audio_processing/aec3/block_processor.cc
index 536335e..7bb9e15 100644
--- a/webrtc/modules/audio_processing/aec3/block_processor.cc
+++ b/webrtc/modules/audio_processing/aec3/block_processor.cc
@@ -9,13 +9,13 @@
*/
#include "webrtc/modules/audio_processing/aec3/block_processor.h"
+#include "webrtc/api/optional.h"
#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
#include "webrtc/modules/audio_processing/aec3/block_processor_metrics.h"
#include "webrtc/modules/audio_processing/aec3/echo_path_variability.h"
#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
#include "webrtc/rtc_base/atomicops.h"
#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/optional.h"
namespace webrtc {
namespace {
diff --git a/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.h b/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.h
index 4b536b9..7ff1cb3 100644
--- a/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.h
+++ b/webrtc/modules/audio_processing/aec3/echo_path_delay_estimator.h
@@ -13,13 +13,13 @@
#include <vector>
+#include "webrtc/api/optional.h"
#include "webrtc/modules/audio_processing/aec3/decimator_by_4.h"
#include "webrtc/modules/audio_processing/aec3/downsampled_render_buffer.h"
#include "webrtc/modules/audio_processing/aec3/matched_filter.h"
#include "webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/optional.h"
namespace webrtc {
diff --git a/webrtc/modules/audio_processing/aec3/echo_remover.h b/webrtc/modules/audio_processing/aec3/echo_remover.h
index ce43fa8..8a28729 100644
--- a/webrtc/modules/audio_processing/aec3/echo_remover.h
+++ b/webrtc/modules/audio_processing/aec3/echo_remover.h
@@ -13,10 +13,10 @@
#include <vector>
+#include "webrtc/api/optional.h"
#include "webrtc/modules/audio_processing/aec3/echo_path_variability.h"
#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
-#include "webrtc/rtc_base/optional.h"
namespace webrtc {
diff --git a/webrtc/modules/audio_processing/aec3/matched_filter.h b/webrtc/modules/audio_processing/aec3/matched_filter.h
index 0702a12..a200af1 100644
--- a/webrtc/modules/audio_processing/aec3/matched_filter.h
+++ b/webrtc/modules/audio_processing/aec3/matched_filter.h
@@ -15,10 +15,10 @@
#include <memory>
#include <vector>
+#include "webrtc/api/optional.h"
#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
#include "webrtc/modules/audio_processing/aec3/downsampled_render_buffer.h"
#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/optional.h"
namespace webrtc {
namespace aec3 {
diff --git a/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.h b/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.h
index 983ae3b..d490f0d 100644
--- a/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.h
+++ b/webrtc/modules/audio_processing/aec3/matched_filter_lag_aggregator.h
@@ -13,9 +13,9 @@
#include <vector>
+#include "webrtc/api/optional.h"
#include "webrtc/modules/audio_processing/aec3/matched_filter.h"
#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/optional.h"
namespace webrtc {
diff --git a/webrtc/modules/audio_processing/aec3/mock/mock_echo_remover.h b/webrtc/modules/audio_processing/aec3/mock/mock_echo_remover.h
index 008fca6..8d2aca9 100644
--- a/webrtc/modules/audio_processing/aec3/mock/mock_echo_remover.h
+++ b/webrtc/modules/audio_processing/aec3/mock/mock_echo_remover.h
@@ -13,10 +13,10 @@
#include <vector>
+#include "webrtc/api/optional.h"
#include "webrtc/modules/audio_processing/aec3/echo_path_variability.h"
#include "webrtc/modules/audio_processing/aec3/echo_remover.h"
#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
-#include "webrtc/rtc_base/optional.h"
#include "webrtc/test/gmock.h"
namespace webrtc {
diff --git a/webrtc/modules/audio_processing/aec3/mock/mock_render_delay_controller.h b/webrtc/modules/audio_processing/aec3/mock/mock_render_delay_controller.h
index 46a59dc..64daef5 100644
--- a/webrtc/modules/audio_processing/aec3/mock/mock_render_delay_controller.h
+++ b/webrtc/modules/audio_processing/aec3/mock/mock_render_delay_controller.h
@@ -12,9 +12,9 @@
#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_MOCK_MOCK_RENDER_DELAY_CONTROLLER_H_
#include "webrtc/api/array_view.h"
+#include "webrtc/api/optional.h"
#include "webrtc/modules/audio_processing/aec3/downsampled_render_buffer.h"
#include "webrtc/modules/audio_processing/aec3/render_delay_controller.h"
-#include "webrtc/rtc_base/optional.h"
#include "webrtc/test/gmock.h"
namespace webrtc {
diff --git a/webrtc/modules/audio_processing/aec3/render_delay_controller.h b/webrtc/modules/audio_processing/aec3/render_delay_controller.h
index c1e2229..e840178 100644
--- a/webrtc/modules/audio_processing/aec3/render_delay_controller.h
+++ b/webrtc/modules/audio_processing/aec3/render_delay_controller.h
@@ -12,11 +12,11 @@
#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_H_
#include "webrtc/api/array_view.h"
+#include "webrtc/api/optional.h"
#include "webrtc/modules/audio_processing/aec3/downsampled_render_buffer.h"
#include "webrtc/modules/audio_processing/aec3/render_delay_buffer.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
-#include "webrtc/rtc_base/optional.h"
namespace webrtc {
diff --git a/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.h b/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.h
index 0cef897..625f30f 100644
--- a/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.h
+++ b/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.h
@@ -11,8 +11,8 @@
#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_METRICS_H_
#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC3_RENDER_DELAY_CONTROLLER_METRICS_H_
+#include "webrtc/api/optional.h"
#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/optional.h"
namespace webrtc {
diff --git a/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics_unittest.cc b/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics_unittest.cc
index 5f24fe3..bb39e77 100644
--- a/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics_unittest.cc
+++ b/webrtc/modules/audio_processing/aec3/render_delay_controller_metrics_unittest.cc
@@ -9,8 +9,8 @@
*/
#include "webrtc/modules/audio_processing/aec3/render_delay_controller_metrics.h"
+#include "webrtc/api/optional.h"
#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
-#include "webrtc/rtc_base/optional.h"
#include "webrtc/test/gtest.h"
diff --git a/webrtc/modules/audio_processing/aec3/render_signal_analyzer.h b/webrtc/modules/audio_processing/aec3/render_signal_analyzer.h
index b0b56cd..48ce81e 100644
--- a/webrtc/modules/audio_processing/aec3/render_signal_analyzer.h
+++ b/webrtc/modules/audio_processing/aec3/render_signal_analyzer.h
@@ -14,10 +14,10 @@
#include <array>
#include <memory>
+#include "webrtc/api/optional.h"
#include "webrtc/modules/audio_processing/aec3/aec3_common.h"
#include "webrtc/modules/audio_processing/aec3/render_buffer.h"
#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/optional.h"
namespace webrtc {
diff --git a/webrtc/modules/audio_processing/beamformer/array_util.h b/webrtc/modules/audio_processing/beamformer/array_util.h
index bfb9dfd..aa18e71 100644
--- a/webrtc/modules/audio_processing/beamformer/array_util.h
+++ b/webrtc/modules/audio_processing/beamformer/array_util.h
@@ -14,7 +14,7 @@
#include <cmath>
#include <vector>
-#include "webrtc/rtc_base/optional.h"
+#include "webrtc/api/optional.h"
namespace webrtc {
diff --git a/webrtc/modules/audio_processing/echo_detector/circular_buffer.h b/webrtc/modules/audio_processing/echo_detector/circular_buffer.h
index 9fadb0d..cf58e33 100644
--- a/webrtc/modules/audio_processing/echo_detector/circular_buffer.h
+++ b/webrtc/modules/audio_processing/echo_detector/circular_buffer.h
@@ -13,7 +13,7 @@
#include <vector>
-#include "webrtc/rtc_base/optional.h"
+#include "webrtc/api/optional.h"
namespace webrtc {
diff --git a/webrtc/modules/audio_processing/gain_control_impl.cc b/webrtc/modules/audio_processing/gain_control_impl.cc
index e576018..f882d10 100644
--- a/webrtc/modules/audio_processing/gain_control_impl.cc
+++ b/webrtc/modules/audio_processing/gain_control_impl.cc
@@ -10,11 +10,11 @@
#include "webrtc/modules/audio_processing/gain_control_impl.h"
+#include "webrtc/api/optional.h"
#include "webrtc/modules/audio_processing/agc/legacy/gain_control.h"
#include "webrtc/modules/audio_processing/audio_buffer.h"
#include "webrtc/modules/audio_processing/logging/apm_data_dumper.h"
#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/optional.h"
namespace webrtc {
diff --git a/webrtc/modules/audio_processing/level_controller/level_controller.h b/webrtc/modules/audio_processing/level_controller/level_controller.h
index e04620f..9aa5085 100644
--- a/webrtc/modules/audio_processing/level_controller/level_controller.h
+++ b/webrtc/modules/audio_processing/level_controller/level_controller.h
@@ -14,6 +14,7 @@
#include <memory>
#include <vector>
+#include "webrtc/api/optional.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
#include "webrtc/modules/audio_processing/level_controller/gain_applier.h"
#include "webrtc/modules/audio_processing/level_controller/gain_selector.h"
@@ -22,7 +23,6 @@
#include "webrtc/modules/audio_processing/level_controller/saturating_gain_estimator.h"
#include "webrtc/modules/audio_processing/level_controller/signal_classifier.h"
#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/optional.h"
namespace webrtc {
diff --git a/webrtc/modules/audio_processing/level_controller/level_controller_unittest.cc b/webrtc/modules/audio_processing/level_controller/level_controller_unittest.cc
index b7571e9..d37b580 100644
--- a/webrtc/modules/audio_processing/level_controller/level_controller_unittest.cc
+++ b/webrtc/modules/audio_processing/level_controller/level_controller_unittest.cc
@@ -11,12 +11,12 @@
#include <vector>
#include "webrtc/api/array_view.h"
+#include "webrtc/api/optional.h"
#include "webrtc/modules/audio_processing/audio_buffer.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
#include "webrtc/modules/audio_processing/level_controller/level_controller.h"
#include "webrtc/modules/audio_processing/test/audio_buffer_tools.h"
#include "webrtc/modules/audio_processing/test/bitexactness_tools.h"
-#include "webrtc/rtc_base/optional.h"
#include "webrtc/test/gtest.h"
namespace webrtc {
diff --git a/webrtc/modules/audio_processing/rms_level.h b/webrtc/modules/audio_processing/rms_level.h
index 4ce28a4..e0df754 100644
--- a/webrtc/modules/audio_processing/rms_level.h
+++ b/webrtc/modules/audio_processing/rms_level.h
@@ -12,7 +12,7 @@
#define WEBRTC_MODULES_AUDIO_PROCESSING_RMS_LEVEL_H_
#include "webrtc/api/array_view.h"
-#include "webrtc/rtc_base/optional.h"
+#include "webrtc/api/optional.h"
#include "webrtc/typedefs.h"
namespace webrtc {
diff --git a/webrtc/modules/audio_processing/test/audio_processing_simulator.h b/webrtc/modules/audio_processing/test/audio_processing_simulator.h
index 1ae465c..8a2295f 100644
--- a/webrtc/modules/audio_processing/test/audio_processing_simulator.h
+++ b/webrtc/modules/audio_processing/test/audio_processing_simulator.h
@@ -17,11 +17,11 @@
#include <memory>
#include <string>
+#include "webrtc/api/optional.h"
#include "webrtc/common_audio/channel_buffer.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
#include "webrtc/modules/audio_processing/test/test_utils.h"
#include "webrtc/rtc_base/constructormagic.h"
-#include "webrtc/rtc_base/optional.h"
#include "webrtc/rtc_base/task_queue.h"
#include "webrtc/rtc_base/timeutils.h"
diff --git a/webrtc/modules/audio_processing/test/conversational_speech/BUILD.gn b/webrtc/modules/audio_processing/test/conversational_speech/BUILD.gn
index 1f24c09..1d492bf 100644
--- a/webrtc/modules/audio_processing/test/conversational_speech/BUILD.gn
+++ b/webrtc/modules/audio_processing/test/conversational_speech/BUILD.gn
@@ -65,6 +65,7 @@
":lib",
"../../../..:webrtc_common",
"../../../../api:array_view",
+ "../../../../api:optional",
"../../../../common_audio",
"../../../../rtc_base:rtc_base_approved",
"../../../../test:test_support",
diff --git a/webrtc/modules/audio_processing/test/conversational_speech/generator_unittest.cc b/webrtc/modules/audio_processing/test/conversational_speech/generator_unittest.cc
index 9a52e5c..e0aa43d 100644
--- a/webrtc/modules/audio_processing/test/conversational_speech/generator_unittest.cc
+++ b/webrtc/modules/audio_processing/test/conversational_speech/generator_unittest.cc
@@ -42,6 +42,7 @@
#include <memory>
#include <vector>
+#include "webrtc/api/optional.h"
#include "webrtc/common_audio/wav_file.h"
#include "webrtc/modules/audio_processing/test/conversational_speech/config.h"
#include "webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.h"
@@ -50,7 +51,6 @@
#include "webrtc/modules/audio_processing/test/conversational_speech/timing.h"
#include "webrtc/modules/audio_processing/test/conversational_speech/wavreader_factory.h"
#include "webrtc/rtc_base/logging.h"
-#include "webrtc/rtc_base/optional.h"
#include "webrtc/rtc_base/pathutils.h"
#include "webrtc/test/gmock.h"
#include "webrtc/test/gtest.h"
diff --git a/webrtc/modules/audio_processing/test/performance_timer.h b/webrtc/modules/audio_processing/test/performance_timer.h
index 3e75e3f..9377f4a 100644
--- a/webrtc/modules/audio_processing/test/performance_timer.h
+++ b/webrtc/modules/audio_processing/test/performance_timer.h
@@ -13,7 +13,7 @@
#include <vector>
-#include "webrtc/rtc_base/optional.h"
+#include "webrtc/api/optional.h"
#include "webrtc/system_wrappers/include/clock.h"
namespace webrtc {