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

Unified Diff: remoting/protocol/connection_to_host.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/connection_to_host.cc
diff --git a/remoting/protocol/connection_to_host.cc b/remoting/protocol/connection_to_host.cc
index 9d00f8d82ce44d6b64e8531415f74fd350bcbad4..879e1b22402ffaeff3231763c53881bc65db7681 100644
--- a/remoting/protocol/connection_to_host.cc
+++ b/remoting/protocol/connection_to_host.cc
@@ -124,14 +124,14 @@ void ConnectionToHost::OnSessionManagerReady() {
DCHECK(message_loop_->BelongsToCurrentThread());
// After SessionManager is initialized we can try to connect to the host.
- CandidateSessionConfig* candidate_config =
+ scoped_ptr<CandidateSessionConfig> candidate_config =
CandidateSessionConfig::CreateDefault();
- V1ClientAuthenticator* authenticator =
- new V1ClientAuthenticator(signal_strategy_->GetLocalJid(), access_code_);
- session_.reset(session_manager_->Connect(
- host_jid_, authenticator, candidate_config,
+ scoped_ptr<Authenticator> authenticator(
+ new V1ClientAuthenticator(signal_strategy_->GetLocalJid(), access_code_));
+ session_ = session_manager_->Connect(
+ host_jid_, authenticator.Pass(), candidate_config.Pass(),
base::Bind(&ConnectionToHost::OnSessionStateChange,
- base::Unretained(this))));
+ base::Unretained(this)));
}
void ConnectionToHost::OnIncomingSession(

Powered by Google App Engine
This is Rietveld 408576698