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

Side by Side Diff: content/browser/renderer_host/p2p/socket_host.cc

Issue 16516003: SSLTCP (pseudo-SSL with fake handshake and unencrypted data) support for p2p socket. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/p2p/socket_host.h" 5 #include "content/browser/renderer_host/p2p/socket_host.h"
6 6
7 #include "base/sys_byteorder.h" 7 #include "base/sys_byteorder.h"
8 #include "content/browser/renderer_host/p2p/socket_host_tcp.h" 8 #include "content/browser/renderer_host/p2p/socket_host_tcp.h"
9 #include "content/browser/renderer_host/p2p/socket_host_tcp_server.h" 9 #include "content/browser/renderer_host/p2p/socket_host_tcp_server.h"
10 #include "content/browser/renderer_host/p2p/socket_host_udp.h" 10 #include "content/browser/renderer_host/p2p/socket_host_udp.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 // static 73 // static
74 P2PSocketHost* P2PSocketHost::Create( 74 P2PSocketHost* P2PSocketHost::Create(
75 IPC::Sender* message_sender, int id, P2PSocketType type) { 75 IPC::Sender* message_sender, int id, P2PSocketType type) {
76 switch (type) { 76 switch (type) {
77 case P2P_SOCKET_UDP: 77 case P2P_SOCKET_UDP:
78 return new P2PSocketHostUdp(message_sender, id); 78 return new P2PSocketHostUdp(message_sender, id);
79 79
80 case P2P_SOCKET_TCP_SERVER: 80 case P2P_SOCKET_TCP_SERVER:
81 return new P2PSocketHostTcpServer( 81 return new P2PSocketHostTcpServer(
82 message_sender, id, P2P_SOCKET_TCP_CLIENT); 82 message_sender, id, P2P_SOCKET_TCP_CLIENT, false);
83 83
84 case P2P_SOCKET_STUN_TCP_SERVER: 84 case P2P_SOCKET_STUN_TCP_SERVER:
85 return new P2PSocketHostTcpServer( 85 return new P2PSocketHostTcpServer(
86 message_sender, id, P2P_SOCKET_STUN_TCP_CLIENT); 86 message_sender, id, P2P_SOCKET_STUN_TCP_CLIENT, false);
87 87
88 case P2P_SOCKET_TCP_CLIENT: 88 case P2P_SOCKET_TCP_CLIENT:
89 return new P2PSocketHostTcp(message_sender, id); 89 return new P2PSocketHostTcp(message_sender, id, false);
90 90
91 case P2P_SOCKET_STUN_TCP_CLIENT: 91 case P2P_SOCKET_STUN_TCP_CLIENT:
92 return new P2PSocketHostStunTcp(message_sender, id); 92 return new P2PSocketHostStunTcp(message_sender, id, false);
93
94 case P2P_SOCKET_SSLTCP_SERVER:
95 return new P2PSocketHostTcpServer(
96 message_sender, id, P2P_SOCKET_SSLTCP_CLIENT, true);
97
98 case P2P_SOCKET_STUN_SSLTCP_SERVER:
99 return new P2PSocketHostTcpServer(
100 message_sender, id, P2P_SOCKET_STUN_SSLTCP_CLIENT, true);
101
102 case P2P_SOCKET_SSLTCP_CLIENT:
103 return new P2PSocketHostTcp(message_sender, id, true);
104
105 case P2P_SOCKET_STUN_SSLTCP_CLIENT:
106 return new P2PSocketHostStunTcp(message_sender, id, true);
93 } 107 }
94 108
95 NOTREACHED(); 109 NOTREACHED();
96 return NULL; 110 return NULL;
97 } 111 }
98 112
99 } // namespace content 113 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698