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

Unified Diff: content/renderer/pepper/host_dispatcher_wrapper.cc

Issue 1132093003: Add metrics to record TCP/UDP connections made from Flash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper/host_dispatcher_wrapper.cc
diff --git a/content/renderer/pepper/host_dispatcher_wrapper.cc b/content/renderer/pepper/host_dispatcher_wrapper.cc
index df05521fbca704ed987604dc6d95f498e4197ceb..b14a8a01043184c3ee9fa46596f139077c398e03 100644
--- a/content/renderer/pepper/host_dispatcher_wrapper.cc
+++ b/content/renderer/pepper/host_dispatcher_wrapper.cc
@@ -5,6 +5,7 @@
#include "content/renderer/pepper/host_dispatcher_wrapper.h"
#include "content/common/view_messages.h"
+#include "content/public/common/origin_util.h"
#include "content/renderer/pepper/pepper_hung_plugin_filter.h"
#include "content/renderer/pepper/pepper_plugin_instance_impl.h"
#include "content/renderer/pepper/pepper_proxy_channel_delegate_impl.h"
@@ -12,6 +13,9 @@
#include "content/renderer/pepper/renderer_ppapi_host_impl.h"
#include "content/renderer/pepper/renderer_restrict_dispatch_group.h"
#include "content/renderer/render_frame_impl.h"
+#include "third_party/WebKit/public/web/WebDocument.h"
+#include "third_party/WebKit/public/web/WebElement.h"
+#include "third_party/WebKit/public/web/WebPluginContainer.h"
namespace content {
@@ -85,14 +89,19 @@ void HostDispatcherWrapper::AddInstance(PP_Instance instance) {
if (host) {
RenderFrame* render_frame = host->GetRenderFrameForInstance(instance);
PepperPluginInstance* plugin_instance = host->GetPluginInstance(instance);
+ blink::WebString unused;
+ bool is_privileged_context =
+ plugin_instance->GetContainer()
+ ->element()
+ .document()
+ .isPrivilegedContext(unused) &&
+ content::IsOriginSecure(plugin_instance->GetPluginURL());
render_frame->Send(new ViewHostMsg_DidCreateOutOfProcessPepperInstance(
- plugin_child_id_,
- instance,
+ plugin_child_id_, instance,
PepperRendererInstanceData(
0, // The render process id will be supplied in the browser.
- render_frame->GetRoutingID(),
- host->GetDocumentURL(instance),
- plugin_instance->GetPluginURL()),
+ render_frame->GetRoutingID(), host->GetDocumentURL(instance),
+ plugin_instance->GetPluginURL(), is_privileged_context),
is_external_));
}
}

Powered by Google App Engine
This is Rietveld 408576698