summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy
diff options
context:
space:
mode:
authordpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-16 19:06:40 +0000
committerdpolukhin@chromium.org <dpolukhin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-16 19:06:40 +0000
commite461da2f56549596f94bac6a53a2fdd0e554da9c (patch)
treef8857698b32b0c6c8d2d2ee2083cbfdd7b78706a /ppapi/proxy
parent31eac9635b16592117c7491b1b27c34dc895d453 (diff)
downloadchromium_src-e461da2f56549596f94bac6a53a2fdd0e554da9c.zip
chromium_src-e461da2f56549596f94bac6a53a2fdd0e554da9c.tar.gz
chromium_src-e461da2f56549596f94bac6a53a2fdd0e554da9c.tar.bz2
Move socket API restriction check to browser process
BUG=112961 TEST=ui_tests --gtest_filter=*TCPSocket* Review URL: http://codereview.chromium.org/9379002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122326 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy')
-rw-r--r--ppapi/proxy/ppapi_messages.h9
-rw-r--r--ppapi/proxy/ppb_tcp_socket_private_proxy.cc9
-rw-r--r--ppapi/proxy/ppb_udp_socket_private_proxy.cc5
3 files changed, 14 insertions, 9 deletions
diff --git a/ppapi/proxy/ppapi_messages.h b/ppapi/proxy/ppapi_messages.h
index b67a187..04b812d 100644
--- a/ppapi/proxy/ppapi_messages.h
+++ b/ppapi/proxy/ppapi_messages.h
@@ -802,11 +802,13 @@ IPC_SYNC_MESSAGE_CONTROL2_1(PpapiHostMsg_PPBTCPSocket_Create,
int32 /* routing_id */,
uint32 /* plugin_dispatcher_id */,
uint32 /* socket_id */)
-IPC_MESSAGE_CONTROL3(PpapiHostMsg_PPBTCPSocket_Connect,
+IPC_MESSAGE_CONTROL4(PpapiHostMsg_PPBTCPSocket_Connect,
+ int32 /* routing_id */,
uint32 /* socket_id */,
std::string /* host */,
uint16_t /* port */)
-IPC_MESSAGE_CONTROL2(PpapiHostMsg_PPBTCPSocket_ConnectWithNetAddress,
+IPC_MESSAGE_CONTROL3(PpapiHostMsg_PPBTCPSocket_ConnectWithNetAddress,
+ int32 /* routing_id */,
uint32 /* socket_id */,
PP_NetAddress_Private /* net_addr */)
IPC_MESSAGE_CONTROL3(PpapiHostMsg_PPBTCPSocket_SSLHandshake,
@@ -827,7 +829,8 @@ IPC_SYNC_MESSAGE_CONTROL2_1(PpapiHostMsg_PPBUDPSocket_Create,
int32 /* routing_id */,
uint32 /* plugin_dispatcher_id */,
uint32 /* socket_id */)
-IPC_MESSAGE_CONTROL2(PpapiHostMsg_PPBUDPSocket_Bind,
+IPC_MESSAGE_CONTROL3(PpapiHostMsg_PPBUDPSocket_Bind,
+ int32 /* routing_id */,
uint32 /* socket_id */,
PP_NetAddress_Private /* net_addr */)
IPC_MESSAGE_CONTROL2(PpapiHostMsg_PPBUDPSocket_RecvFrom,
diff --git a/ppapi/proxy/ppb_tcp_socket_private_proxy.cc b/ppapi/proxy/ppb_tcp_socket_private_proxy.cc
index 42420e3..7e92664 100644
--- a/ppapi/proxy/ppb_tcp_socket_private_proxy.cc
+++ b/ppapi/proxy/ppb_tcp_socket_private_proxy.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -57,12 +57,13 @@ TCPSocket::~TCPSocket() {
}
void TCPSocket::SendConnect(const std::string& host, uint16_t port) {
- SendToBrowser(new PpapiHostMsg_PPBTCPSocket_Connect(socket_id_, host, port));
+ SendToBrowser(new PpapiHostMsg_PPBTCPSocket_Connect(
+ API_ID_PPB_TCPSOCKET_PRIVATE, socket_id_, host, port));
}
void TCPSocket::SendConnectWithNetAddress(const PP_NetAddress_Private& addr) {
- SendToBrowser(
- new PpapiHostMsg_PPBTCPSocket_ConnectWithNetAddress(socket_id_, addr));
+ SendToBrowser(new PpapiHostMsg_PPBTCPSocket_ConnectWithNetAddress(
+ API_ID_PPB_TCPSOCKET_PRIVATE, socket_id_, addr));
}
void TCPSocket::SendSSLHandshake(const std::string& server_name,
diff --git a/ppapi/proxy/ppb_udp_socket_private_proxy.cc b/ppapi/proxy/ppb_udp_socket_private_proxy.cc
index 0716033..2d9d29f 100644
--- a/ppapi/proxy/ppb_udp_socket_private_proxy.cc
+++ b/ppapi/proxy/ppb_udp_socket_private_proxy.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -54,7 +54,8 @@ UDPSocket::~UDPSocket() {
}
void UDPSocket::SendBind(const PP_NetAddress_Private& addr) {
- SendToBrowser(new PpapiHostMsg_PPBUDPSocket_Bind(socket_id_, addr));
+ SendToBrowser(new PpapiHostMsg_PPBUDPSocket_Bind(
+ API_ID_PPB_UDPSOCKET_PRIVATE, socket_id_, addr));
}
void UDPSocket::SendRecvFrom(int32_t num_bytes) {