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

Unified Diff: remoting/protocol/capture_scheduler_unittest.cc

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU 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 | « remoting/protocol/capture_scheduler.cc ('k') | remoting/protocol/channel_authenticator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/capture_scheduler_unittest.cc
diff --git a/remoting/protocol/capture_scheduler_unittest.cc b/remoting/protocol/capture_scheduler_unittest.cc
index fe752d2bd8368d98a5ff985461aae3e2edf785e2..4a6aef4ea4b4d1eada18cc3b347019285d5091a8 100644
--- a/remoting/protocol/capture_scheduler_unittest.cc
+++ b/remoting/protocol/capture_scheduler_unittest.cc
@@ -9,6 +9,7 @@
#include <utility>
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/test/simple_test_tick_clock.h"
#include "base/timer/mock_timer.h"
@@ -31,9 +32,9 @@ class CaptureSchedulerTest : public testing::Test {
scheduler_->set_minimum_interval(
base::TimeDelta::FromMilliseconds(kMinumumFrameIntervalMs));
tick_clock_ = new base::SimpleTestTickClock();
- scheduler_->SetTickClockForTest(make_scoped_ptr(tick_clock_));
+ scheduler_->SetTickClockForTest(base::WrapUnique(tick_clock_));
capture_timer_ = new base::MockTimer(false, false);
- scheduler_->SetTimerForTest(make_scoped_ptr(capture_timer_));
+ scheduler_->SetTimerForTest(base::WrapUnique(capture_timer_));
scheduler_->Start();
}
@@ -61,7 +62,7 @@ class CaptureSchedulerTest : public testing::Test {
scheduler_->OnFrameSent();
- scoped_ptr<VideoAck> ack(new VideoAck());
+ std::unique_ptr<VideoAck> ack(new VideoAck());
ack->set_frame_id(packet.frame_id());
scheduler_->ProcessVideoAck(std::move(ack));
@@ -74,7 +75,7 @@ class CaptureSchedulerTest : public testing::Test {
protected:
base::MessageLoop message_loop_;
- scoped_ptr<CaptureScheduler> scheduler_;
+ std::unique_ptr<CaptureScheduler> scheduler_;
// Owned by |scheduler_|.
base::SimpleTestTickClock* tick_clock_;
@@ -194,7 +195,7 @@ TEST_F(CaptureSchedulerTest, MaximumPendingFrames) {
// Next frame should be scheduled, once one of the queued frames is
// acknowledged.
EXPECT_FALSE(capture_timer_->IsRunning());
- scheduler_->ProcessVideoAck(make_scoped_ptr(new VideoAck()));
+ scheduler_->ProcessVideoAck(base::WrapUnique(new VideoAck()));
EXPECT_TRUE(capture_timer_->IsRunning());
}
« no previous file with comments | « remoting/protocol/capture_scheduler.cc ('k') | remoting/protocol/channel_authenticator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698