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

Unified Diff: chrome/renderer/plugins/shadow_dom_plugin_placeholder.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 | « chrome/renderer/plugins/chrome_plugin_placeholder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/plugins/shadow_dom_plugin_placeholder.cc
diff --git a/chrome/renderer/plugins/shadow_dom_plugin_placeholder.cc b/chrome/renderer/plugins/shadow_dom_plugin_placeholder.cc
index 8441f7690c6a63036feefd389eccd1bddd61136a..ae437787999705c8610a1aa1f0c169f5717ebf2d 100644
--- a/chrome/renderer/plugins/shadow_dom_plugin_placeholder.cc
+++ b/chrome/renderer/plugins/shadow_dom_plugin_placeholder.cc
@@ -42,6 +42,8 @@ scoped_ptr<blink::WebPluginPlaceholder> CreateShadowDOMPlaceholderForPluginInfo(
if (!ShadowDOMPluginPlaceholderEnabled())
return nullptr;
+ blink::WebSecurityOrigin top_level_origin = frame->top()->securityOrigin();
+ DCHECK(!top_level_origin.isNull());
std::string orig_mime_type = orig_params.mimeType.utf8();
// TODO(jbroman): Investigate whether browser plugin needs special handling.
ChromeViewHostMsg_GetPluginInfo_Output output;
@@ -49,7 +51,7 @@ scoped_ptr<blink::WebPluginPlaceholder> CreateShadowDOMPlaceholderForPluginInfo(
render_frame->Send(
new ChromeViewHostMsg_GetPluginInfo(render_frame->GetRoutingID(),
GURL(orig_params.url),
- frame->top()->document().url(),
+ GURL(top_level_origin.toString()),
orig_mime_type,
&output));
#else
« no previous file with comments | « chrome/renderer/plugins/chrome_plugin_placeholder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698