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

Unified Diff: remoting/protocol/pepper_session_manager.cc

Issue 9240033: Use scoped_ptr<>.Pass() to pass ownership in the remoting protocol code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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
Index: remoting/protocol/pepper_session_manager.cc
diff --git a/remoting/protocol/pepper_session_manager.cc b/remoting/protocol/pepper_session_manager.cc
index 877b650b00c0729adf8c746df2700082c47370d3..baf8dbda3719dc35ea7b080849e55889f1cc4c5d 100644
--- a/remoting/protocol/pepper_session_manager.cc
+++ b/remoting/protocol/pepper_session_manager.cc
@@ -70,16 +70,16 @@ void PepperSessionManager::OnJingleInfo(
}
}
-Session* PepperSessionManager::Connect(
+scoped_ptr<Session> PepperSessionManager::Connect(
const std::string& host_jid,
- Authenticator* authenticator,
- CandidateSessionConfig* config,
+ scoped_ptr<Authenticator> authenticator,
+ scoped_ptr<CandidateSessionConfig> config,
const Session::StateChangeCallback& state_change_callback) {
PepperSession* session = new PepperSession(this);
Wez 2012/01/19 03:18:17 Make this the scoped_ptr<>, and return Pass()?
Sergey Ulanov 2012/01/19 20:11:42 Done.
- session->StartConnection(host_jid, authenticator, config,
+ session->StartConnection(host_jid, authenticator.Pass(), config.Pass(),
state_change_callback);
sessions_[session->session_id_] = session;
- return session;
+ return scoped_ptr<Session>(session);
}
void PepperSessionManager::Close() {

Powered by Google App Engine
This is Rietveld 408576698