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

Unified Diff: remoting/host/client_session_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/host/client_session.cc ('k') | remoting/host/screen_recorder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/client_session_unittest.cc
diff --git a/remoting/host/client_session_unittest.cc b/remoting/host/client_session_unittest.cc
index c7dfa8987d4f74e7b37c4a6c277150823b7b6dee..0f8b61edc629fabe0de91c566a121ef6b3b66183 100644
--- a/remoting/host/client_session_unittest.cc
+++ b/remoting/host/client_session_unittest.cc
@@ -37,15 +37,14 @@ class ClientSessionTest : public testing::Test {
EXPECT_CALL(*session, jid()).WillRepeatedly(ReturnRef(client_jid_));
EXPECT_CALL(*session, SetStateChangeCallback(_));
- client_session_ = new ClientSession(
+ client_session_.reset(new ClientSession(
&session_event_handler_,
- new protocol::ConnectionToClient(
- base::MessageLoopProxy::current(), session),
- &input_stub_, &capturer_);
+ new protocol::ConnectionToClient(session),
+ &input_stub_, &capturer_));
}
virtual void TearDown() OVERRIDE {
- client_session_ = NULL;
+ client_session_.reset();
// Run message loop before destroying because protocol::Session is
// destroyed asynchronously.
message_loop_.RunAllPending();
@@ -59,7 +58,7 @@ class ClientSessionTest : public testing::Test {
MockInputStub input_stub_;
MockCapturer capturer_;
MockClientSessionEventHandler session_event_handler_;
- scoped_refptr<ClientSession> client_session_;
+ scoped_ptr<ClientSession> client_session_;
};
MATCHER_P2(EqualsKeyEvent, keycode, pressed, "") {
« no previous file with comments | « remoting/host/client_session.cc ('k') | remoting/host/screen_recorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698