Remove webrtc/base/scoped_ptr.h
BUG=webrtc:5520
NOTRY=True
Review-Url: https://codereview.webrtc.org/1942823002
Cr-Original-Commit-Position: refs/heads/master@{#12684}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 65fc62e9dd8a8716db625aaef76ab92f542ecc5a
diff --git a/api/audiotrack.h b/api/audiotrack.h
index 7fde9b3..096caf9 100644
--- a/api/audiotrack.h
+++ b/api/audiotrack.h
@@ -17,7 +17,6 @@
#include "webrtc/api/mediastreamtrack.h"
#include "webrtc/api/notifier.h"
#include "webrtc/base/constructormagic.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/scoped_ref_ptr.h"
#include "webrtc/base/thread_checker.h"
diff --git a/api/jsepsessiondescription.h b/api/jsepsessiondescription.h
index 56dd806..0248a07 100644
--- a/api/jsepsessiondescription.h
+++ b/api/jsepsessiondescription.h
@@ -20,7 +20,6 @@
#include "webrtc/api/jsep.h"
#include "webrtc/api/jsepicecandidate.h"
#include "webrtc/base/constructormagic.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/p2p/base/candidate.h"
namespace cricket {
diff --git a/api/localaudiosource.h b/api/localaudiosource.h
index e4de650..e1c023e 100644
--- a/api/localaudiosource.h
+++ b/api/localaudiosource.h
@@ -14,7 +14,6 @@
#include "webrtc/api/mediastreaminterface.h"
#include "webrtc/api/notifier.h"
#include "webrtc/api/peerconnectioninterface.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/media/base/mediachannel.h"
// LocalAudioSource implements AudioSourceInterface.
diff --git a/api/mediastreamprovider.h b/api/mediastreamprovider.h
index eef9284..8c866f0 100644
--- a/api/mediastreamprovider.h
+++ b/api/mediastreamprovider.h
@@ -15,7 +15,6 @@
#include "webrtc/api/rtpsenderinterface.h"
#include "webrtc/base/basictypes.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/media/base/videosinkinterface.h"
#include "webrtc/media/base/videosourceinterface.h"
diff --git a/api/peerconnection.h b/api/peerconnection.h
index 862c6fb..4842879 100644
--- a/api/peerconnection.h
+++ b/api/peerconnection.h
@@ -24,7 +24,6 @@
#include "webrtc/api/statscollector.h"
#include "webrtc/api/streamcollection.h"
#include "webrtc/api/webrtcsession.h"
-#include "webrtc/base/scoped_ptr.h"
namespace webrtc {
diff --git a/api/peerconnectionfactory.h b/api/peerconnectionfactory.h
index 1992087..233021c 100644
--- a/api/peerconnectionfactory.h
+++ b/api/peerconnectionfactory.h
@@ -18,7 +18,6 @@
#include "webrtc/api/mediacontroller.h"
#include "webrtc/api/mediastreaminterface.h"
#include "webrtc/api/peerconnectioninterface.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/scoped_ref_ptr.h"
#include "webrtc/base/thread.h"
#include "webrtc/pc/channelmanager.h"
diff --git a/api/peerconnectioninterface_unittest.cc b/api/peerconnectioninterface_unittest.cc
index 2594b6c..466c402 100644
--- a/api/peerconnectioninterface_unittest.cc
+++ b/api/peerconnectioninterface_unittest.cc
@@ -934,20 +934,20 @@
ASSERT_TRUE(stream->AddTrack(video_track));
}
- rtc::scoped_ptr<SessionDescriptionInterface> CreateOfferWithOneAudioStream() {
+ std::unique_ptr<SessionDescriptionInterface> CreateOfferWithOneAudioStream() {
CreatePeerConnection();
AddVoiceStream(kStreamLabel1);
- rtc::scoped_ptr<SessionDescriptionInterface> offer;
+ std::unique_ptr<SessionDescriptionInterface> offer;
EXPECT_TRUE(DoCreateOffer(&offer, nullptr));
return offer;
}
- rtc::scoped_ptr<SessionDescriptionInterface>
+ std::unique_ptr<SessionDescriptionInterface>
CreateAnswerWithOneAudioStream() {
- rtc::scoped_ptr<SessionDescriptionInterface> offer =
+ std::unique_ptr<SessionDescriptionInterface> offer =
CreateOfferWithOneAudioStream();
EXPECT_TRUE(DoSetRemoteDescription(offer.release()));
- rtc::scoped_ptr<SessionDescriptionInterface> answer;
+ std::unique_ptr<SessionDescriptionInterface> answer;
EXPECT_TRUE(DoCreateAnswer(&answer, nullptr));
return answer;
}
@@ -973,18 +973,18 @@
// The CNAMEs are expected to be generated randomly. It is possible
// that the test fails, though the possibility is very low.
TEST_F(PeerConnectionInterfaceTest, CnameGenerationInOffer) {
- rtc::scoped_ptr<SessionDescriptionInterface> offer1 =
+ std::unique_ptr<SessionDescriptionInterface> offer1 =
CreateOfferWithOneAudioStream();
- rtc::scoped_ptr<SessionDescriptionInterface> offer2 =
+ std::unique_ptr<SessionDescriptionInterface> offer2 =
CreateOfferWithOneAudioStream();
EXPECT_NE(GetFirstAudioStreamCname(offer1.get()),
GetFirstAudioStreamCname(offer2.get()));
}
TEST_F(PeerConnectionInterfaceTest, CnameGenerationInAnswer) {
- rtc::scoped_ptr<SessionDescriptionInterface> answer1 =
+ std::unique_ptr<SessionDescriptionInterface> answer1 =
CreateAnswerWithOneAudioStream();
- rtc::scoped_ptr<SessionDescriptionInterface> answer2 =
+ std::unique_ptr<SessionDescriptionInterface> answer2 =
CreateAnswerWithOneAudioStream();
EXPECT_NE(GetFirstAudioStreamCname(answer1.get()),
GetFirstAudioStreamCname(answer2.get()));
diff --git a/api/rtpsender.h b/api/rtpsender.h
index 86de765..ffe5dae 100644
--- a/api/rtpsender.h
+++ b/api/rtpsender.h
@@ -23,7 +23,6 @@
#include "webrtc/api/statscollector.h"
#include "webrtc/base/basictypes.h"
#include "webrtc/base/criticalsection.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/media/base/audiosource.h"
namespace webrtc {
diff --git a/api/statstypes.h b/api/statstypes.h
index 9e1c068..4f58b97 100644
--- a/api/statstypes.h
+++ b/api/statstypes.h
@@ -24,7 +24,6 @@
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/linked_ptr.h"
#include "webrtc/base/refcount.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/scoped_ref_ptr.h"
#include "webrtc/base/stringencode.h"
#include "webrtc/base/thread_checker.h"
diff --git a/api/test/fakeaudiocapturemodule.h b/api/test/fakeaudiocapturemodule.h
index ca42c3b..f89249a 100644
--- a/api/test/fakeaudiocapturemodule.h
+++ b/api/test/fakeaudiocapturemodule.h
@@ -25,7 +25,6 @@
#include "webrtc/base/basictypes.h"
#include "webrtc/base/criticalsection.h"
#include "webrtc/base/messagehandler.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/scoped_ref_ptr.h"
#include "webrtc/common_types.h"
#include "webrtc/modules/audio_device/include/audio_device.h"
diff --git a/api/videocapturertracksource.h b/api/videocapturertracksource.h
index fa4ef07..92f00dc 100644
--- a/api/videocapturertracksource.h
+++ b/api/videocapturertracksource.h
@@ -16,7 +16,6 @@
#include "webrtc/api/mediastreaminterface.h"
#include "webrtc/api/videotracksource.h"
#include "webrtc/base/asyncinvoker.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/sigslot.h"
#include "webrtc/media/base/videocapturer.h"
#include "webrtc/media/base/videocommon.h"
diff --git a/audio_send_stream.h b/audio_send_stream.h
index d5d16f2..d8e98bb 100644
--- a/audio_send_stream.h
+++ b/audio_send_stream.h
@@ -15,7 +15,6 @@
#include <string>
#include <vector>
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/config.h"
#include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
#include "webrtc/transport.h"
diff --git a/base/BUILD.gn b/base/BUILD.gn
index 63c2da5..09950a8 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -144,7 +144,6 @@
"refcount.h",
"safe_conversions.h",
"safe_conversions_impl.h",
- "scoped_ptr.h",
"scoped_ref_ptr.h",
"stringencode.cc",
"stringencode.h",
diff --git a/base/base.gyp b/base/base.gyp
index 74b029c..5444915 100644
--- a/base/base.gyp
+++ b/base/base.gyp
@@ -75,7 +75,6 @@
'refcount.h',
'safe_conversions.h',
'safe_conversions_impl.h',
- 'scoped_ptr.h',
'scoped_ref_ptr.h',
'stringencode.cc',
'stringencode.h',
diff --git a/base/messagehandler.h b/base/messagehandler.h
index 2d964df..6a3c2ef 100644
--- a/base/messagehandler.h
+++ b/base/messagehandler.h
@@ -15,7 +15,6 @@
#include <utility>
#include "webrtc/base/constructormagic.h"
-#include "webrtc/base/scoped_ptr.h"
namespace rtc {
diff --git a/base/scoped_ptr.h b/base/scoped_ptr.h
deleted file mode 100644
index af515f6..0000000
--- a/base/scoped_ptr.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2012 The WebRTC Project Authors. All rights reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-// This entire file is deprecated, and will be removed in XXXX 2016. Use
-// std::unique_ptr instead!
-
-#ifndef WEBRTC_BASE_SCOPED_PTR_H__
-#define WEBRTC_BASE_SCOPED_PTR_H__
-
-// All these #includes are left to maximize backwards compatibility.
-
-#include <assert.h>
-#include <stddef.h>
-#include <stdlib.h>
-
-#include <algorithm>
-#include <cstddef>
-#include <memory>
-
-#include "webrtc/base/constructormagic.h"
-#include "webrtc/base/template_util.h"
-#include "webrtc/typedefs.h"
-
-namespace rtc {
-
-template <typename T, typename Deleter = std::default_delete<T>>
-using scoped_ptr = std::unique_ptr<T, Deleter>;
-
-// These used to convert between std::unique_ptr and std::unique_ptr. Now they
-// are no-ops.
-template <typename T>
-std::unique_ptr<T> ScopedToUnique(std::unique_ptr<T> up) {
- return up;
-}
-template <typename T>
-std::unique_ptr<T> UniqueToScoped(std::unique_ptr<T> up) {
- return up;
-}
-
-} // namespace rtc
-
-#endif // #ifndef WEBRTC_BASE_SCOPED_PTR_H__
diff --git a/common_audio/real_fourier.h b/common_audio/real_fourier.h
index 8dbb98f..5e83e37 100644
--- a/common_audio/real_fourier.h
+++ b/common_audio/real_fourier.h
@@ -14,7 +14,6 @@
#include <complex>
#include <memory>
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/system_wrappers/include/aligned_malloc.h"
// Uniform interface class for the real DFT and its inverse, for power-of-2
diff --git a/common_video/bitrate_adjuster.cc b/common_video/bitrate_adjuster.cc
index 9c61120..ada6c5d 100644
--- a/common_video/bitrate_adjuster.cc
+++ b/common_video/bitrate_adjuster.cc
@@ -10,6 +10,7 @@
#include "webrtc/common_video/include/bitrate_adjuster.h"
+#include <algorithm>
#include <cmath>
#include "webrtc/base/checks.h"
diff --git a/examples/peerconnection/client/conductor.h b/examples/peerconnection/client/conductor.h
index db2f77b..02351b7 100644
--- a/examples/peerconnection/client/conductor.h
+++ b/examples/peerconnection/client/conductor.h
@@ -21,7 +21,6 @@
#include "webrtc/api/peerconnectioninterface.h"
#include "webrtc/examples/peerconnection/client/main_wnd.h"
#include "webrtc/examples/peerconnection/client/peer_connection_client.h"
-#include "webrtc/base/scoped_ptr.h"
namespace webrtc {
class VideoCaptureModule;
diff --git a/examples/peerconnection/client/peer_connection_client.h b/examples/peerconnection/client/peer_connection_client.h
index bc8b8cc..dbf2d8f 100644
--- a/examples/peerconnection/client/peer_connection_client.h
+++ b/examples/peerconnection/client/peer_connection_client.h
@@ -18,7 +18,6 @@
#include "webrtc/base/nethelpers.h"
#include "webrtc/base/physicalsocketserver.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/signalthread.h"
#include "webrtc/base/sigslot.h"
diff --git a/libjingle/xmllite/xmlbuilder.h b/libjingle/xmllite/xmlbuilder.h
index 08bb5ec..3b48f28 100644
--- a/libjingle/xmllite/xmlbuilder.h
+++ b/libjingle/xmllite/xmlbuilder.h
@@ -15,7 +15,6 @@
#include <string>
#include <vector>
#include "webrtc/libjingle/xmllite/xmlparser.h"
-#include "webrtc/base/scoped_ptr.h"
#ifdef EXPAT_RELATIVE_PATH
#include "expat.h"
diff --git a/libjingle/xmllite/xmlelement.h b/libjingle/xmllite/xmlelement.h
index 70c6f79..37adfc0 100644
--- a/libjingle/xmllite/xmlelement.h
+++ b/libjingle/xmllite/xmlelement.h
@@ -15,7 +15,6 @@
#include <string>
#include "webrtc/libjingle/xmllite/qname.h"
-#include "webrtc/base/scoped_ptr.h"
namespace buzz {
diff --git a/libjingle/xmllite/xmlnsstack.h b/libjingle/xmllite/xmlnsstack.h
index 07a9883..64e2f6e 100644
--- a/libjingle/xmllite/xmlnsstack.h
+++ b/libjingle/xmllite/xmlnsstack.h
@@ -15,7 +15,6 @@
#include <string>
#include <vector>
#include "webrtc/libjingle/xmllite/qname.h"
-#include "webrtc/base/scoped_ptr.h"
namespace buzz {
diff --git a/libjingle/xmpp/fakexmppclient.h b/libjingle/xmpp/fakexmppclient.h
index 453a7c8..63c216c 100644
--- a/libjingle/xmpp/fakexmppclient.h
+++ b/libjingle/xmpp/fakexmppclient.h
@@ -13,6 +13,7 @@
#ifndef WEBRTC_LIBJINGLE_XMPP_FAKEXMPPCLIENT_H_
#define WEBRTC_LIBJINGLE_XMPP_FAKEXMPPCLIENT_H_
+#include <algorithm>
#include <string>
#include <vector>
diff --git a/libjingle/xmpp/hangoutpubsubclient.h b/libjingle/xmpp/hangoutpubsubclient.h
index 8633424..fecc727 100644
--- a/libjingle/xmpp/hangoutpubsubclient.h
+++ b/libjingle/xmpp/hangoutpubsubclient.h
@@ -19,7 +19,6 @@
#include "webrtc/libjingle/xmpp/jid.h"
#include "webrtc/libjingle/xmpp/pubsubclient.h"
#include "webrtc/libjingle/xmpp/pubsubstateclient.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/sigslot.h"
#include "webrtc/base/sigslotrepeater.h"
diff --git a/libjingle/xmpp/pubsubstateclient.h b/libjingle/xmpp/pubsubstateclient.h
index e78ddb5..07aa26d 100644
--- a/libjingle/xmpp/pubsubstateclient.h
+++ b/libjingle/xmpp/pubsubstateclient.h
@@ -22,7 +22,6 @@
#include "webrtc/libjingle/xmpp/jid.h"
#include "webrtc/libjingle/xmpp/pubsubclient.h"
#include "webrtc/base/constructormagic.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/sigslot.h"
#include "webrtc/base/sigslotrepeater.h"
diff --git a/libjingle/xmpp/xmpplogintask.h b/libjingle/xmpp/xmpplogintask.h
index d47388d..c015c2e 100644
--- a/libjingle/xmpp/xmpplogintask.h
+++ b/libjingle/xmpp/xmpplogintask.h
@@ -18,7 +18,6 @@
#include "webrtc/libjingle/xmpp/jid.h"
#include "webrtc/libjingle/xmpp/xmppengine.h"
#include "webrtc/base/logging.h"
-#include "webrtc/base/scoped_ptr.h"
namespace buzz {
diff --git a/libjingle/xmpp/xmpplogintask_unittest.cc b/libjingle/xmpp/xmpplogintask_unittest.cc
index f3060bd..18fce97 100644
--- a/libjingle/xmpp/xmpplogintask_unittest.cc
+++ b/libjingle/xmpp/xmpplogintask_unittest.cc
@@ -22,6 +22,7 @@
#include "webrtc/base/common.h"
#include "webrtc/base/cryptstring.h"
#include "webrtc/base/gunit.h"
+#include "webrtc/typedefs.h"
using buzz::Jid;
using buzz::QName;
diff --git a/modules/audio_device/dummy/file_audio_device_factory.cc b/modules/audio_device/dummy/file_audio_device_factory.cc
index 2a6ac1f..7c6d16f 100644
--- a/modules/audio_device/dummy/file_audio_device_factory.cc
+++ b/modules/audio_device/dummy/file_audio_device_factory.cc
@@ -10,6 +10,7 @@
#include "webrtc/modules/audio_device/dummy/file_audio_device_factory.h"
+#include <cstdlib>
#include <cstring>
#include "webrtc/modules/audio_device/dummy/file_audio_device.h"
@@ -26,7 +27,7 @@
if (!_isConfigured) {
printf("Was compiled with WEBRTC_DUMMY_AUDIO_PLAY_STATIC_FILE "
"but did not set input/output files to use. Bailing out.\n");
- exit(1);
+ std::exit(1);
}
return new FileAudioDevice(id, _inputAudioFilename, _outputAudioFilename);
}
@@ -45,7 +46,7 @@
// Sanity: must be compiled with the right define to run this.
printf("Trying to use dummy file devices, but is not compiled "
"with WEBRTC_DUMMY_FILE_DEVICES. Bailing out.\n");
- exit(1);
+ std::exit(1);
#endif
}
diff --git a/modules/congestion_controller/include/congestion_controller.h b/modules/congestion_controller/include/congestion_controller.h
index 284070c..c1a6c3f 100644
--- a/modules/congestion_controller/include/congestion_controller.h
+++ b/modules/congestion_controller/include/congestion_controller.h
@@ -14,7 +14,6 @@
#include <memory>
#include "webrtc/base/constructormagic.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/common_types.h"
#include "webrtc/modules/include/module.h"
#include "webrtc/modules/include/module_common_types.h"
diff --git a/modules/desktop_capture/cropping_window_capturer.h b/modules/desktop_capture/cropping_window_capturer.h
index 27957ad..dfeb447 100644
--- a/modules/desktop_capture/cropping_window_capturer.h
+++ b/modules/desktop_capture/cropping_window_capturer.h
@@ -13,7 +13,6 @@
#include <memory>
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/desktop_capture/desktop_capture_options.h"
#include "webrtc/modules/desktop_capture/screen_capturer.h"
#include "webrtc/modules/desktop_capture/window_capturer.h"
diff --git a/modules/desktop_capture/desktop_and_cursor_composer.h b/modules/desktop_capture/desktop_and_cursor_composer.h
index 971943b..dcbe612 100644
--- a/modules/desktop_capture/desktop_and_cursor_composer.h
+++ b/modules/desktop_capture/desktop_and_cursor_composer.h
@@ -14,7 +14,6 @@
#include <memory>
#include "webrtc/base/constructormagic.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/desktop_capture/desktop_capturer.h"
#include "webrtc/modules/desktop_capture/mouse_cursor_monitor.h"
diff --git a/modules/desktop_capture/desktop_capturer.h b/modules/desktop_capture/desktop_capturer.h
index 103740a..ba70e01 100644
--- a/modules/desktop_capture/desktop_capturer.h
+++ b/modules/desktop_capture/desktop_capturer.h
@@ -15,7 +15,6 @@
#include <memory>
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/desktop_capture/desktop_capture_types.h"
#include "webrtc/modules/desktop_capture/shared_memory.h"
diff --git a/modules/desktop_capture/shared_memory.h b/modules/desktop_capture/shared_memory.h
index e1d1e7c..6e15f23 100644
--- a/modules/desktop_capture/shared_memory.h
+++ b/modules/desktop_capture/shared_memory.h
@@ -20,7 +20,6 @@
#include <memory>
#include "webrtc/base/constructormagic.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/typedefs.h"
namespace webrtc {
diff --git a/modules/desktop_capture/win/screen_capturer_win_gdi.h b/modules/desktop_capture/win/screen_capturer_win_gdi.h
index f43aa0d..5a50580 100644
--- a/modules/desktop_capture/win/screen_capturer_win_gdi.h
+++ b/modules/desktop_capture/win/screen_capturer_win_gdi.h
@@ -18,7 +18,6 @@
#include <windows.h>
#include "webrtc/base/constructormagic.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h"
#include "webrtc/modules/desktop_capture/screen_capturer_helper.h"
#include "webrtc/modules/desktop_capture/shared_desktop_frame.h"
diff --git a/modules/desktop_capture/win/screen_capturer_win_magnifier.h b/modules/desktop_capture/win/screen_capturer_win_magnifier.h
index 82ef528..623c8a3 100644
--- a/modules/desktop_capture/win/screen_capturer_win_magnifier.h
+++ b/modules/desktop_capture/win/screen_capturer_win_magnifier.h
@@ -18,7 +18,6 @@
#include <wincodec.h>
#include "webrtc/base/constructormagic.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/desktop_capture/screen_capture_frame_queue.h"
#include "webrtc/modules/desktop_capture/screen_capturer.h"
#include "webrtc/modules/desktop_capture/screen_capturer_helper.h"
diff --git a/modules/rtp_rtcp/include/remote_ntp_time_estimator.h b/modules/rtp_rtcp/include/remote_ntp_time_estimator.h
index d57518a..207e749 100644
--- a/modules/rtp_rtcp/include/remote_ntp_time_estimator.h
+++ b/modules/rtp_rtcp/include/remote_ntp_time_estimator.h
@@ -14,7 +14,6 @@
#include <memory>
#include "webrtc/base/constructormagic.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/system_wrappers/include/rtp_to_ntp.h"
namespace webrtc {
diff --git a/modules/rtp_rtcp/include/rtp_payload_registry.h b/modules/rtp_rtcp/include/rtp_payload_registry.h
index a24fc34..a199755 100644
--- a/modules/rtp_rtcp/include/rtp_payload_registry.h
+++ b/modules/rtp_rtcp/include/rtp_payload_registry.h
@@ -15,7 +15,6 @@
#include <memory>
#include "webrtc/base/criticalsection.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
diff --git a/modules/rtp_rtcp/source/receive_statistics_impl.cc b/modules/rtp_rtcp/source/receive_statistics_impl.cc
index 1e7b355..932be1b 100644
--- a/modules/rtp_rtcp/source/receive_statistics_impl.cc
+++ b/modules/rtp_rtcp/source/receive_statistics_impl.cc
@@ -12,6 +12,8 @@
#include <math.h>
+#include <cstdlib>
+
#include "webrtc/modules/rtp_rtcp/source/bitrate.h"
#include "webrtc/modules/rtp_rtcp/source/time_util.h"
@@ -113,7 +115,7 @@
int32_t time_diff_samples = (receive_time_rtp - last_receive_time_rtp) -
(header.timestamp - last_received_timestamp_);
- time_diff_samples = abs(time_diff_samples);
+ time_diff_samples = std::abs(time_diff_samples);
// lib_jingle sometimes deliver crazy jumps in TS for the same stream.
// If this happens, don't update jitter value. Use 5 secs video frequency
@@ -133,7 +135,7 @@
(last_received_timestamp_ +
last_received_transmission_time_offset_));
- time_diff_samples_ext = abs(time_diff_samples_ext);
+ time_diff_samples_ext = std::abs(time_diff_samples_ext);
if (time_diff_samples_ext < 450000) {
int32_t jitter_diffQ4TransmissionTimeOffset =
diff --git a/modules/rtp_rtcp/source/rtcp_receiver_help.h b/modules/rtp_rtcp/source/rtcp_receiver_help.h
index 9a9c73d..40d1220 100644
--- a/modules/rtp_rtcp/source/rtcp_receiver_help.h
+++ b/modules/rtp_rtcp/source/rtcp_receiver_help.h
@@ -16,7 +16,6 @@
#include <vector>
#include "webrtc/base/constructormagic.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" // RTCPReportBlock
#include "webrtc/modules/rtp_rtcp/source/rtcp_utility.h"
#include "webrtc/modules/rtp_rtcp/source/tmmbr_help.h"
diff --git a/modules/rtp_rtcp/source/rtcp_utility.h b/modules/rtp_rtcp/source/rtcp_utility.h
index fedd1dc..629de4e 100644
--- a/modules/rtp_rtcp/source/rtcp_utility.h
+++ b/modules/rtp_rtcp/source/rtcp_utility.h
@@ -15,7 +15,6 @@
#include <memory>
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h"
#include "webrtc/typedefs.h"
diff --git a/modules/rtp_rtcp/source/rtp_receiver_impl.h b/modules/rtp_rtcp/source/rtp_receiver_impl.h
index be659fe..1ae1c91 100644
--- a/modules/rtp_rtcp/source/rtp_receiver_impl.h
+++ b/modules/rtp_rtcp/source/rtp_receiver_impl.h
@@ -14,7 +14,6 @@
#include <memory>
#include "webrtc/base/criticalsection.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h"
diff --git a/modules/rtp_rtcp/test/testAPI/test_api.h b/modules/rtp_rtcp/test/testAPI/test_api.h
index d8040f7..44de00a 100644
--- a/modules/rtp_rtcp/test/testAPI/test_api.h
+++ b/modules/rtp_rtcp/test/testAPI/test_api.h
@@ -11,7 +11,6 @@
#define WEBRTC_MODULES_RTP_RTCP_TEST_TESTAPI_TEST_API_H_
#include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/common_types.h"
#include "webrtc/modules/rtp_rtcp/include/receive_statistics.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
diff --git a/modules/utility/include/jvm_android.h b/modules/utility/include/jvm_android.h
index 305e7cf..574c977 100644
--- a/modules/utility/include/jvm_android.h
+++ b/modules/utility/include/jvm_android.h
@@ -16,7 +16,6 @@
#include <memory>
#include <string>
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/thread_checker.h"
#include "webrtc/modules/utility/include/helpers_android.h"
diff --git a/modules/utility/include/process_thread.h b/modules/utility/include/process_thread.h
index 4d77452..f6913ea 100644
--- a/modules/utility/include/process_thread.h
+++ b/modules/utility/include/process_thread.h
@@ -14,7 +14,6 @@
#include <memory>
#include "webrtc/typedefs.h"
-#include "webrtc/base/scoped_ptr.h"
namespace webrtc {
class Module;
diff --git a/modules/video_coding/packet_buffer.h b/modules/video_coding/packet_buffer.h
index 8a1d706..2b9e51f 100644
--- a/modules/video_coding/packet_buffer.h
+++ b/modules/video_coding/packet_buffer.h
@@ -20,7 +20,6 @@
#include <vector>
#include "webrtc/base/criticalsection.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/thread_annotations.h"
#include "webrtc/modules/include/module_common_types.h"
#include "webrtc/modules/video_coding/packet.h"
diff --git a/modules/video_coding/test/rtp_player.cc b/modules/video_coding/test/rtp_player.cc
index 41cd360..d5fa9ae 100644
--- a/modules/video_coding/test/rtp_player.cc
+++ b/modules/video_coding/test/rtp_player.cc
@@ -12,6 +12,7 @@
#include <stdio.h>
+#include <cstdlib>
#include <map>
#include <memory>
@@ -341,7 +342,7 @@
assert(packet_source);
assert(packet_source->get());
packet_source_.swap(*packet_source);
- srand(321);
+ std::srand(321);
}
virtual ~RtpPlayerImpl() {}
@@ -434,7 +435,8 @@
if (no_loss_startup_ > 0) {
no_loss_startup_--;
- } else if ((rand() + 1.0) / (RAND_MAX + 1.0) < loss_rate_) { // NOLINT
+ } else if ((std::rand() + 1.0) / (RAND_MAX + 1.0) <
+ loss_rate_) { // NOLINT
uint16_t seq_num = header.sequenceNumber;
lost_packets_.AddPacket(new RawRtpPacket(data, length, ssrc, seq_num));
DEBUG_LOG1("Dropped packet: %d!", header.header.sequenceNumber);
diff --git a/modules/video_processing/util/noise_estimation.h b/modules/video_processing/util/noise_estimation.h
index 16d5587..294bfb3 100644
--- a/modules/video_processing/util/noise_estimation.h
+++ b/modules/video_processing/util/noise_estimation.h
@@ -13,7 +13,6 @@
#include <memory>
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/include/module_common_types.h"
#include "webrtc/modules/video_processing/include/video_processing_defines.h"
#include "webrtc/modules/video_processing/util/denoiser_filter.h"
diff --git a/p2p/base/asyncstuntcpsocket.h b/p2p/base/asyncstuntcpsocket.h
index 90d262b..065b4c2 100644
--- a/p2p/base/asyncstuntcpsocket.h
+++ b/p2p/base/asyncstuntcpsocket.h
@@ -13,7 +13,6 @@
#include "webrtc/base/asynctcpsocket.h"
#include "webrtc/base/constructormagic.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/socketfactory.h"
namespace cricket {
diff --git a/p2p/base/dtlstransportchannel_unittest.cc b/p2p/base/dtlstransportchannel_unittest.cc
index 3e34aff..486b51a 100644
--- a/p2p/base/dtlstransportchannel_unittest.cc
+++ b/p2p/base/dtlstransportchannel_unittest.cc
@@ -42,7 +42,7 @@
cricket::TransportDescription MakeTransportDescription(
const rtc::scoped_refptr<rtc::RTCCertificate>& cert,
cricket::ConnectionRole role) {
- rtc::scoped_ptr<rtc::SSLFingerprint> fingerprint;
+ std::unique_ptr<rtc::SSLFingerprint> fingerprint;
if (cert) {
std::string digest_algorithm;
cert->ssl_certificate().GetSignatureDigestAlgorithm(&digest_algorithm);
diff --git a/p2p/base/stunserver.h b/p2p/base/stunserver.h
index 3f7e7de..9d1c169 100644
--- a/p2p/base/stunserver.h
+++ b/p2p/base/stunserver.h
@@ -15,7 +15,6 @@
#include "webrtc/p2p/base/stun.h"
#include "webrtc/base/asyncudpsocket.h"
-#include "webrtc/base/scoped_ptr.h"
namespace cricket {
diff --git a/p2p/base/testrelayserver.h b/p2p/base/testrelayserver.h
index ba64008..7bc0bee 100644
--- a/p2p/base/testrelayserver.h
+++ b/p2p/base/testrelayserver.h
@@ -15,7 +15,6 @@
#include "webrtc/p2p/base/relayserver.h"
#include "webrtc/base/asynctcpsocket.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/sigslot.h"
#include "webrtc/base/socketadapters.h"
#include "webrtc/base/thread.h"
diff --git a/p2p/base/transportdescription.h b/p2p/base/transportdescription.h
index d9cd524..42e45a6 100644
--- a/p2p/base/transportdescription.h
+++ b/p2p/base/transportdescription.h
@@ -17,7 +17,6 @@
#include <vector>
#include "webrtc/p2p/base/p2pconstants.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/sslfingerprint.h"
namespace cricket {
diff --git a/p2p/client/basicportallocator.h b/p2p/client/basicportallocator.h
index c66ae59..296d717 100644
--- a/p2p/client/basicportallocator.h
+++ b/p2p/client/basicportallocator.h
@@ -18,7 +18,6 @@
#include "webrtc/p2p/base/portallocator.h"
#include "webrtc/base/messagequeue.h"
#include "webrtc/base/network.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/thread.h"
namespace cricket {
diff --git a/p2p/client/fakeportallocator.h b/p2p/client/fakeportallocator.h
index 76357a5..1e5f46e 100644
--- a/p2p/client/fakeportallocator.h
+++ b/p2p/client/fakeportallocator.h
@@ -17,7 +17,6 @@
#include "webrtc/p2p/base/basicpacketsocketfactory.h"
#include "webrtc/p2p/base/portallocator.h"
#include "webrtc/p2p/base/udpport.h"
-#include "webrtc/base/scoped_ptr.h"
namespace rtc {
class SocketFactory;
diff --git a/p2p/quic/quictransportchannel.h b/p2p/quic/quictransportchannel.h
index 2ce17f8..dec24d2 100644
--- a/p2p/quic/quictransportchannel.h
+++ b/p2p/quic/quictransportchannel.h
@@ -19,7 +19,6 @@
#include "net/quic/quic_packet_writer.h"
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/optional.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/p2p/base/transportchannelimpl.h"
#include "webrtc/p2p/quic/quicconnectionhelper.h"
#include "webrtc/p2p/quic/quicsession.h"
diff --git a/p2p/stunprober/stunprober.h b/p2p/stunprober/stunprober.h
index 3f100c6..dbb67c6 100644
--- a/p2p/stunprober/stunprober.h
+++ b/p2p/stunprober/stunprober.h
@@ -22,7 +22,6 @@
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/ipaddress.h"
#include "webrtc/base/network.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/socketaddress.h"
#include "webrtc/base/thread.h"
#include "webrtc/base/thread_checker.h"
diff --git a/pc/mediasession_unittest.cc b/pc/mediasession_unittest.cc
index b1c4044..b14bd80 100644
--- a/pc/mediasession_unittest.cc
+++ b/pc/mediasession_unittest.cc
@@ -2404,9 +2404,9 @@
f1_.set_secure(SEC_ENABLED);
f2_.set_secure(SEC_ENABLED);
tdf1_.set_certificate(rtc::RTCCertificate::Create(
- rtc::scoped_ptr<rtc::SSLIdentity>(new rtc::FakeSSLIdentity("id1"))));
+ std::unique_ptr<rtc::SSLIdentity>(new rtc::FakeSSLIdentity("id1"))));
tdf2_.set_certificate(rtc::RTCCertificate::Create(
- rtc::scoped_ptr<rtc::SSLIdentity>(new rtc::FakeSSLIdentity("id2"))));
+ std::unique_ptr<rtc::SSLIdentity>(new rtc::FakeSSLIdentity("id2"))));
tdf1_.set_secure(SEC_ENABLED);
tdf2_.set_secure(SEC_ENABLED);
}
diff --git a/sdk/objc/Framework/Classes/RTCIceCandidate+Private.h b/sdk/objc/Framework/Classes/RTCIceCandidate+Private.h
index 04858cf..b00c8da 100644
--- a/sdk/objc/Framework/Classes/RTCIceCandidate+Private.h
+++ b/sdk/objc/Framework/Classes/RTCIceCandidate+Private.h
@@ -13,7 +13,6 @@
#include <memory>
#include "webrtc/api/jsep.h"
-#include "webrtc/base/scoped_ptr.h"
NS_ASSUME_NONNULL_BEGIN
diff --git a/sdk/objc/Framework/Classes/RTCMediaConstraints+Private.h b/sdk/objc/Framework/Classes/RTCMediaConstraints+Private.h
index 6ad3b6d..606a132 100644
--- a/sdk/objc/Framework/Classes/RTCMediaConstraints+Private.h
+++ b/sdk/objc/Framework/Classes/RTCMediaConstraints+Private.h
@@ -13,7 +13,6 @@
#include <memory>
#include "webrtc/api/mediaconstraintsinterface.h"
-#include "webrtc/base/scoped_ptr.h"
namespace webrtc {
diff --git a/sdk/objc/Framework/Classes/RTCMediaStreamTrack+Private.h b/sdk/objc/Framework/Classes/RTCMediaStreamTrack+Private.h
index fd98cb6..d526126 100644
--- a/sdk/objc/Framework/Classes/RTCMediaStreamTrack+Private.h
+++ b/sdk/objc/Framework/Classes/RTCMediaStreamTrack+Private.h
@@ -11,7 +11,6 @@
#import "WebRTC/RTCMediaStreamTrack.h"
#include "webrtc/api/mediastreaminterface.h"
-#include "webrtc/base/scoped_ptr.h"
typedef NS_ENUM(NSInteger, RTCMediaStreamTrackType) {
RTCMediaStreamTrackTypeAudio,
diff --git a/sdk/objc/Framework/Classes/avfoundationvideocapturer.h b/sdk/objc/Framework/Classes/avfoundationvideocapturer.h
index 5a70238..c523b52 100644
--- a/sdk/objc/Framework/Classes/avfoundationvideocapturer.h
+++ b/sdk/objc/Framework/Classes/avfoundationvideocapturer.h
@@ -13,7 +13,6 @@
#import <AVFoundation/AVFoundation.h>
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/media/base/videocapturer.h"
#include "webrtc/video_frame.h"
diff --git a/system_wrappers/include/clock.h b/system_wrappers/include/clock.h
index 8245ecd..a209770 100644
--- a/system_wrappers/include/clock.h
+++ b/system_wrappers/include/clock.h
@@ -13,7 +13,6 @@
#include <memory>
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/system_wrappers/include/rw_lock_wrapper.h"
#include "webrtc/typedefs.h"
diff --git a/system_wrappers/include/data_log_impl.h b/system_wrappers/include/data_log_impl.h
index c68c829..6d59fa8 100644
--- a/system_wrappers/include/data_log_impl.h
+++ b/system_wrappers/include/data_log_impl.h
@@ -24,7 +24,6 @@
#include <vector>
#include "webrtc/base/platform_thread.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/typedefs.h"
namespace webrtc {
diff --git a/system_wrappers/include/utf_util_win.h b/system_wrappers/include/utf_util_win.h
index 730aa46..ac91fe3 100644
--- a/system_wrappers/include/utf_util_win.h
+++ b/system_wrappers/include/utf_util_win.h
@@ -19,7 +19,6 @@
#include <memory>
#include <string>
-#include "webrtc/base/scoped_ptr.h"
namespace webrtc {
diff --git a/system_wrappers/source/file_impl.h b/system_wrappers/source/file_impl.h
index 8764f72..51103d6 100644
--- a/system_wrappers/source/file_impl.h
+++ b/system_wrappers/source/file_impl.h
@@ -15,7 +15,6 @@
#include <memory>
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/system_wrappers/include/file_wrapper.h"
namespace webrtc {
diff --git a/system_wrappers/source/trace_impl.h b/system_wrappers/source/trace_impl.h
index 5e45976..182f580 100644
--- a/system_wrappers/source/trace_impl.h
+++ b/system_wrappers/source/trace_impl.h
@@ -14,7 +14,6 @@
#include <memory>
#include "webrtc/base/criticalsection.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/system_wrappers/include/event_wrapper.h"
#include "webrtc/system_wrappers/include/file_wrapper.h"
#include "webrtc/system_wrappers/include/static_instance.h"
diff --git a/test/configurable_frame_size_encoder.h b/test/configurable_frame_size_encoder.h
index 0da5d20..d269441 100644
--- a/test/configurable_frame_size_encoder.h
+++ b/test/configurable_frame_size_encoder.h
@@ -14,7 +14,6 @@
#include <memory>
#include <vector>
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/video_encoder.h"
namespace webrtc {
diff --git a/test/direct_transport.h b/test/direct_transport.h
index d68bc71..e184476 100644
--- a/test/direct_transport.h
+++ b/test/direct_transport.h
@@ -17,7 +17,6 @@
#include "webrtc/base/criticalsection.h"
#include "webrtc/base/event.h"
#include "webrtc/base/platform_thread.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/test/fake_network_pipe.h"
#include "webrtc/transport.h"
diff --git a/test/fake_audio_device.h b/test/fake_audio_device.h
index 39f9310..77a74ba 100644
--- a/test/fake_audio_device.h
+++ b/test/fake_audio_device.h
@@ -15,7 +15,6 @@
#include "webrtc/base/criticalsection.h"
#include "webrtc/base/platform_thread.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/audio_device/include/fake_audio_device.h"
#include "webrtc/test/drifting_clock.h"
#include "webrtc/typedefs.h"
diff --git a/test/fake_network_pipe.h b/test/fake_network_pipe.h
index 3c2db86..608ff00 100644
--- a/test/fake_network_pipe.h
+++ b/test/fake_network_pipe.h
@@ -19,7 +19,6 @@
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/criticalsection.h"
#include "webrtc/base/random.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/typedefs.h"
namespace webrtc {
diff --git a/test/frame_generator_capturer.h b/test/frame_generator_capturer.h
index 2b34dd2..1d6fb62 100644
--- a/test/frame_generator_capturer.h
+++ b/test/frame_generator_capturer.h
@@ -15,7 +15,6 @@
#include "webrtc/base/criticalsection.h"
#include "webrtc/base/platform_thread.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/common_video/rotation.h"
#include "webrtc/test/video_capturer.h"
#include "webrtc/typedefs.h"
diff --git a/test/test_suite.h b/test/test_suite.h
index 94b11cf..4b27f9f 100644
--- a/test/test_suite.h
+++ b/test/test_suite.h
@@ -20,7 +20,6 @@
#include <memory>
#include "webrtc/base/constructormagic.h"
-#include "webrtc/base/scoped_ptr.h"
namespace webrtc {
namespace test {