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

Unified Diff: remoting/protocol/jingle_session.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/jingle_session.h
diff --git a/remoting/protocol/jingle_session.h b/remoting/protocol/jingle_session.h
index 7ab5f147c4ccd7be7bd22009912a0b87f2857bb1..3230f572e065f633cf9340ced1d30b4ee35482fa 100644
--- a/remoting/protocol/jingle_session.h
+++ b/remoting/protocol/jingle_session.h
@@ -25,6 +25,8 @@ class JingleSessionManager;
class JingleSession : public protocol::Session,
public sigslot::has_slots<> {
public:
+ virtual ~JingleSession();
+
// Session interface.
virtual void SetStateChangeCallback(
const StateChangeCallback& callback) OVERRIDE;
@@ -49,14 +51,13 @@ class JingleSession : public protocol::Session,
typedef std::map<std::string, JingleChannelConnector*> ChannelConnectorsMap;
- // Takes ownership of |authenticator|.
JingleSession(JingleSessionManager* jingle_session_manager,
cricket::Session* cricket_session,
- Authenticator* authenticator);
- virtual ~JingleSession();
+ scoped_ptr<Authenticator> authenticator);
// Called by JingleSessionManager.
- void set_candidate_config(const CandidateSessionConfig* candidate_config);
+ void set_candidate_config(
+ scoped_ptr<CandidateSessionConfig> candidate_config);
// Sends session-initiate for new session.
void SendSessionInitiate();
@@ -107,9 +108,9 @@ class JingleSession : public protocol::Session,
void SetState(State new_state);
- static cricket::SessionDescription* CreateSessionDescription(
- const CandidateSessionConfig* candidate_config,
- const buzz::XmlElement* authenticator_message);
+ static scoped_ptr<cricket::SessionDescription> CreateSessionDescription(
+ scoped_ptr<CandidateSessionConfig> candidate_config,
+ scoped_ptr<buzz::XmlElement> authenticator_message);
// JingleSessionManager that created this session. Guaranteed to
// exist throughout the lifetime of the session.

Powered by Google App Engine
This is Rietveld 408576698