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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 2382973002: Convert WebSecurityOrigin -> GURL without re-parsing the url (Closed)
Patch Set: rebase 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: 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 840a53be5658f13a052b4621ed58ce7776f20bdb..d87840cd9dc1da24dbdbb67bad4c56b00882ef40 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -116,6 +116,7 @@
#include "ui/base/layout.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/webui/jstemplate_builder.h"
+#include "url/origin.h"
#if !defined(DISABLE_NACL)
#include "components/nacl/common/nacl_constants.h"
@@ -563,10 +564,10 @@ bool ChromeContentRendererClient::OverrideCreatePlugin(
GURL url(params.url);
#if defined(ENABLE_PLUGINS)
ChromeViewHostMsg_GetPluginInfo_Output output;
- WebString top_origin = frame->top()->getSecurityOrigin().toString();
render_frame->Send(new ChromeViewHostMsg_GetPluginInfo(
- render_frame->GetRoutingID(), url, blink::WebStringToGURL(top_origin),
- orig_mime_type, &output));
+ render_frame->GetRoutingID(), url,
+ url::Origin(frame->top()->getSecurityOrigin()).GetURL(), orig_mime_type,
+ &output));
*plugin = CreatePlugin(render_frame, frame, params, output);
#else // !defined(ENABLE_PLUGINS)

Powered by Google App Engine
This is Rietveld 408576698