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

Unified Diff: remoting/protocol/pseudotcp_adapter_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/pseudotcp_adapter.cc ('k') | remoting/protocol/pseudotcp_channel_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/pseudotcp_adapter_unittest.cc
diff --git a/remoting/protocol/pseudotcp_adapter_unittest.cc b/remoting/protocol/pseudotcp_adapter_unittest.cc
index 16b3a1fdd7167808704cac77022e1f94d53fe22c..45ea7c35e6a5c936be2f85b1f3cc7e6ee36a4158 100644
--- a/remoting/protocol/pseudotcp_adapter_unittest.cc
+++ b/remoting/protocol/pseudotcp_adapter_unittest.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/compiler_specific.h"
+#include "base/memory/ptr_util.h"
#include "jingle/glue/thread_wrapper.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
@@ -294,16 +295,16 @@ class PseudoTcpAdapterTest : public testing::Test {
host_socket_->Connect(client_socket_);
client_socket_->Connect(host_socket_);
- host_pseudotcp_.reset(new PseudoTcpAdapter(make_scoped_ptr(host_socket_)));
+ host_pseudotcp_.reset(new PseudoTcpAdapter(base::WrapUnique(host_socket_)));
client_pseudotcp_.reset(
- new PseudoTcpAdapter(make_scoped_ptr(client_socket_)));
+ new PseudoTcpAdapter(base::WrapUnique(client_socket_)));
}
FakeSocket* host_socket_;
FakeSocket* client_socket_;
- scoped_ptr<PseudoTcpAdapter> host_pseudotcp_;
- scoped_ptr<PseudoTcpAdapter> client_pseudotcp_;
+ std::unique_ptr<PseudoTcpAdapter> host_pseudotcp_;
+ std::unique_ptr<PseudoTcpAdapter> client_pseudotcp_;
base::MessageLoop message_loop_;
};
@@ -368,7 +369,7 @@ TEST_F(PseudoTcpAdapterTest, LimitedChannel) {
class DeleteOnConnected {
public:
DeleteOnConnected(base::MessageLoop* message_loop,
- scoped_ptr<PseudoTcpAdapter>* adapter)
+ std::unique_ptr<PseudoTcpAdapter>* adapter)
: message_loop_(message_loop), adapter_(adapter) {}
void OnConnected(int error) {
adapter_->reset();
@@ -376,7 +377,7 @@ class DeleteOnConnected {
base::MessageLoop::QuitWhenIdleClosure());
}
base::MessageLoop* message_loop_;
- scoped_ptr<PseudoTcpAdapter>* adapter_;
+ std::unique_ptr<PseudoTcpAdapter>* adapter_;
};
TEST_F(PseudoTcpAdapterTest, DeleteOnConnected) {
« no previous file with comments | « remoting/protocol/pseudotcp_adapter.cc ('k') | remoting/protocol/pseudotcp_channel_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698