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

Side by Side Diff: remoting/protocol/jingle_session_manager.cc

Issue 9283028: Add scoped_ptr<>::PassAs<>(). (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/protocol/jingle_session_manager.h" 5 #include "remoting/protocol/jingle_session_manager.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 cricket_session->set_remote_name(host_jid); 134 cricket_session->set_remote_name(host_jid);
135 135
136 scoped_ptr<JingleSession> jingle_session( 136 scoped_ptr<JingleSession> jingle_session(
137 new JingleSession(this, cricket_session, authenticator.Pass())); 137 new JingleSession(this, cricket_session, authenticator.Pass()));
138 jingle_session->set_candidate_config(config.Pass()); 138 jingle_session->set_candidate_config(config.Pass());
139 jingle_session->SetStateChangeCallback(state_change_callback); 139 jingle_session->SetStateChangeCallback(state_change_callback);
140 sessions_.push_back(jingle_session.get()); 140 sessions_.push_back(jingle_session.get());
141 141
142 jingle_session->SendSessionInitiate(); 142 jingle_session->SendSessionInitiate();
143 143
144 return scoped_ptr<Session>(jingle_session.Pass()); 144 return jingle_session.PassAs<Session>();
145 } 145 }
146 146
147 void JingleSessionManager::OnSessionCreate( 147 void JingleSessionManager::OnSessionCreate(
148 cricket::Session* cricket_session, bool incoming) { 148 cricket::Session* cricket_session, bool incoming) {
149 DCHECK(CalledOnValidThread()); 149 DCHECK(CalledOnValidThread());
150 150
151 // Allow local connections. 151 // Allow local connections.
152 cricket_session->set_allow_local_ips(true); 152 cricket_session->set_allow_local_ips(true);
153 153
154 if (incoming) { 154 if (incoming) {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 cricket::WriteError* error) { 261 cricket::WriteError* error) {
262 const ContentDescription* desc = 262 const ContentDescription* desc =
263 static_cast<const ContentDescription*>(content); 263 static_cast<const ContentDescription*>(content);
264 264
265 *elem = desc->ToXml(); 265 *elem = desc->ToXml();
266 return true; 266 return true;
267 } 267 }
268 268
269 } // namespace protocol 269 } // namespace protocol
270 } // namespace remoting 270 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698