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

Unified Diff: remoting/protocol/connection_to_client_unittest.cc

Issue 8495035: Make ConnectionToClient and ClientSession not ref-counted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 1 month 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/connection_to_client.cc ('k') | remoting/protocol/jingle_session_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/connection_to_client_unittest.cc
diff --git a/remoting/protocol/connection_to_client_unittest.cc b/remoting/protocol/connection_to_client_unittest.cc
index 81ea1f0e79b55e19f0a0ffe5ea7bc036e85343da..358c84419cf49141229ea6d0a7d53a6abb30e8c9 100644
--- a/remoting/protocol/connection_to_client_unittest.cc
+++ b/remoting/protocol/connection_to_client_unittest.cc
@@ -25,13 +25,12 @@ class ConnectionToClientTest : public testing::Test {
}
protected:
- virtual void SetUp() {
+ virtual void SetUp() OVERRIDE {
session_ = new protocol::FakeSession();
session_->set_message_loop(&message_loop_);
// Allocate a ClientConnection object with the mock objects.
- viewer_ = new ConnectionToClient(
- base::MessageLoopProxy::current(), session_);
+ viewer_.reset(new ConnectionToClient(session_));
viewer_->set_host_stub(&host_stub_);
viewer_->set_input_stub(&input_stub_);
viewer_->SetEventHandler(&handler_);
@@ -44,7 +43,7 @@ class ConnectionToClientTest : public testing::Test {
}
virtual void TearDown() OVERRIDE {
- viewer_ = NULL;
+ viewer_.reset();
message_loop_.RunAllPending();
}
@@ -52,7 +51,7 @@ class ConnectionToClientTest : public testing::Test {
MockConnectionToClientEventHandler handler_;
MockHostStub host_stub_;
MockInputStub input_stub_;
- scoped_refptr<ConnectionToClient> viewer_;
+ scoped_ptr<ConnectionToClient> viewer_;
// Owned by |viewer_|.
protocol::FakeSession* session_;
« no previous file with comments | « remoting/protocol/connection_to_client.cc ('k') | remoting/protocol/jingle_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698