Index: content/browser/renderer_host/p2p/socket_host_tcp.h |
=================================================================== |
--- content/browser/renderer_host/p2p/socket_host_tcp.h (revision 206737) |
+++ content/browser/renderer_host/p2p/socket_host_tcp.h (working copy) |
@@ -16,6 +16,9 @@ |
#include "content/common/p2p_sockets.h" |
#include "net/base/completion_callback.h" |
#include "net/base/ip_endpoint.h" |
+#include "net/proxy/proxy_service.h" |
+#include "net/url_request/url_request_context.h" |
+#include "net/url_request/url_request_context_getter.h" |
namespace net { |
class DrainableIOBuffer; |
@@ -27,7 +30,8 @@ |
class CONTENT_EXPORT P2PSocketHostTcpBase : public P2PSocketHost { |
public: |
- P2PSocketHostTcpBase(IPC::Sender* message_sender, int id); |
+ P2PSocketHostTcpBase(IPC::Sender* message_sender, int id, |
+ net::URLRequestContextGetter* getter); |
virtual ~P2PSocketHostTcpBase(); |
bool InitAccepted(const net::IPEndPoint& remote_address, |
@@ -52,9 +56,8 @@ |
void OnError(); |
private: |
- friend class P2PSocketHostTcpTest; |
+ friend class P2PSocketHostTcpTestBase; |
friend class P2PSocketHostTcpServerTest; |
- friend class P2PSocketHostStunTcpTest; |
void DidCompleteRead(int result); |
void DoRead(); |
@@ -69,6 +72,8 @@ |
net::IPEndPoint remote_address_; |
+ //base::WeakPtrFactory<P2PSocketHostTcpBase> weak_ptr_factory_; |
+ |
scoped_ptr<net::StreamSocket> socket_; |
scoped_refptr<net::GrowableIOBuffer> read_buffer_; |
std::queue<scoped_refptr<net::DrainableIOBuffer> > write_queue_; |
@@ -78,12 +83,16 @@ |
bool connected_; |
+ scoped_refptr<net::URLRequestContextGetter> context_getter_; |
+ net::ProxyService* proxy_service_; |
+ |
DISALLOW_COPY_AND_ASSIGN(P2PSocketHostTcpBase); |
}; |
class CONTENT_EXPORT P2PSocketHostTcp : public P2PSocketHostTcpBase { |
public: |
- P2PSocketHostTcp(IPC::Sender* message_sender, int id); |
+ P2PSocketHostTcp(IPC::Sender* message_sender, int id, |
+ net::URLRequestContextGetter* getter); |
virtual ~P2PSocketHostTcp(); |
protected: |
@@ -100,7 +109,8 @@ |
// Formatting of messages is defined in RFC5766. |
class CONTENT_EXPORT P2PSocketHostStunTcp : public P2PSocketHostTcpBase { |
public: |
- P2PSocketHostStunTcp(IPC::Sender* message_sender, int id); |
+ P2PSocketHostStunTcp(IPC::Sender* message_sender, int id, |
+ net::URLRequestContextGetter* getter); |
virtual ~P2PSocketHostStunTcp(); |
protected: |