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

Unified Diff: remoting/protocol/session_manager.h

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/session_manager.h
diff --git a/remoting/protocol/session_manager.h b/remoting/protocol/session_manager.h
index 0d1129e6aac5891f98e094bb206f5646ea068443..f99738ee30273a8c756499da31ffcea97a8ee179 100644
--- a/remoting/protocol/session_manager.h
+++ b/remoting/protocol/session_manager.h
@@ -128,15 +128,7 @@ class SessionManager : public base::NonThreadSafe {
};
// Initializes the session client. Caller retains ownership of the
- // |signal_strategy| and |listener|. |allow_nat_traversal| must be
- // set to true to enable NAT traversal. STUN/Relay servers are not
- // used when NAT traversal is disabled, so P2P connection will work
- // only when both peers are on the same network. If this object is
- // used in server mode, then |private_key| and |certificate| are
- // used to establish a secured communication with the client. It
- // will also take ownership of these objects. On the client side
- // pass in NULL for |private_key| and empty string for
- // |certificate|.
+ // |signal_strategy| and |listener|.
virtual void Init(SignalStrategy* signal_strategy,
Listener* listener,
const NetworkSettings& network_settings) = 0;
@@ -146,16 +138,13 @@ class SessionManager : public base::NonThreadSafe {
// Listener::OnInitialized() has been called.
//
// |host_jid| is the full jid of the host to connect to.
- // |host_public_key| is used to for authentication.
// |authenticator| is a client authenticator for the session.
// |config| contains the session configurations that the client supports.
// |state_change_callback| is called when the connection state changes.
- //
- // Ownership of the |config| is passed to the new session.
- virtual Session* Connect(
+ virtual scoped_ptr<Session> Connect(
const std::string& host_jid,
- Authenticator* authenticator,
- CandidateSessionConfig* config,
+ scoped_ptr<Authenticator> authenticator,
+ scoped_ptr<CandidateSessionConfig> config,
const Session::StateChangeCallback& state_change_callback) = 0;
// Close session manager. Can be called only after all corresponding

Powered by Google App Engine
This is Rietveld 408576698