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

Unified Diff: content/browser/renderer_host/pepper/browser_ppapi_host_impl.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/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
diff --git a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
index d7f4647567d86f0f970a67b0f81433dc7bd944fd..d263ee1c91eb06ce2a315b981dfe1799e80b6072 100644
--- a/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
+++ b/content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc
@@ -141,6 +141,14 @@ void BrowserPpapiHostImpl::SetOnKeepaliveCallback(
on_keepalive_callback_ = callback;
}
+bool BrowserPpapiHostImpl::IsPotentiallySecurePluginContext(
+ PP_Instance instance) {
+ auto* data = instance_map_.get(instance);
Ryan Sleevi 2015/05/12 22:56:05 nit: why the auto*? Why not let auto bind to the a
dcheng 2015/05/12 23:56:20 (I'm not raymes@ but I personally prefer auto* whe
raymes 2015/05/13 00:07:19 I copied the code from other functions in here. I'
raymes 2015/05/13 00:08:00 based on dcheng's comment, I left it as-is :P but
+ if (data == nullptr)
+ return false;
+ return data->renderer_data.is_potentially_secure_plugin_context;
+}
+
void BrowserPpapiHostImpl::AddInstance(
PP_Instance instance,
const PepperRendererInstanceData& renderer_instance_data) {

Powered by Google App Engine
This is Rietveld 408576698