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

Unified Diff: chromecast/media/cma/base/multi_demuxer_stream_adapter_unittest.cc

Issue 1875623002: Convert //chromecast 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
Index: chromecast/media/cma/base/multi_demuxer_stream_adapter_unittest.cc
diff --git a/chromecast/media/cma/base/multi_demuxer_stream_adapter_unittest.cc b/chromecast/media/cma/base/multi_demuxer_stream_adapter_unittest.cc
index dec049dcd6c06c104be9c854a7b30e326bc69f81..073b1aab91ba14bfc7fe495b31117f7addff17b4 100644
--- a/chromecast/media/cma/base/multi_demuxer_stream_adapter_unittest.cc
+++ b/chromecast/media/cma/base/multi_demuxer_stream_adapter_unittest.cc
@@ -2,10 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <memory>
+
#include "base/bind.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/thread_task_runner_handle.h"
#include "base/threading/thread.h"
@@ -88,10 +90,9 @@ void MultiDemuxerStreamAdaptersTest::Start() {
frame_received_count_ = 0;
for (auto& stream : demuxer_streams_) {
- coded_frame_providers_.push_back(make_scoped_ptr(
+ coded_frame_providers_.push_back(base::WrapUnique(
new DemuxerStreamAdapter(base::ThreadTaskRunnerHandle::Get(),
- media_task_runner_factory_,
- stream)));
+ media_task_runner_factory_, stream)));
}
running_stream_count_ = coded_frame_providers_.size();
@@ -150,14 +151,14 @@ TEST_F(MultiDemuxerStreamAdaptersTest, EarlyEos) {
frame_count_short +
kMaxPtsDiffMs / DemuxerStreamForTest::kDemuxerStreamForTestFrameDuration +
100;
- demuxer_streams_.push_back(scoped_ptr<DemuxerStreamForTest>(
+ demuxer_streams_.push_back(std::unique_ptr<DemuxerStreamForTest>(
new DemuxerStreamForTest(frame_count_short, 2, 0, config_idx_)));
- demuxer_streams_.push_back(scoped_ptr<DemuxerStreamForTest>(
+ demuxer_streams_.push_back(std::unique_ptr<DemuxerStreamForTest>(
new DemuxerStreamForTest(frame_count_long, 10, 0, config_idx_)));
total_expected_frames_ = frame_count_short + frame_count_long;
- scoped_ptr<base::MessageLoop> message_loop(new base::MessageLoop());
+ std::unique_ptr<base::MessageLoop> message_loop(new base::MessageLoop());
message_loop->PostTask(FROM_HERE,
base::Bind(&MultiDemuxerStreamAdaptersTest::Start,
base::Unretained(this)));
« no previous file with comments | « chromecast/media/cma/base/demuxer_stream_adapter_unittest.cc ('k') | chromecast/media/cma/decoder/cast_audio_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698