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

Side by Side Diff: remoting/client/plugin/chromoting_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 | « remoting/client/jni/chromoting_jni_instance.cc ('k') | remoting/host/it2me/it2me_host.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) 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/client/plugin/chromoting_instance.h" 5 #include "remoting/client/plugin/chromoting_instance.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 << ". Local jid: " << local_jid << "."; 651 << ". Local jid: " << local_jid << ".";
652 652
653 // Setup the signal strategy. 653 // Setup the signal strategy.
654 signal_strategy_.reset(new DelegatingSignalStrategy( 654 signal_strategy_.reset(new DelegatingSignalStrategy(
655 local_jid, base::Bind(&ChromotingInstance::SendOutgoingIq, 655 local_jid, base::Bind(&ChromotingInstance::SendOutgoingIq,
656 weak_factory_.GetWeakPtr()))); 656 weak_factory_.GetWeakPtr())));
657 657
658 scoped_ptr<cricket::HttpPortAllocatorBase> port_allocator( 658 scoped_ptr<cricket::HttpPortAllocatorBase> port_allocator(
659 PepperPortAllocator::Create(this)); 659 PepperPortAllocator::Create(this));
660 scoped_ptr<protocol::TransportFactory> transport_factory( 660 scoped_ptr<protocol::TransportFactory> transport_factory(
661 new protocol::LibjingleTransportFactory(port_allocator.Pass(), false)); 661 new protocol::LibjingleTransportFactory(
662 signal_strategy_.get(), port_allocator.Pass(),
663 NetworkSettings(NetworkSettings::NAT_TRAVERSAL_ENABLED)));
662 664
663 // Kick off the connection. 665 // Kick off the connection.
664 client_->Start(signal_strategy_.get(), transport_factory.Pass()); 666 client_->Start(signal_strategy_.get(), transport_factory.Pass());
665 667
666 // Start timer that periodically sends perf stats. 668 // Start timer that periodically sends perf stats.
667 plugin_task_runner_->PostDelayedTask( 669 plugin_task_runner_->PostDelayedTask(
668 FROM_HERE, base::Bind(&ChromotingInstance::SendPerfStats, 670 FROM_HERE, base::Bind(&ChromotingInstance::SendPerfStats,
669 weak_factory_.GetWeakPtr()), 671 weak_factory_.GetWeakPtr()),
670 base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs)); 672 base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs));
671 } 673 }
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 url_components.scheme.len); 1066 url_components.scheme.len);
1065 return url_scheme == kChromeExtensionUrlScheme; 1067 return url_scheme == kChromeExtensionUrlScheme;
1066 } 1068 }
1067 1069
1068 bool ChromotingInstance::IsConnected() { 1070 bool ChromotingInstance::IsConnected() {
1069 return host_connection_.get() && 1071 return host_connection_.get() &&
1070 (host_connection_->state() == protocol::ConnectionToHost::CONNECTED); 1072 (host_connection_->state() == protocol::ConnectionToHost::CONNECTED);
1071 } 1073 }
1072 1074
1073 } // namespace remoting 1075 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/jni/chromoting_jni_instance.cc ('k') | remoting/host/it2me/it2me_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698