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

Side by Side Diff: content/renderer/p2p/p2p_transport_impl.cc

Issue 10689180: Rolling libjingle to 158:159 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 "content/renderer/p2p/p2p_transport_impl.h" 5 #include "content/renderer/p2p/p2p_transport_impl.h"
6 6
7 #include "content/renderer/p2p/ipc_network_manager.h" 7 #include "content/renderer/p2p/ipc_network_manager.h"
8 #include "content/renderer/p2p/ipc_socket_factory.h" 8 #include "content/renderer/p2p/ipc_socket_factory.h"
9 #include "content/renderer/p2p/port_allocator.h" 9 #include "content/renderer/p2p/port_allocator.h"
10 #include "jingle/glue/channel_socket_adapter.h" 10 #include "jingle/glue/channel_socket_adapter.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 web_frame, socket_dispatcher_, network_manager_.get(), 69 web_frame, socket_dispatcher_, network_manager_.get(),
70 socket_factory_.get(), config)); 70 socket_factory_.get(), config));
71 } else { 71 } else {
72 // Use BasicPortAllocator if we don't have P2PSocketDispatcher 72 // Use BasicPortAllocator if we don't have P2PSocketDispatcher
73 // (for unittests). 73 // (for unittests).
74 allocator_.reset(new cricket::BasicPortAllocator( 74 allocator_.reset(new cricket::BasicPortAllocator(
75 network_manager_.get(), socket_factory_.get())); 75 network_manager_.get(), socket_factory_.get()));
76 } 76 }
77 77
78 DCHECK(!channel_.get()); 78 DCHECK(!channel_.get());
79 channel_.reset(new cricket::P2PTransportChannel( 79 channel_.reset(new cricket::P2PTransportChannel("",
Sergey Ulanov 2012/07/13 21:06:24 move the new parameter to the next line.
Ronghua Wu (Left Chromium) 2012/07/14 00:06:41 Done.
80 0, NULL, allocator_.get())); 80 0, NULL, allocator_.get()));
81 channel_->SetIceUfrag( 81 channel_->SetIceUfrag(
82 talk_base::CreateRandomString(cricket::ICE_UFRAG_LENGTH)); 82 talk_base::CreateRandomString(cricket::ICE_UFRAG_LENGTH));
83 channel_->SetIcePwd(talk_base::CreateRandomString(cricket::ICE_PWD_LENGTH)); 83 channel_->SetIcePwd(talk_base::CreateRandomString(cricket::ICE_PWD_LENGTH));
84 channel_->SignalRequestSignaling.connect( 84 channel_->SignalRequestSignaling.connect(
85 this, &P2PTransportImpl::OnRequestSignaling); 85 this, &P2PTransportImpl::OnRequestSignaling);
86 channel_->SignalCandidateReady.connect( 86 channel_->SignalCandidateReady.connect(
87 this, &P2PTransportImpl::OnCandidateReady); 87 this, &P2PTransportImpl::OnCandidateReady);
88 88
89 if (protocol == PROTOCOL_UDP) { 89 if (protocol == PROTOCOL_UDP) {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 void P2PTransportImpl::OnTcpConnected(int result) { 165 void P2PTransportImpl::OnTcpConnected(int result) {
166 if (result < 0) { 166 if (result < 0) {
167 event_handler_->OnError(result); 167 event_handler_->OnError(result);
168 return; 168 return;
169 } 169 }
170 state_ = static_cast<State>(STATE_READABLE | STATE_WRITABLE); 170 state_ = static_cast<State>(STATE_READABLE | STATE_WRITABLE);
171 event_handler_->OnStateChange(state_); 171 event_handler_->OnStateChange(state_);
172 } 172 }
173 173
174 } // namespace content 174 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698