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

Unified Diff: media/base/null_video_sink_unittest.cc

Issue 1906423005: Replace scoped_ptr with std::unique_ptr in //media/base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-media-base: . 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: media/base/null_video_sink_unittest.cc
diff --git a/media/base/null_video_sink_unittest.cc b/media/base/null_video_sink_unittest.cc
index 996edc0fe8d154329574280f6a1d78ec122d69ab..3c34e0d9b2a91166acd425a15a1e4a33cbb36b9d 100644
--- a/media/base/null_video_sink_unittest.cc
+++ b/media/base/null_video_sink_unittest.cc
@@ -2,6 +2,8 @@
// 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/callback_helpers.h"
#include "base/macros.h"
@@ -31,9 +33,9 @@ class NullVideoSinkTest : public testing::Test,
}
~NullVideoSinkTest() override {}
- scoped_ptr<NullVideoSink> ConstructSink(bool clockless,
- base::TimeDelta interval) {
- scoped_ptr<NullVideoSink> new_sink(new NullVideoSink(
+ std::unique_ptr<NullVideoSink> ConstructSink(bool clockless,
+ base::TimeDelta interval) {
+ std::unique_ptr<NullVideoSink> new_sink(new NullVideoSink(
clockless, interval,
base::Bind(&NullVideoSinkTest::FrameReceived, base::Unretained(this)),
message_loop_.task_runner()));
@@ -67,7 +69,7 @@ class NullVideoSinkTest : public testing::Test,
TEST_F(NullVideoSinkTest, BasicFunctionality) {
const base::TimeDelta kInterval = base::TimeDelta::FromMilliseconds(25);
- scoped_ptr<NullVideoSink> sink = ConstructSink(false, kInterval);
+ std::unique_ptr<NullVideoSink> sink = ConstructSink(false, kInterval);
scoped_refptr<VideoFrame> test_frame = CreateFrame(base::TimeDelta());
// The sink shouldn't have to be started to use the paint method.
@@ -117,7 +119,7 @@ TEST_F(NullVideoSinkTest, BasicFunctionality) {
TEST_F(NullVideoSinkTest, ClocklessFunctionality) {
// Construct the sink with a huge interval, it should still complete quickly.
const base::TimeDelta interval = base::TimeDelta::FromSeconds(10);
- scoped_ptr<NullVideoSink> sink = ConstructSink(true, interval);
+ std::unique_ptr<NullVideoSink> sink = ConstructSink(true, interval);
scoped_refptr<VideoFrame> test_frame = CreateFrame(base::TimeDelta());
sink->Start(this);

Powered by Google App Engine
This is Rietveld 408576698