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

Unified Diff: content/renderer/p2p/port_allocator.h

Issue 1349823004: Check media permissions (mic/camera) before exposing local addresses to WebRTC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, fix test issue, fix windows build issue. Created 5 years, 3 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
« no previous file with comments | « content/renderer/p2p/network_manager_uma.cc ('k') | content/renderer/p2p/port_allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/p2p/port_allocator.h
diff --git a/content/renderer/p2p/port_allocator.h b/content/renderer/p2p/port_allocator.h
index a789e7a93cc6384d14988deea084e0ca0c6f2f2d..28502f0ff152f3f0ddbc714dce7a20e232ee20f3 100644
--- a/content/renderer/p2p/port_allocator.h
+++ b/content/renderer/p2p/port_allocator.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_RENDERER_P2P_PORT_ALLOCATOR_H_
#define CONTENT_RENDERER_P2P_PORT_ALLOCATOR_H_
+#include "base/memory/ref_counted.h"
+#include "base/single_thread_task_runner.h"
#include "third_party/webrtc/p2p/client/basicportallocator.h"
#include "url/gurl.h"
@@ -44,11 +46,13 @@ class P2PPortAllocator : public cricket::BasicPortAllocator {
bool enable_multiple_routes = true;
};
- P2PPortAllocator(P2PSocketDispatcher* socket_dispatcher,
- rtc::NetworkManager* network_manager,
- rtc::PacketSocketFactory* socket_factory,
- const Config& config,
- const GURL& origin);
+ P2PPortAllocator(
+ const scoped_refptr<P2PSocketDispatcher>& socket_dispatcher,
+ scoped_ptr<rtc::NetworkManager> network_manager,
+ rtc::PacketSocketFactory* socket_factory,
+ const Config& config,
+ const GURL& origin,
+ const scoped_refptr<base::SingleThreadTaskRunner> task_runner);
~P2PPortAllocator() override;
cricket::PortAllocatorSession* CreateSessionInternal(
@@ -59,11 +63,16 @@ class P2PPortAllocator : public cricket::BasicPortAllocator {
private:
friend class P2PPortAllocatorSession;
-
- P2PSocketDispatcher* socket_dispatcher_;
+ scoped_ptr<rtc::NetworkManager> network_manager_;
+ scoped_refptr<P2PSocketDispatcher> socket_dispatcher_;
Config config_;
GURL origin_;
+ // This is the thread |network_manager_| is associated with and must be used
+ // to delete |network_manager_|.
+ const scoped_refptr<base::SingleThreadTaskRunner>
+ network_manager_task_runner_;
+
DISALLOW_COPY_AND_ASSIGN(P2PPortAllocator);
};
« no previous file with comments | « content/renderer/p2p/network_manager_uma.cc ('k') | content/renderer/p2p/port_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698