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

Unified Diff: remoting/protocol/ice_transport_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/ice_transport_channel.cc ('k') | remoting/protocol/it2me_host_authenticator_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/ice_transport_unittest.cc
diff --git a/remoting/protocol/ice_transport_unittest.cc b/remoting/protocol/ice_transport_unittest.cc
index 467fb1ae58179a21e22ac0fffc22ebedb570b889..66aa75c1c67ba43bb608a462c62279383d04fee2 100644
--- a/remoting/protocol/ice_transport_unittest.cc
+++ b/remoting/protocol/ice_transport_unittest.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/location.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
@@ -97,8 +98,8 @@ class IceTransportTest : public testing::Test {
message_loop_.RunUntilIdle();
}
- void ProcessTransportInfo(scoped_ptr<IceTransport>* target_transport,
- scoped_ptr<buzz::XmlElement> transport_info) {
+ void ProcessTransportInfo(std::unique_ptr<IceTransport>* target_transport,
+ std::unique_ptr<buzz::XmlElement> transport_info) {
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, base::Bind(&IceTransportTest::DeliverTransportInfo,
base::Unretained(this), target_transport,
@@ -106,8 +107,8 @@ class IceTransportTest : public testing::Test {
transport_info_delay_);
}
- void DeliverTransportInfo(scoped_ptr<IceTransport>* target_transport,
- scoped_ptr<buzz::XmlElement> transport_info) {
+ void DeliverTransportInfo(std::unique_ptr<IceTransport>* target_transport,
+ std::unique_ptr<buzz::XmlElement> transport_info) {
ASSERT_TRUE(target_transport);
EXPECT_TRUE(
(*target_transport)->ProcessTransportInfo(transport_info.get()));
@@ -118,7 +119,7 @@ class IceTransportTest : public testing::Test {
host_transport_.reset(new IceTransport(
new TransportContext(
- nullptr, make_scoped_ptr(new ChromiumPortAllocatorFactory()),
+ nullptr, base::WrapUnique(new ChromiumPortAllocatorFactory()),
nullptr, network_settings_, TransportRole::SERVER),
&host_event_handler_));
if (!host_authenticator_) {
@@ -128,7 +129,7 @@ class IceTransportTest : public testing::Test {
client_transport_.reset(new IceTransport(
new TransportContext(
- nullptr, make_scoped_ptr(new ChromiumPortAllocatorFactory()),
+ nullptr, base::WrapUnique(new ChromiumPortAllocatorFactory()),
nullptr, network_settings_, TransportRole::CLIENT),
&client_event_handler_));
if (!client_authenticator_) {
@@ -167,12 +168,12 @@ class IceTransportTest : public testing::Test {
EXPECT_TRUE(host_message_pipe_.get());
}
- void OnClientChannelCreated(scoped_ptr<MessagePipe> message_pipe) {
+ void OnClientChannelCreated(std::unique_ptr<MessagePipe> message_pipe) {
client_message_pipe_ = std::move(message_pipe);
client_channel_callback_.OnDone(client_message_pipe_.get());
}
- void OnHostChannelCreated(scoped_ptr<MessagePipe> message_pipe) {
+ void OnHostChannelCreated(std::unique_ptr<MessagePipe> message_pipe) {
host_message_pipe_ = std::move(message_pipe);
host_channel_callback_.OnDone(host_message_pipe_.get());
}
@@ -185,25 +186,25 @@ class IceTransportTest : public testing::Test {
protected:
base::MessageLoopForIO message_loop_;
- scoped_ptr<base::RunLoop> run_loop_;
+ std::unique_ptr<base::RunLoop> run_loop_;
NetworkSettings network_settings_;
base::TimeDelta transport_info_delay_;
- scoped_ptr<IceTransport> host_transport_;
+ std::unique_ptr<IceTransport> host_transport_;
TestTransportEventHandler host_event_handler_;
- scoped_ptr<FakeAuthenticator> host_authenticator_;
+ std::unique_ptr<FakeAuthenticator> host_authenticator_;
- scoped_ptr<IceTransport> client_transport_;
+ std::unique_ptr<IceTransport> client_transport_;
TestTransportEventHandler client_event_handler_;
- scoped_ptr<FakeAuthenticator> client_authenticator_;
+ std::unique_ptr<FakeAuthenticator> client_authenticator_;
MockChannelCreatedCallback client_channel_callback_;
MockChannelCreatedCallback host_channel_callback_;
- scoped_ptr<MessagePipe> client_message_pipe_;
- scoped_ptr<MessagePipe> host_message_pipe_;
+ std::unique_ptr<MessagePipe> client_message_pipe_;
+ std::unique_ptr<MessagePipe> host_message_pipe_;
ErrorCode error_ = OK;
};
« no previous file with comments | « remoting/protocol/ice_transport_channel.cc ('k') | remoting/protocol/it2me_host_authenticator_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698