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

Unified Diff: remoting/protocol/chromium_port_allocator.h

Issue 1521883006: Add TransportContext class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/chromium_port_allocator.h
diff --git a/remoting/protocol/chromium_port_allocator.h b/remoting/protocol/chromium_port_allocator.h
index a2b759c18739166cafae010205dc04ddedae8911..65d5799b266b42240a528e5bb9aaeac434ed5841 100644
--- a/remoting/protocol/chromium_port_allocator.h
+++ b/remoting/protocol/chromium_port_allocator.h
@@ -9,6 +9,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "remoting/protocol/port_allocator_factory.h"
#include "third_party/webrtc/p2p/client/httpportallocator.h"
namespace net {
@@ -20,14 +21,12 @@ namespace protocol {
struct NetworkSettings;
-// An implementation of cricket::PortAllocator for libjingle that
-// uses Chromium's network stack and configures itself according
-// to the specified NetworkSettings.
+// An implementation of cricket::PortAllocator that uses Chromium's network
+// stack.
class ChromiumPortAllocator : public cricket::HttpPortAllocatorBase {
public:
static scoped_ptr<ChromiumPortAllocator> Create(
- const scoped_refptr<net::URLRequestContextGetter>& url_context,
- const NetworkSettings& network_settings);
+ const scoped_refptr<net::URLRequestContextGetter>& url_context);
~ChromiumPortAllocator() override;
@@ -51,6 +50,21 @@ class ChromiumPortAllocator : public cricket::HttpPortAllocatorBase {
DISALLOW_COPY_AND_ASSIGN(ChromiumPortAllocator);
};
+class ChromiumPortAllocatorFactory : public PortAllocatorFactory {
+ public:
+ ChromiumPortAllocatorFactory(
+ scoped_refptr<net::URLRequestContextGetter> url_request_context_getter);
+ ~ChromiumPortAllocatorFactory() override;
+
+ // PortAllocatorFactory interface.
+ scoped_ptr<cricket::HttpPortAllocatorBase> CreatePortAllocator() override;
+
+ private:
+ scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChromiumPortAllocatorFactory);
+};
+
} // namespace protocol
} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698