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

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

Issue 4291001: Convert implicit scoped_refptr constructor calls to explicit ones, part 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/build
Patch Set: comments Created 10 years, 1 month 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
« no previous file with comments | « remoting/base/tracer.cc ('k') | remoting/protocol/message_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_chromotocol_server.h" 5 #include "remoting/protocol/jingle_chromotocol_server.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "remoting/base/constants.h" 9 #include "remoting/base/constants.h"
10 #include "remoting/jingle_glue/jingle_thread.h" 10 #include "remoting/jingle_glue/jingle_thread.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 DCHECK_EQ(message_loop(), MessageLoop::current()); 263 DCHECK_EQ(message_loop(), MessageLoop::current());
264 264
265 // Allow local connections if neccessary. 265 // Allow local connections if neccessary.
266 session->set_allow_local_ips(allow_local_ips_); 266 session->set_allow_local_ips(allow_local_ips_);
267 267
268 // If this is an outcoming session the connection object is already 268 // If this is an outcoming session the connection object is already
269 // created. 269 // created.
270 if (incoming) { 270 if (incoming) {
271 JingleChromotocolConnection* connection = 271 JingleChromotocolConnection* connection =
272 new JingleChromotocolConnection(this); 272 new JingleChromotocolConnection(this);
273 connections_.push_back(connection); 273 connections_.push_back(make_scoped_refptr(connection));
274 connection->Init(session); 274 connection->Init(session);
275 } 275 }
276 } 276 }
277 277
278 void JingleChromotocolServer::OnSessionDestroy(Session* session) { 278 void JingleChromotocolServer::OnSessionDestroy(Session* session) {
279 DCHECK_EQ(message_loop(), MessageLoop::current()); 279 DCHECK_EQ(message_loop(), MessageLoop::current());
280 280
281 std::list<scoped_refptr<JingleChromotocolConnection> >::iterator it; 281 std::list<scoped_refptr<JingleChromotocolConnection> >::iterator it;
282 for (it = connections_.begin(); it != connections_.end(); ++it) { 282 for (it = connections_.begin(); it != connections_.end(); ++it) {
283 if ((*it)->HasSession(session)) { 283 if ((*it)->HasSession(session)) {
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 SessionDescription* JingleChromotocolServer::CreateSessionDescription( 467 SessionDescription* JingleChromotocolServer::CreateSessionDescription(
468 const CandidateChromotocolConfig* config) { 468 const CandidateChromotocolConfig* config) {
469 SessionDescription* desc = new SessionDescription(); 469 SessionDescription* desc = new SessionDescription();
470 desc->AddContent(JingleChromotocolConnection::kChromotingContentName, 470 desc->AddContent(JingleChromotocolConnection::kChromotingContentName,
471 kChromotingXmlNamespace, 471 kChromotingXmlNamespace,
472 new ChromotocolContentDescription(config)); 472 new ChromotocolContentDescription(config));
473 return desc; 473 return desc;
474 } 474 }
475 475
476 } // namespace remoting 476 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/base/tracer.cc ('k') | remoting/protocol/message_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698