Chromium Code Reviews| Index: remoting/protocol/jingle_session_manager.cc |
| diff --git a/remoting/protocol/jingle_session_manager.cc b/remoting/protocol/jingle_session_manager.cc |
| index 60d84e7280d96f08be4674230cb5c61e28a21a52..2d3d09419d64f5e4cb97bcb13c0e380f331f1d5d 100644 |
| --- a/remoting/protocol/jingle_session_manager.cc |
| +++ b/remoting/protocol/jingle_session_manager.cc |
| @@ -122,10 +122,10 @@ void JingleSessionManager::set_authenticator_factory( |
| authenticator_factory_ = authenticator_factory.Pass(); |
| } |
| -Session* JingleSessionManager::Connect( |
| +scoped_ptr<Session> JingleSessionManager::Connect( |
| const std::string& host_jid, |
| - Authenticator* authenticator, |
| - CandidateSessionConfig* candidate_config, |
| + scoped_ptr<Authenticator> authenticator, |
| + scoped_ptr<CandidateSessionConfig> config, |
| const Session::StateChangeCallback& state_change_callback) { |
| DCHECK(CalledOnValidThread()); |
| @@ -134,14 +134,14 @@ Session* JingleSessionManager::Connect( |
| cricket_session->set_remote_name(host_jid); |
| JingleSession* jingle_session = |
|
Wez
2012/01/19 03:18:17
Shouldn't this become a scoped_ptr, and the return
Sergey Ulanov
2012/01/19 20:11:42
Done. This is a case when Pass() doesn't work well
Wez
2012/01/19 23:23:41
Ah... the RValue template classes don't mirror the
|
| - new JingleSession(this, cricket_session, authenticator); |
| - jingle_session->set_candidate_config(candidate_config); |
| + new JingleSession(this, cricket_session, authenticator.Pass()); |
| + jingle_session->set_candidate_config(config.Pass()); |
| jingle_session->SetStateChangeCallback(state_change_callback); |
| sessions_.push_back(jingle_session); |
| jingle_session->SendSessionInitiate(); |
| - return jingle_session; |
| + return scoped_ptr<Session>(jingle_session); |
| } |
| void JingleSessionManager::OnSessionCreate( |
| @@ -153,7 +153,7 @@ void JingleSessionManager::OnSessionCreate( |
| if (incoming) { |
| JingleSession* jingle_session = |
| - new JingleSession(this, cricket_session, NULL); |
| + new JingleSession(this, cricket_session, scoped_ptr<Authenticator>()); |
|
Wez
2012/01/19 03:18:17
nit: Ouch; unfortunate. :-/
Sergey Ulanov
2012/01/19 20:11:42
I was considering removing that last parameter fro
Wez
2012/01/19 23:23:41
Agreed.
|
| sessions_.push_back(jingle_session); |
| } |
| } |