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

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 dat merge Created 4 years, 2 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 e5e7bb9b322ee5076a97bc241c7f4ea14e158c7e..fbe7febe82112b8c2aacb52acd712f518fb767d8 100644
--- a/content/browser/frame_host/render_frame_message_filter.cc
+++ b/content/browser/frame_host/render_frame_message_filter.cc
@@ -492,16 +492,14 @@ void RenderFrameMessageFilter::GetPluginsCallback(
int child_process_id = -1;
int routing_id = MSG_ROUTING_NONE;
- GURL policy_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.
for (WebPluginInfo plugin : all_plugins) {
// 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_, main_frame_origin.GetURL(),
+ main_frame_origin, &plugin)) {
plugins.push_back(plugin);
}
}
@@ -513,16 +511,16 @@ void RenderFrameMessageFilter::GetPluginsCallback(
void RenderFrameMessageFilter::OnGetPluginInfo(
int render_frame_id,
const GURL& url,
- const GURL& page_url,
+ const url::Origin& main_frame_origin,
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_,
- url, page_url, mime_type, allow_wildcard,
- nullptr, info, actual_mime_type);
+ render_process_id_, render_frame_id, resource_context_, url,
+ main_frame_origin, mime_type, allow_wildcard, nullptr, info,
+ actual_mime_type);
}
void RenderFrameMessageFilter::OnOpenChannelToPepperPlugin(
« no previous file with comments | « content/browser/frame_host/render_frame_message_filter.h ('k') | content/browser/loader/mime_sniffing_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698