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

Unified Diff: media/cast/test/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/loopback_transport.cc ('k') | media/cast/test/sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/test/receiver.cc
diff --git a/media/cast/test/receiver.cc b/media/cast/test/receiver.cc
index b45222184c32b73af508080f8289202bf293d81e..80f17892606bc5ffda2235107d129cd42d2bc69e 100644
--- a/media/cast/test/receiver.cc
+++ b/media/cast/test/receiver.cc
@@ -12,6 +12,7 @@
#include <cstdio>
#include <deque>
#include <map>
+#include <memory>
#include <string>
#include <utility>
@@ -19,7 +20,6 @@
#include "base/command_line.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/synchronization/lock.h"
#include "base/synchronization/waitable_event.h"
@@ -234,7 +234,7 @@ class NaivePlayer : public InProcessReceiver,
// Finally, clear out any frames remaining in the queues.
while (!audio_playout_queue_.empty()) {
- const scoped_ptr<AudioBus> to_be_deleted(
+ const std::unique_ptr<AudioBus> to_be_deleted(
audio_playout_queue_.front().second);
audio_playout_queue_.pop_front();
}
@@ -286,7 +286,7 @@ class NaivePlayer : public InProcessReceiver,
}
}
- void OnAudioFrame(scoped_ptr<AudioBus> audio_frame,
+ void OnAudioFrame(std::unique_ptr<AudioBus> audio_frame,
const base::TimeTicks& playout_time,
bool is_continuous) final {
DCHECK(cast_env()->CurrentlyOn(CastEnvironment::MAIN));
@@ -450,7 +450,7 @@ class NaivePlayer : public InProcessReceiver,
return ret;
}
- scoped_ptr<AudioBus> PopOneAudioFrame(bool was_skipped) {
+ std::unique_ptr<AudioBus> PopOneAudioFrame(bool was_skipped) {
audio_lock_.AssertAcquired();
if (was_skipped) {
@@ -469,7 +469,7 @@ class NaivePlayer : public InProcessReceiver,
}
last_popped_audio_playout_time_ = audio_playout_queue_.front().first;
- scoped_ptr<AudioBus> ret(audio_playout_queue_.front().second);
+ std::unique_ptr<AudioBus> ret(audio_playout_queue_.front().second);
audio_playout_queue_.pop_front();
++num_audio_frames_processed_;
return ret;
@@ -514,7 +514,7 @@ class NaivePlayer : public InProcessReceiver,
#if defined(USE_X11)
test::LinuxOutputWindow render_;
#endif // defined(USE_X11)
- scoped_ptr<AudioOutputStream> audio_output_stream_;
+ std::unique_ptr<AudioOutputStream> audio_output_stream_;
// Video playout queue.
typedef std::pair<base::TimeTicks, scoped_refptr<VideoFrame> >
@@ -533,7 +533,7 @@ class NaivePlayer : public InProcessReceiver,
int64_t num_audio_frames_processed_;
// These must only be used on the audio thread calling OnMoreData().
- scoped_ptr<AudioBus> currently_playing_audio_frame_;
+ std::unique_ptr<AudioBus> currently_playing_audio_frame_;
int currently_playing_audio_frame_start_;
std::map<uint16_t, base::TimeTicks> audio_play_times_;
« no previous file with comments | « media/cast/test/loopback_transport.cc ('k') | media/cast/test/sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698