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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 791763003: [DISCARD] While getting plug-in info, use securityOrigin() of the top level frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | chrome/renderer/plugins/chrome_plugin_placeholder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 62fc9409f759fbef9be22531dc946884bf407b15..659d78d02a8d7927463b0b3156e6d505d236052c 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -576,11 +576,18 @@ bool ChromeContentRendererClient::OverrideCreatePlugin(
}
#endif
+ const WebSecurityOrigin top_level_security_origin =
+ frame->top()->securityOrigin();
+ GURL top_level_frame_origin_url;
+ // TODO(lazyboy): What happens if |top_level_security_origin| is NULL?
+ if (!top_level_security_origin.isNull())
+ top_level_frame_origin_url = GURL(top_level_security_origin.toString());
+
ChromeViewHostMsg_GetPluginInfo_Output output;
#if defined(ENABLE_PLUGINS)
render_frame->Send(new ChromeViewHostMsg_GetPluginInfo(
render_frame->GetRoutingID(), GURL(params.url),
- frame->top()->document().url(), orig_mime_type, &output));
+ top_level_frame_origin_url, orig_mime_type, &output));
if (output.plugin.type == content::WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN)
return false;
« no previous file with comments | « no previous file | chrome/renderer/plugins/chrome_plugin_placeholder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698