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

Side by Side Diff: remoting/client/jni/chromoting_jni_instance.cc

Issue 98173006: Fix LibjingleTransportFactory to refresh STUN/Relay. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « no previous file | remoting/client/plugin/chromoting_instance.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/client/jni/chromoting_jni_instance.h" 5 #include "remoting/client/jni/chromoting_jni_instance.h"
6 6
7 #include <android/log.h> 7 #include <android/log.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 302
303 NetworkSettings network_settings(NetworkSettings::NAT_TRAVERSAL_ENABLED); 303 NetworkSettings network_settings(NetworkSettings::NAT_TRAVERSAL_ENABLED);
304 304
305 // Use Chrome's network stack to allocate ports for peer-to-peer channels. 305 // Use Chrome's network stack to allocate ports for peer-to-peer channels.
306 scoped_ptr<ChromiumPortAllocator> port_allocator( 306 scoped_ptr<ChromiumPortAllocator> port_allocator(
307 ChromiumPortAllocator::Create(jni_runtime_->url_requester(), 307 ChromiumPortAllocator::Create(jni_runtime_->url_requester(),
308 network_settings)); 308 network_settings));
309 309
310 scoped_ptr<protocol::TransportFactory> transport_factory( 310 scoped_ptr<protocol::TransportFactory> transport_factory(
311 new protocol::LibjingleTransportFactory( 311 new protocol::LibjingleTransportFactory(
312 port_allocator.PassAs<cricket::HttpPortAllocatorBase>(), false)); 312 signaling_.get(),
313 port_allocator.PassAs<cricket::HttpPortAllocatorBase>(),
314 network_settings));
313 315
314 client_->Start(signaling_.get(), transport_factory.Pass()); 316 client_->Start(signaling_.get(), transport_factory.Pass());
315 } 317 }
316 318
317 void ChromotingJniInstance::DisconnectFromHostOnNetworkThread() { 319 void ChromotingJniInstance::DisconnectFromHostOnNetworkThread() {
318 DCHECK(jni_runtime_->network_task_runner()->BelongsToCurrentThread()); 320 DCHECK(jni_runtime_->network_task_runner()->BelongsToCurrentThread());
319 321
320 host_id_.clear(); 322 host_id_.clear();
321 323
322 stats_logging_enabled_ = false; 324 stats_logging_enabled_ = false;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 stats->video_decode_ms()->Average(), 376 stats->video_decode_ms()->Average(),
375 stats->video_paint_ms()->Average(), 377 stats->video_paint_ms()->Average(),
376 stats->round_trip_ms()->Average()); 378 stats->round_trip_ms()->Average());
377 379
378 jni_runtime_->network_task_runner()->PostDelayedTask( 380 jni_runtime_->network_task_runner()->PostDelayedTask(
379 FROM_HERE, base::Bind(&ChromotingJniInstance::LogPerfStats, this), 381 FROM_HERE, base::Bind(&ChromotingJniInstance::LogPerfStats, this),
380 base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs)); 382 base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs));
381 } 383 }
382 384
383 } // namespace remoting 385 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/client/plugin/chromoting_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698