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

Unified Diff: remoting/jingle_glue/jingle_client.cc

Issue 6623048: Replace libjingle's HttpPortAllocatorSession with Pepper's http client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: thread switching Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: remoting/jingle_glue/jingle_client.cc
diff --git a/remoting/jingle_glue/jingle_client.cc b/remoting/jingle_glue/jingle_client.cc
index fd0bd5b0fccb260a545423b6d1805b7c872f5a5e..df3d9761b8f3d835678efd77d40d6ef6f6202b9d 100644
--- a/remoting/jingle_glue/jingle_client.cc
+++ b/remoting/jingle_glue/jingle_client.cc
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "base/message_loop.h"
#include "jingle/notifier/communicator/gaia_token_pre_xmpp_auth.h"
+#include "remoting/jingle_glue/http_port_allocator.h"
#include "remoting/jingle_glue/iq_request.h"
#include "remoting/jingle_glue/jingle_info_task.h"
#include "remoting/jingle_glue/jingle_thread.h"
@@ -16,7 +17,6 @@
#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"
-#include "third_party/libjingle/source/talk/p2p/client/httpportallocator.h"
#include "third_party/libjingle/source/talk/p2p/client/sessionmanagertask.h"
#include "third_party/libjingle/source/talk/session/tunnel/tunnelsessionclient.h"
#include "third_party/libjingle/source/talk/xmpp/prexmppauth.h"
@@ -197,6 +197,7 @@ JingleClient::JingleClient(JingleThread* thread,
SignalStrategy* signal_strategy,
talk_base::NetworkManager* network_manager,
talk_base::PacketSocketFactory* socket_factory,
+ PortAllocatorSessionFactory* session_factory,
Callback* callback)
: thread_(thread),
state_(START),
@@ -206,7 +207,8 @@ JingleClient::JingleClient(JingleThread* thread,
callback_(callback),
signal_strategy_(signal_strategy),
network_manager_(network_manager),
- socket_factory_(socket_factory) {
+ socket_factory_(socket_factory),
+ port_allocator_session_factory_(session_factory) {
}
JingleClient::~JingleClient() {
@@ -239,8 +241,10 @@ void JingleClient::DoInitialize() {
}
port_allocator_.reset(
- new cricket::HttpPortAllocator(network_manager_.get(),
- socket_factory_.get(), "transp2"));
+ new remoting::HttpPortAllocator(
+ network_manager_.get(), socket_factory_.get(),
+ port_allocator_session_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

Powered by Google App Engine
This is Rietveld 408576698