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

Unified Diff: content/browser/frame_host/render_frame_message_filter.cc

Issue 2378573005: [HBD] Blanket BLOCK on all non-HTTP(s) and non-FILE URLs for Flash. (Closed)
Patch Set: fix formatting Created 4 years, 3 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/frame_host/render_frame_message_filter.cc
diff --git a/content/browser/frame_host/render_frame_message_filter.cc b/content/browser/frame_host/render_frame_message_filter.cc
index 4558e891559b4b3451b95191ae98e36716d2996f..8f31dbc5e27971c43ded9a21ecbde4cf0dea36cf 100644
--- a/content/browser/frame_host/render_frame_message_filter.cc
+++ b/content/browser/frame_host/render_frame_message_filter.cc
@@ -486,7 +486,7 @@ void RenderFrameMessageFilter::GetPluginsCallback(
int child_process_id = -1;
int routing_id = MSG_ROUTING_NONE;
- GURL policy_url =
+ GURL plugin_content_url =
main_frame_origin.unique() ? GURL() : GURL(main_frame_origin.Serialize());
// In this loop, copy the WebPluginInfo (and do not use a reference) because
// the filter might mutate it.
@@ -494,8 +494,8 @@ void RenderFrameMessageFilter::GetPluginsCallback(
// TODO(crbug.com/621724): Pass an url::Origin instead of a GURL.
if (!filter ||
filter->IsPluginAvailable(child_process_id, routing_id,
- resource_context_, policy_url, policy_url,
- &plugin)) {
+ resource_context_, plugin_content_url,
+ main_frame_origin, &plugin)) {
plugins.push_back(plugin);
}
}
@@ -504,14 +504,13 @@ void RenderFrameMessageFilter::GetPluginsCallback(
Send(reply_msg);
}
-void RenderFrameMessageFilter::OnGetPluginInfo(
- int render_frame_id,
- const GURL& url,
- const GURL& page_url,
- const std::string& mime_type,
- bool* found,
- WebPluginInfo* info,
- std::string* actual_mime_type) {
+void RenderFrameMessageFilter::OnGetPluginInfo(int render_frame_id,
+ const GURL& url,
+ const url::Origin& page_url,
nasko 2016/09/30 20:38:48 Not on URL.
tommycli 2016/09/30 21:20:42 Done.
+ const std::string& mime_type,
+ bool* found,
+ WebPluginInfo* info,
+ std::string* actual_mime_type) {
bool allow_wildcard = true;
*found = plugin_service_->GetPluginInfo(
render_process_id_, render_frame_id, resource_context_,

Powered by Google App Engine
This is Rietveld 408576698