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

Unified Diff: remoting/jingle_glue/http_port_allocator.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/http_port_allocator.cc
diff --git a/remoting/jingle_glue/http_port_allocator.cc b/remoting/jingle_glue/http_port_allocator.cc
new file mode 100644
index 0000000000000000000000000000000000000000..06639da51dc9d72ea80184af0a363a116191f32d
--- /dev/null
+++ b/remoting/jingle_glue/http_port_allocator.cc
@@ -0,0 +1,38 @@
+// 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.
+
+#include "remoting/jingle_glue/http_port_allocator.h"
+
+namespace remoting {
+
+PortAllocatorSessionFactory::~PortAllocatorSessionFactory() {
+}
+
+HttpPortAllocator::HttpPortAllocator(
+ talk_base::NetworkManager* network_manager,
+ talk_base::PacketSocketFactory* socket_factory,
+ PortAllocatorSessionFactory* session_factory,
+ const std::string &user_agent)
+ : cricket::HttpPortAllocator(network_manager,
+ socket_factory,
+ user_agent),
+ session_factory_(session_factory) {
+}
+
+HttpPortAllocator::~HttpPortAllocator() {
+}
+
+cricket::PortAllocatorSession *HttpPortAllocator::CreateSession(
+ const std::string& name, const std::string& session_type) {
+ if (session_factory_) {
+ return session_factory_->CreateSession(
+ this, name, session_type, stun_hosts(), relay_hosts(), relay_token(),
+ user_agent());
+ }
+ return new cricket::HttpPortAllocatorSession(
+ this, name, session_type, stun_hosts(), relay_hosts(), relay_token(),
+ user_agent());
+}
+
+} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698