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

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
« no previous file with comments | « remoting/host/session_manager_factory.cc ('k') | remoting/protocol/chromium_port_allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/chromium_port_allocator.h
diff --git a/remoting/protocol/chromium_port_allocator.h b/remoting/protocol/chromium_port_allocator.h
index 021000ed5699db3fef4a6b6c4cbb5d7bed8de8ff..65d5799b266b42240a528e5bb9aaeac434ed5841 100644
--- a/remoting/protocol/chromium_port_allocator.h
+++ b/remoting/protocol/chromium_port_allocator.h
@@ -9,22 +9,24 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "net/url_request/url_request_context_getter.h"
+#include "remoting/protocol/port_allocator_factory.h"
#include "third_party/webrtc/p2p/client/httpportallocator.h"
+namespace net {
+class URLRequestContextGetter;
+} // namespace net
+
namespace remoting {
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;
@@ -48,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
« no previous file with comments | « remoting/host/session_manager_factory.cc ('k') | remoting/protocol/chromium_port_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698