Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Unified Diff: media/cast/test/utility/in_process_receiver.cc

Issue 1905763002: Convert //media/cast from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/test/utility/in_process_receiver.h ('k') | media/cast/test/utility/net_utility.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/test/utility/in_process_receiver.cc
diff --git a/media/cast/test/utility/in_process_receiver.cc b/media/cast/test/utility/in_process_receiver.cc
index 86bce03054968e0763cdcea38ca6e06f3b6c32be..7b66d7ec834600676383a82eda08ef386fe65d2a 100644
--- a/media/cast/test/utility/in_process_receiver.cc
+++ b/media/cast/test/utility/in_process_receiver.cc
@@ -7,6 +7,7 @@
#include <utility>
#include "base/bind_helpers.h"
+#include "base/memory/ptr_util.h"
#include "base/synchronization/waitable_event.h"
#include "base/time/time.h"
#include "base/values.h"
@@ -32,7 +33,7 @@ void InProcessReceiver::TransportClient::OnStatusChanged(
}
void InProcessReceiver::TransportClient::ProcessRtpPacket(
- scoped_ptr<Packet> packet) {
+ std::unique_ptr<Packet> packet) {
in_process_receiver_->ReceivePacket(std::move(packet));
}
@@ -95,8 +96,8 @@ void InProcessReceiver::StartOnMainThread() {
transport_ = CastTransport::Create(
cast_environment_->Clock(), base::TimeDelta(),
- make_scoped_ptr(new InProcessReceiver::TransportClient(this)),
- make_scoped_ptr(new UdpTransport(
+ base::WrapUnique(new InProcessReceiver::TransportClient(this)),
+ base::WrapUnique(new UdpTransport(
nullptr, cast_environment_->GetTaskRunner(CastEnvironment::MAIN),
local_end_point_, remote_end_point_,
base::Bind(&InProcessReceiver::UpdateCastTransportStatus,
@@ -110,7 +111,7 @@ void InProcessReceiver::StartOnMainThread() {
PullNextVideoFrame();
}
-void InProcessReceiver::GotAudioFrame(scoped_ptr<AudioBus> audio_frame,
+void InProcessReceiver::GotAudioFrame(std::unique_ptr<AudioBus> audio_frame,
const base::TimeTicks& playout_time,
bool is_continuous) {
DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
@@ -142,7 +143,7 @@ void InProcessReceiver::PullNextVideoFrame() {
&InProcessReceiver::GotVideoFrame, weak_factory_.GetWeakPtr()));
}
-void InProcessReceiver::ReceivePacket(scoped_ptr<Packet> packet) {
+void InProcessReceiver::ReceivePacket(std::unique_ptr<Packet> packet) {
// TODO(Hubbe): Make an InsertPacket method instead.
cast_receiver_->ReceivePacket(std::move(packet));
}
« no previous file with comments | « media/cast/test/utility/in_process_receiver.h ('k') | media/cast/test/utility/net_utility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698