Index: content/renderer/p2p/socket_dispatcher.h |
diff --git a/content/renderer/p2p/socket_dispatcher.h b/content/renderer/p2p/socket_dispatcher.h |
index eb81de39d220f200ac621b7f3eea08dfcc13e569..8cebd5190f221f9eb26568fb7e6ac149482da7f3 100644 |
--- a/content/renderer/p2p/socket_dispatcher.h |
+++ b/content/renderer/p2p/socket_dispatcher.h |
@@ -15,6 +15,8 @@ |
// v IPC v |
// P2PSocketDispatcherHost <---------> P2PSocketDispatcher |
// |
+// P2PSocketDispatcher receives and dispatches messages on the |
+// renderer thread. |
#ifndef CONTENT_RENDERER_P2P_SOCKET_DISPATCHER_H_ |
#define CONTENT_RENDERER_P2P_SOCKET_DISPATCHER_H_ |
@@ -50,9 +52,6 @@ namespace content { |
class P2PHostAddressRequest; |
class P2PSocketClient; |
-// P2PSocketDispatcher works on the renderer thread. It dispatches all |
-// messages on that thread, and all its methods must be called on the |
-// same thread. |
class CONTENT_EXPORT P2PSocketDispatcher : public content::RenderViewObserver { |
public: |
explicit P2PSocketDispatcher(RenderViewImpl* render_view); |
@@ -60,11 +59,13 @@ class CONTENT_EXPORT P2PSocketDispatcher : public content::RenderViewObserver { |
// Add a new network list observer. Each observer is called |
// immidiately after it is registered and then later whenever |
- // network configuration changes. |
+ // network configuration changes. Can be called on any thread. The |
+ // observer is always called on the thread it was added. |
void AddNetworkListObserver( |
webkit_glue::NetworkListObserver* network_list_observer); |
- // Removes network list observer. |
+ // Removes network list observer. Must be called on the thread on |
+ // which the observer was added. |
void RemoveNetworkListObserver( |
webkit_glue::NetworkListObserver* network_list_observer); |