Index: remoting/host/chromoting_host_unittest.cc |
diff --git a/remoting/host/chromoting_host_unittest.cc b/remoting/host/chromoting_host_unittest.cc |
index a797e4be2efda4020d58475634d8af500c4de760..a7377a44550ff6d99850ead0230ed62621133b12 100644 |
--- a/remoting/host/chromoting_host_unittest.cc |
+++ b/remoting/host/chromoting_host_unittest.cc |
@@ -104,8 +104,10 @@ class ChromotingHostTest : public testing::Test { |
local_input_monitor_ = new MockLocalInputMonitor(); |
it2me_host_user_interface_.reset(new It2MeHostUserInterface(host_, |
&context_)); |
- it2me_host_user_interface_->InitFrom(disconnect_window_, continue_window_, |
- local_input_monitor_); |
+ it2me_host_user_interface_->InitFrom( |
+ scoped_ptr<DisconnectWindow>(disconnect_window_), |
+ scoped_ptr<ContinueWindow>(continue_window_), |
+ scoped_ptr<LocalInputMonitor>(local_input_monitor_)); |
session_ = new MockSession(); |
session2_ = new MockSession(); |
@@ -178,10 +180,11 @@ class ChromotingHostTest : public testing::Test { |
// Helper method to pretend a client is connected to ChromotingHost. |
void SimulateClientConnection(int connection_index, bool authenticate) { |
- protocol::ConnectionToClient* connection = (connection_index == 0) ? |
- owned_connection_.release() : owned_connection2_.release(); |
+ scoped_ptr<protocol::ConnectionToClient> connection = |
+ ((connection_index == 0) ? owned_connection_ : owned_connection2_). |
+ PassAs<protocol::ConnectionToClient>(); |
ClientSession* client = new ClientSession( |
- host_.get(), connection, event_executor_, |
+ host_.get(), connection.Pass(), event_executor_, |
desktop_environment_->capturer()); |
connection->set_host_stub(client); |
@@ -191,7 +194,7 @@ class ChromotingHostTest : public testing::Test { |
if (authenticate) { |
context_.network_message_loop()->PostTask( |
FROM_HERE, base::Bind(&ClientSession::OnConnectionOpened, |
- base::Unretained(client), connection)); |
+ base::Unretained(client), connection.get())); |
Alpha Left Google
2012/03/20 18:56:40
Isn't this connection.get() will be NULL since con
Sergey Ulanov
2012/03/20 19:08:12
Done.
|
} |
if (connection_index == 0) { |