diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 14:05:47 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 14:05:47 +0000 |
commit | a8381db264be4ee75551b97c76a6cd5a8284c18a (patch) | |
tree | 19c0109001820010d003aa0bed7a677e721a7c10 /remoting | |
parent | f2d3600970493d0291caee504e5ebb933596b6b1 (diff) | |
download | chromium_src-a8381db264be4ee75551b97c76a6cd5a8284c18a.zip chromium_src-a8381db264be4ee75551b97c76a6cd5a8284c18a.tar.gz chromium_src-a8381db264be4ee75551b97c76a6cd5a8284c18a.tar.bz2 |
Switch to new libjingle branch.
BUG=None
TEST=Compiles, Unittests
Review URL: http://codereview.chromium.org/6626010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76913 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/jingle_glue/jingle_client.cc | 11 | ||||
-rw-r--r-- | remoting/jingle_glue/jingle_client.h | 5 | ||||
-rw-r--r-- | remoting/protocol/session_manager_pair.cc | 6 | ||||
-rw-r--r-- | remoting/protocol/session_manager_pair.h | 2 |
4 files changed, 19 insertions, 5 deletions
diff --git a/remoting/jingle_glue/jingle_client.cc b/remoting/jingle_glue/jingle_client.cc index 085e47c..20d4057 100644 --- a/remoting/jingle_glue/jingle_client.cc +++ b/remoting/jingle_glue/jingle_client.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -12,6 +12,7 @@ #include "remoting/jingle_glue/jingle_thread.h" #include "remoting/jingle_glue/xmpp_socket_adapter.h" #include "third_party/libjingle/source/talk/base/asyncsocket.h" +#include "third_party/libjingle/source/talk/base/basicpacketsocketfactory.h" #include "third_party/libjingle/source/talk/base/ssladapter.h" #include "third_party/libjingle/source/talk/p2p/base/sessionmanager.h" #include "third_party/libjingle/source/talk/p2p/base/transport.h" @@ -211,8 +212,14 @@ void JingleClient::DoInitialize() { DCHECK_EQ(message_loop(), MessageLoop::current()); network_manager_.reset(new talk_base::NetworkManager()); + // TODO(sergeyu): Use IpcPacketSocketFactory here when it is + // implemented. + socket_factory_.reset(new talk_base::BasicPacketSocketFactory( + talk_base::Thread::Current())); + port_allocator_.reset( - new cricket::HttpPortAllocator(network_manager_.get(), "transp2")); + new cricket::HttpPortAllocator(network_manager_.get(), + socket_factory_.get(), "transp2")); // TODO(ajwong): The strategy needs a "start" command or something. Right // now, Init() implicitly starts processing events. Thus, we must have the // other fields of JingleClient initialized first, otherwise the state-change diff --git a/remoting/jingle_glue/jingle_client.h b/remoting/jingle_glue/jingle_client.h index ba759b9..4d877b5 100644 --- a/remoting/jingle_glue/jingle_client.h +++ b/remoting/jingle_glue/jingle_client.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -17,6 +17,7 @@ class Task; namespace talk_base { class NetworkManager; +class PacketSocketFactory; } // namespace talk_base namespace buzz { @@ -103,7 +104,6 @@ class XmppSignalStrategy : public SignalStrategy, public sigslot::has_slots<> { std::string auth_token_service_; buzz::XmppClient* xmpp_client_; StatusObserver* observer_; - scoped_ptr<talk_base::NetworkManager> network_manager_; cricket::HttpPortAllocator* port_allocator_; scoped_ptr<Task> allocator_config_cb_; @@ -210,6 +210,7 @@ class JingleClient : public base::RefCountedThreadSafe<JingleClient>, SignalStrategy* signal_strategy_; scoped_ptr<talk_base::NetworkManager> network_manager_; + scoped_ptr<talk_base::PacketSocketFactory> socket_factory_; scoped_ptr<cricket::HttpPortAllocator> port_allocator_; scoped_ptr<cricket::SessionManager> session_manager_; diff --git a/remoting/protocol/session_manager_pair.cc b/remoting/protocol/session_manager_pair.cc index b4cf131..ab776cd 100644 --- a/remoting/protocol/session_manager_pair.cc +++ b/remoting/protocol/session_manager_pair.cc @@ -7,6 +7,7 @@ #include "base/logging.h" #include "remoting/jingle_glue/jingle_thread.h" #include "third_party/libjingle/source/talk/base/network.h" +#include "third_party/libjingle/source/talk/base/basicpacketsocketfactory.h" #include "third_party/libjingle/source/talk/p2p/base/sessionmanager.h" #include "third_party/libjingle/source/talk/p2p/client/basicportallocator.h" #include "third_party/libjingle/source/talk/xmllite/xmlelement.h" @@ -26,9 +27,12 @@ void SessionManagerPair::Init() { DCHECK_EQ(message_loop_, MessageLoop::current()); network_manager_.reset(new talk_base::NetworkManager()); + socket_factory_.reset(new talk_base::BasicPacketSocketFactory( + talk_base::Thread::Current())); cricket::BasicPortAllocator* port_allocator = - new cricket::BasicPortAllocator(network_manager_.get()); + new cricket::BasicPortAllocator(network_manager_.get(), + socket_factory_.get()); port_allocator_.reset(port_allocator); host_session_manager_.reset(new cricket::SessionManager(port_allocator)); diff --git a/remoting/protocol/session_manager_pair.h b/remoting/protocol/session_manager_pair.h index f3e4f37f..cc8b75c 100644 --- a/remoting/protocol/session_manager_pair.h +++ b/remoting/protocol/session_manager_pair.h @@ -28,6 +28,7 @@ class SessionManager; namespace talk_base { class NetworkManager; +class PacketSocketFactory; } // namespace talk_base namespace remoting { @@ -61,6 +62,7 @@ class SessionManagerPair MessageLoop* message_loop_; scoped_ptr<talk_base::NetworkManager> network_manager_; + scoped_ptr<talk_base::PacketSocketFactory> socket_factory_; scoped_ptr<cricket::BasicPortAllocator> port_allocator_; scoped_ptr<cricket::SessionManager> host_session_manager_; scoped_ptr<cricket::SessionManager> client_session_manager_; |