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

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

Issue 2156803002: [HBD] Remove PluginCache and reload plugin list when origin changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes per alexmos@'s comments + DOMImplementation::createDocument fix Created 4 years, 4 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 a4a91b09e4869065e1ba2ea995e6442ea2a7d189..b7d970e79f521ed7fb773f74ea602645449795de 100644
--- a/content/browser/frame_host/render_frame_message_filter.cc
+++ b/content/browser/frame_host/render_frame_message_filter.cc
@@ -468,6 +468,7 @@ void RenderFrameMessageFilter::SetCookie(int32_t render_frame_id,
void RenderFrameMessageFilter::OnGetPlugins(
bool refresh,
+ const url::Origin& main_frame_origin,
IPC::Message* reply_msg) {
// Don't refresh if the specified threshold has not been passed. Note that
// this check is performed before off-loading to the file thread. The reason
@@ -486,12 +487,14 @@ void RenderFrameMessageFilter::OnGetPlugins(
}
}
- PluginServiceImpl::GetInstance()->GetPlugins(base::Bind(
- &RenderFrameMessageFilter::GetPluginsCallback, this, reply_msg));
+ PluginServiceImpl::GetInstance()->GetPlugins(
+ base::Bind(&RenderFrameMessageFilter::GetPluginsCallback, this, reply_msg,
+ main_frame_origin));
}
void RenderFrameMessageFilter::GetPluginsCallback(
IPC::Message* reply_msg,
+ const url::Origin& main_frame_origin,
const std::vector<WebPluginInfo>& all_plugins) {
// Filter the plugin list.
PluginServiceFilter* filter = PluginServiceImpl::GetInstance()->GetFilter();
@@ -502,12 +505,10 @@ void RenderFrameMessageFilter::GetPluginsCallback(
// In this loop, copy the WebPluginInfo (and do not use a reference) because
// the filter might mutate it.
for (WebPluginInfo plugin : all_plugins) {
- if (!filter || filter->IsPluginAvailable(child_process_id,
- routing_id,
- resource_context_,
- GURL(),
- GURL(),
- &plugin)) {
+ if (!filter ||
+ filter->IsPluginAvailable(
+ child_process_id, routing_id, resource_context_, GURL(),
+ GURL(main_frame_origin.Serialize()), &plugin)) {
plugins.push_back(plugin);
}
}

Powered by Google App Engine
This is Rietveld 408576698