Remove rtc_base/scoped_ref_ptr.h.

The type rtc::scoped_refptr<T> is now part of api/. Please include it from
api/scoped_refptr.h.

More info: See: https://groups.google.com/forum/#!topic/discuss-webrtc/Mme2MSz4z4o.

Bug: webrtc:9887, webrtc:8205
No-Try: True
Change-Id: Ic6c7c81e226e59f12f7933e472f573ae097b55bf
Reviewed-on: https://webrtc-review.googlesource.com/c/119041
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26414}
diff --git a/test/BUILD.gn b/test/BUILD.gn
index fad00e2..6165b95 100644
--- a/test/BUILD.gn
+++ b/test/BUILD.gn
@@ -62,6 +62,7 @@
   deps = [
     "..:webrtc_common",
     "../api:libjingle_peerconnection_api",
+    "../api:scoped_refptr",
     "../api/video:video_frame",
     "../api/video:video_frame_i010",
     "../api/video:video_frame_i420",
@@ -347,6 +348,7 @@
       ":video_test_common",
       ":video_test_support",
       "../api:create_simulcast_test_fixture_api",
+      "../api:scoped_refptr",
       "../api:simulcast_test_fixture_api",
       "../api/test/video:function_video_factory",
       "../api/video:builtin_video_bitrate_allocator_factory",
@@ -628,6 +630,7 @@
   }
   deps = [
     "..:webrtc_common",
+    "../api:scoped_refptr",
     "../api/video:encoded_image",
     "../api/video:video_bitrate_allocation",
     "../api/video:video_frame",
@@ -703,6 +706,7 @@
     ":video_test_common",
     "../:webrtc_common",
     "../api:libjingle_peerconnection_api",
+    "../api:scoped_refptr",
     "../api:simulated_network_api",
     "../api:transport_api",
     "../api/audio_codecs:builtin_audio_decoder_factory",
@@ -803,6 +807,7 @@
   deps = [
     ":test_support",
     "..:webrtc_common",
+    "../api:scoped_refptr",
     "../api/video:video_frame",
     "../common_video",
     "../media:rtc_media_base",
@@ -863,6 +868,7 @@
   deps = [
     ":test_support",
     "../api:array_view",
+    "../api:scoped_refptr",
     "../api/audio_codecs:audio_codecs_api",
     "../api/audio_codecs:builtin_audio_decoder_factory",
     "../rtc_base:checks",
diff --git a/test/encoder_settings.cc b/test/encoder_settings.cc
index e576cc4..cc1994f 100644
--- a/test/encoder_settings.cc
+++ b/test/encoder_settings.cc
@@ -12,11 +12,11 @@
 #include <algorithm>
 #include <string>
 
+#include "api/scoped_refptr.h"
 #include "api/video_codecs/sdp_video_format.h"
 #include "call/rtp_config.h"
 #include "rtc_base/checks.h"
 #include "rtc_base/ref_counted_object.h"
-#include "rtc_base/scoped_ref_ptr.h"
 
 namespace webrtc {
 namespace test {
diff --git a/test/fake_decoder.cc b/test/fake_decoder.cc
index 865bca7..70fe085 100644
--- a/test/fake_decoder.cc
+++ b/test/fake_decoder.cc
@@ -12,13 +12,13 @@
 
 #include <string.h>
 
+#include "api/scoped_refptr.h"
 #include "api/video/i420_buffer.h"
 #include "api/video/video_frame.h"
 #include "api/video/video_frame_buffer.h"
 #include "api/video/video_rotation.h"
 #include "modules/video_coding/include/video_error_codes.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/scoped_ref_ptr.h"
 #include "rtc_base/time_utils.h"
 
 namespace webrtc {
diff --git a/test/fake_vp8_decoder.cc b/test/fake_vp8_decoder.cc
index ae030a71..7a244ca 100644
--- a/test/fake_vp8_decoder.cc
+++ b/test/fake_vp8_decoder.cc
@@ -13,12 +13,12 @@
 #include <stddef.h>
 
 #include "absl/types/optional.h"
+#include "api/scoped_refptr.h"
 #include "api/video/i420_buffer.h"
 #include "api/video/video_frame.h"
 #include "api/video/video_frame_buffer.h"
 #include "api/video/video_rotation.h"
 #include "modules/video_coding/include/video_error_codes.h"
-#include "rtc_base/scoped_ref_ptr.h"
 #include "rtc_base/time_utils.h"
 
 namespace webrtc {
diff --git a/test/frame_generator.cc b/test/frame_generator.cc
index e37e823..68abede 100644
--- a/test/frame_generator.cc
+++ b/test/frame_generator.cc
@@ -15,6 +15,7 @@
 #include <memory>
 
 #include "absl/memory/memory.h"
+#include "api/scoped_refptr.h"
 #include "api/video/i010_buffer.h"
 #include "api/video/i420_buffer.h"
 #include "api/video/video_frame_buffer.h"
@@ -26,7 +27,6 @@
 #include "rtc_base/checks.h"
 #include "rtc_base/keep_ref_until_done.h"
 #include "rtc_base/random.h"
-#include "rtc_base/scoped_ref_ptr.h"
 #include "system_wrappers/include/clock.h"
 #include "test/frame_utils.h"
 
diff --git a/test/frame_generator_unittest.cc b/test/frame_generator_unittest.cc
index fa6da9a..599eac9 100644
--- a/test/frame_generator_unittest.cc
+++ b/test/frame_generator_unittest.cc
@@ -15,8 +15,8 @@
 #include <memory>
 #include <string>
 
+#include "api/scoped_refptr.h"
 #include "api/video/video_frame_buffer.h"
-#include "rtc_base/scoped_ref_ptr.h"
 #include "test/frame_generator.h"
 #include "test/gtest.h"
 #include "test/testsupport/file_utils.h"
diff --git a/test/frame_utils.h b/test/frame_utils.h
index c829311..9351584 100644
--- a/test/frame_utils.h
+++ b/test/frame_utils.h
@@ -12,7 +12,7 @@
 
 #include <stdint.h>
 
-#include "rtc_base/scoped_ref_ptr.h"
+#include "api/scoped_refptr.h"
 
 namespace webrtc {
 class I420Buffer;
diff --git a/test/fuzzers/BUILD.gn b/test/fuzzers/BUILD.gn
index f78669a..797c27d 100644
--- a/test/fuzzers/BUILD.gn
+++ b/test/fuzzers/BUILD.gn
@@ -121,6 +121,7 @@
     "forward_error_correction_fuzzer.cc",
   ]
   deps = [
+    "../../api:scoped_refptr",
     "../../modules/rtp_rtcp",
     "../../modules/rtp_rtcp:rtp_rtcp_format",
     "../../rtc_base:rtc_base_approved",
@@ -132,6 +133,7 @@
     "flexfec_header_reader_fuzzer.cc",
   ]
   deps = [
+    "../../api:scoped_refptr",
     "../../modules/rtp_rtcp",
     "../../modules/rtp_rtcp:rtp_rtcp_format",
     "../../rtc_base:rtc_base_approved",
@@ -154,6 +156,7 @@
     "ulpfec_header_reader_fuzzer.cc",
   ]
   deps = [
+    "../../api:scoped_refptr",
     "../../modules/rtp_rtcp",
     "../../modules/rtp_rtcp:fec_test_helper",
     "../../modules/rtp_rtcp:rtp_rtcp_format",
@@ -482,13 +485,13 @@
   ]
   deps = [
     ":audio_processing_fuzzer_helper",
+    "../../api:scoped_refptr",
     "../../api/audio:aec3_factory",
     "../../modules/audio_processing",
     "../../modules/audio_processing:api",
     "../../modules/audio_processing/aec3",
     "../../modules/audio_processing/aec_dump",
     "../../modules/audio_processing/aec_dump:aec_dump_impl",
-    "../../rtc_base:ptr_util",
     "../../rtc_base:rtc_base_approved",
     "../../rtc_base:rtc_task_queue",
     "../../rtc_base:safe_minmax",
@@ -530,8 +533,8 @@
     "rtp_frame_reference_finder_fuzzer.cc",
   ]
   deps = [
+    "../../api:scoped_refptr",
     "../../modules/video_coding/",
-    "../../rtc_base:ptr_util",
     "../../system_wrappers",
     "//third_party/abseil-cpp/absl/memory",
   ]
diff --git a/test/fuzzers/flexfec_header_reader_fuzzer.cc b/test/fuzzers/flexfec_header_reader_fuzzer.cc
index a5694ea..c887d2e 100644
--- a/test/fuzzers/flexfec_header_reader_fuzzer.cc
+++ b/test/fuzzers/flexfec_header_reader_fuzzer.cc
@@ -10,10 +10,10 @@
 
 #include <algorithm>
 
+#include "api/scoped_refptr.h"
 #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
 #include "modules/rtp_rtcp/source/flexfec_header_reader_writer.h"
 #include "modules/rtp_rtcp/source/forward_error_correction.h"
-#include "rtc_base/scoped_ref_ptr.h"
 
 namespace webrtc {
 
diff --git a/test/fuzzers/forward_error_correction_fuzzer.cc b/test/fuzzers/forward_error_correction_fuzzer.cc
index 1385e54..1c37889 100644
--- a/test/fuzzers/forward_error_correction_fuzzer.cc
+++ b/test/fuzzers/forward_error_correction_fuzzer.cc
@@ -10,10 +10,10 @@
 
 #include <memory>
 
+#include "api/scoped_refptr.h"
 #include "modules/rtp_rtcp/source/byte_io.h"
 #include "modules/rtp_rtcp/source/forward_error_correction.h"
 #include "rtc_base/byte_buffer.h"
-#include "rtc_base/scoped_ref_ptr.h"
 
 namespace webrtc {
 
diff --git a/test/fuzzers/ulpfec_header_reader_fuzzer.cc b/test/fuzzers/ulpfec_header_reader_fuzzer.cc
index 6a6394f..46fe67b 100644
--- a/test/fuzzers/ulpfec_header_reader_fuzzer.cc
+++ b/test/fuzzers/ulpfec_header_reader_fuzzer.cc
@@ -10,10 +10,10 @@
 
 #include <algorithm>
 
+#include "api/scoped_refptr.h"
 #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
 #include "modules/rtp_rtcp/source/forward_error_correction.h"
 #include "modules/rtp_rtcp/source/ulpfec_header_reader_writer.h"
-#include "rtc_base/scoped_ref_ptr.h"
 
 namespace webrtc {
 
diff --git a/test/mock_audio_decoder_factory.h b/test/mock_audio_decoder_factory.h
index b54e109..e38b1d2 100644
--- a/test/mock_audio_decoder_factory.h
+++ b/test/mock_audio_decoder_factory.h
@@ -16,8 +16,8 @@
 
 #include "api/audio_codecs/audio_decoder_factory.h"
 #include "api/audio_codecs/builtin_audio_decoder_factory.h"
+#include "api/scoped_refptr.h"
 #include "rtc_base/ref_counted_object.h"
-#include "rtc_base/scoped_ref_ptr.h"
 #include "test/gmock.h"
 
 namespace webrtc {
diff --git a/test/mock_audio_encoder_factory.h b/test/mock_audio_encoder_factory.h
index 55fe259..373bbb6 100644
--- a/test/mock_audio_encoder_factory.h
+++ b/test/mock_audio_encoder_factory.h
@@ -15,8 +15,8 @@
 #include <vector>
 
 #include "api/audio_codecs/audio_encoder_factory.h"
+#include "api/scoped_refptr.h"
 #include "rtc_base/ref_counted_object.h"
-#include "rtc_base/scoped_ref_ptr.h"
 #include "test/gmock.h"
 
 namespace webrtc {
diff --git a/test/test_video_capturer.cc b/test/test_video_capturer.cc
index ef3d858..fa43f9f 100644
--- a/test/test_video_capturer.cc
+++ b/test/test_video_capturer.cc
@@ -12,10 +12,10 @@
 
 #include <algorithm>
 
+#include "api/scoped_refptr.h"
 #include "api/video/i420_buffer.h"
 #include "api/video/video_frame_buffer.h"
 #include "api/video/video_rotation.h"
-#include "rtc_base/scoped_ref_ptr.h"
 
 namespace webrtc {
 namespace test {
diff --git a/test/testsupport/frame_reader.h b/test/testsupport/frame_reader.h
index 4c0f206..7f313e8 100644
--- a/test/testsupport/frame_reader.h
+++ b/test/testsupport/frame_reader.h
@@ -15,7 +15,7 @@
 
 #include <string>
 
-#include "rtc_base/scoped_ref_ptr.h"
+#include "api/scoped_refptr.h"
 
 namespace webrtc {
 class I420Buffer;
diff --git a/test/testsupport/y4m_frame_reader.cc b/test/testsupport/y4m_frame_reader.cc
index 00ced05..5e50d86 100644
--- a/test/testsupport/y4m_frame_reader.cc
+++ b/test/testsupport/y4m_frame_reader.cc
@@ -11,8 +11,8 @@
 #include <stdio.h>
 #include <string>
 
+#include "api/scoped_refptr.h"
 #include "api/video/i420_buffer.h"
-#include "rtc_base/scoped_ref_ptr.h"
 #include "test/testsupport/file_utils.h"
 #include "test/testsupport/frame_reader.h"
 
diff --git a/test/testsupport/y4m_frame_reader_unittest.cc b/test/testsupport/y4m_frame_reader_unittest.cc
index 957b88d..72b421d 100644
--- a/test/testsupport/y4m_frame_reader_unittest.cc
+++ b/test/testsupport/y4m_frame_reader_unittest.cc
@@ -14,9 +14,9 @@
 #include <string>
 
 #include "absl/strings/string_view.h"
+#include "api/scoped_refptr.h"
 #include "api/video/i420_buffer.h"
 #include "api/video/video_frame_buffer.h"
-#include "rtc_base/scoped_ref_ptr.h"
 #include "test/gtest.h"
 #include "test/testsupport/file_utils.h"
 #include "test/testsupport/frame_reader.h"
diff --git a/test/testsupport/yuv_frame_reader.cc b/test/testsupport/yuv_frame_reader.cc
index c502ee7..2e788b9 100644
--- a/test/testsupport/yuv_frame_reader.cc
+++ b/test/testsupport/yuv_frame_reader.cc
@@ -11,8 +11,8 @@
 #include <stdio.h>
 #include <string>
 
+#include "api/scoped_refptr.h"
 #include "api/video/i420_buffer.h"
-#include "rtc_base/scoped_ref_ptr.h"
 #include "test/frame_utils.h"
 #include "test/testsupport/file_utils.h"
 #include "test/testsupport/frame_reader.h"
diff --git a/test/testsupport/yuv_frame_reader_unittest.cc b/test/testsupport/yuv_frame_reader_unittest.cc
index cd405f5..9e16307 100644
--- a/test/testsupport/yuv_frame_reader_unittest.cc
+++ b/test/testsupport/yuv_frame_reader_unittest.cc
@@ -13,9 +13,9 @@
 #include <memory>
 #include <string>
 
+#include "api/scoped_refptr.h"
 #include "api/video/i420_buffer.h"
 #include "api/video/video_frame_buffer.h"
-#include "rtc_base/scoped_ref_ptr.h"
 #include "test/gtest.h"
 #include "test/testsupport/file_utils.h"
 #include "test/testsupport/frame_reader.h"
diff --git a/test/vcm_capturer.h b/test/vcm_capturer.h
index 59000ae..5418dc9 100644
--- a/test/vcm_capturer.h
+++ b/test/vcm_capturer.h
@@ -13,8 +13,8 @@
 #include <memory>
 #include <vector>
 
+#include "api/scoped_refptr.h"
 #include "modules/video_capture/video_capture.h"
-#include "rtc_base/scoped_ref_ptr.h"
 #include "test/test_video_capturer.h"
 
 namespace webrtc {
diff --git a/test/win/d3d_renderer.h b/test/win/d3d_renderer.h
index a43be44..9e5e23c3 100644
--- a/test/win/d3d_renderer.h
+++ b/test/win/d3d_renderer.h
@@ -14,7 +14,7 @@
 #include <d3d9.h>
 #pragma comment(lib, "d3d9.lib")  // located in DirectX SDK
 
-#include "rtc_base/scoped_ref_ptr.h"
+#include "api/scoped_refptr.h"
 #include "test/video_renderer.h"
 
 namespace webrtc {