| Index: content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc
|
| diff --git a/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc b/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc
|
| index dd177131a6f642dbd959179ca71bc7f2caeb0ab1..7d0a0c75bc298a3db0ac6c235ac40ada7da2180f 100644
|
| --- a/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc
|
| +++ b/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc
|
| @@ -8,6 +8,7 @@
|
|
|
| #include "base/compiler_specific.h"
|
| #include "base/logging.h"
|
| +#include "base/metrics/histogram_macros.h"
|
| #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
|
| #include "content/browser/renderer_host/pepper/pepper_socket_utils.h"
|
| #include "content/public/browser/browser_thread.h"
|
| @@ -60,7 +61,8 @@ PepperUDPSocketMessageFilter::PepperUDPSocketMessageFilter(
|
| BrowserPpapiHostImpl* host,
|
| PP_Instance instance,
|
| bool private_api)
|
| - : socket_options_(0),
|
| + : host_(host),
|
| + socket_options_(0),
|
| rcvbuf_size_(0),
|
| sndbuf_size_(0),
|
| multicast_ttl_(0),
|
| @@ -645,6 +647,15 @@ void PepperUDPSocketMessageFilter::SendBindReply(
|
| const ppapi::host::ReplyMessageContext& context,
|
| int32_t result,
|
| const PP_NetAddress_Private& addr) {
|
| + PP_Instance instance = resource_host()->pp_instance();
|
| + pepper_socket_utils::PluginContextSecurity security =
|
| + host_->IsPotentiallySecurePluginContext(instance)
|
| + ? pepper_socket_utils::PLUGIN_CONTEXT_SECURE
|
| + : pepper_socket_utils::PLUGIN_CONTEXT_INSECURE;
|
| + UMA_HISTOGRAM_ENUMERATION(
|
| + "Pepper.PluginContextSecurity.UDPBind", security,
|
| + pepper_socket_utils::PLUGIN_CONTEXT_SECURITY_NUM_ENTRIES);
|
| +
|
| ppapi::host::ReplyMessageContext reply_context(context);
|
| reply_context.params.set_result(result);
|
| SendReply(reply_context, PpapiPluginMsg_UDPSocket_BindReply(addr));
|
|
|