Skip to content

Commit

Permalink
Remove rtc::{Make,Wrap}Unique and their header file + unit tests
Browse files Browse the repository at this point in the history
We've switched to absl::make_unique and absl::WrapUnique.

Bug: webrtc:9473
Change-Id: I08aef72d52b571c511c0f4adb4c68d6cc2654192
Reviewed-on: https://webrtc-review.googlesource.com/87262
Commit-Queue: Karl Wiberg <[email protected]>
Reviewed-by: Mirko Bonadei <[email protected]>
Cr-Commit-Position: refs/heads/master@{#24225}
  • Loading branch information
Karl Wiberg authored and Commit Bot committed Aug 8, 2018
1 parent 58d2a5e commit c234203
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 118 deletions.
1 change: 1 addition & 0 deletions api/video/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,6 @@ rtc_source_set("video_stream_encoder_create") {
"../../rtc_base:ptr_util",
"../../video:video_stream_encoder_impl",
"../video_codecs:video_codecs_api",
"//third_party/abseil-cpp/absl/memory",
]
}
6 changes: 3 additions & 3 deletions api/video/video_stream_encoder_create.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include "api/video/video_stream_encoder_create.h"

#include "rtc_base/ptr_util.h"
#include "absl/memory/memory.h"
#include "video/video_stream_encoder.h"

namespace webrtc {
Expand All @@ -20,8 +20,8 @@ std::unique_ptr<VideoStreamEncoderInterface> CreateVideoStreamEncoder(
const VideoStreamEncoderSettings& settings,
// Deprecated, used for tests only.
rtc::VideoSinkInterface<VideoFrame>* pre_encode_callback) {
return rtc::MakeUnique<VideoStreamEncoder>(
return absl::make_unique<VideoStreamEncoder>(
number_of_cores, encoder_stats_observer, settings, pre_encode_callback,
rtc::MakeUnique<OveruseFrameDetector>(encoder_stats_observer));
absl::make_unique<OveruseFrameDetector>(encoder_stats_observer));
}
} // namespace webrtc
5 changes: 0 additions & 5 deletions rtc_base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,8 @@ rtc_source_set("platform_thread_types") {

rtc_source_set("ptr_util") {
sources = [
"ptr_util.h",
"scoped_ref_ptr.h",
]
deps = [
"//third_party/abseil-cpp/absl/memory",
]
}

rtc_source_set("refcount") {
Expand Down Expand Up @@ -1272,7 +1268,6 @@ if (rtc_include_tests) {
"network_unittest.cc",
"optionsfile_unittest.cc",
"proxy_unittest.cc",
"ptr_util_unittest.cc",
"rollingaccumulator_unittest.cc",
"rtccertificate_unittest.cc",
"rtccertificategenerator_unittest.cc",
Expand Down
38 changes: 0 additions & 38 deletions rtc_base/ptr_util.h

This file was deleted.

69 changes: 0 additions & 69 deletions rtc_base/ptr_util_unittest.cc

This file was deleted.

1 change: 0 additions & 1 deletion sdk/android/src/jni/androidmediadecoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/numerics/safe_conversions.h"
#include "rtc_base/ptr_util.h"
#include "rtc_base/scoped_ref_ptr.h"
#include "rtc_base/thread.h"
#include "rtc_base/timeutils.h"
Expand Down
1 change: 0 additions & 1 deletion sdk/android/src/jni/androidmediaencoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "rtc_base/bind.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/ptr_util.h"
#include "rtc_base/sequenced_task_checker.h"
#include "rtc_base/task_queue.h"
#include "rtc_base/thread.h"
Expand Down
1 change: 0 additions & 1 deletion sdk/android/src/jni/pc/video.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "api/videosourceproxy.h"
#include "media/engine/convert_legacy_video_factory.h"
#include "rtc_base/logging.h"
#include "rtc_base/ptr_util.h"
#include "sdk/android/src/jni/androidvideotracksource.h"
#include "sdk/android/src/jni/videodecoderfactorywrapper.h"
#include "sdk/android/src/jni/videoencoderfactorywrapper.h"
Expand Down

0 comments on commit c234203

Please sign in to comment.