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

Unified Diff: chrome/renderer/plugins/chrome_plugin_placeholder.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/plugins/chrome_plugin_placeholder.cc
diff --git a/chrome/renderer/plugins/chrome_plugin_placeholder.cc b/chrome/renderer/plugins/chrome_plugin_placeholder.cc
index 54b24933564263686cd167934f21b4e95cc4236f..486d270dceac9052a33cbaf8465420af9c113da0 100644
--- a/chrome/renderer/plugins/chrome_plugin_placeholder.cc
+++ b/chrome/renderer/plugins/chrome_plugin_placeholder.cc
@@ -39,6 +39,7 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/webui/jstemplate_builder.h"
#include "ui/gfx/geometry/size.h"
+#include "url/origin.h"
#include "url/url_util.h"
using base::UserMetricsAction;
@@ -290,14 +291,10 @@ void ChromePluginPlaceholder::PluginListChanged() {
ChromeViewHostMsg_GetPluginInfo_Output output;
std::string mime_type(GetPluginParams().mimeType.utf8());
- blink::WebString top_origin =
- GetFrame()->top()->getSecurityOrigin().toString();
- render_frame()->Send(
- new ChromeViewHostMsg_GetPluginInfo(routing_id(),
- GURL(GetPluginParams().url),
- blink::WebStringToGURL(top_origin),
- mime_type,
- &output));
+ const url::Origin& top_origin(GetFrame()->top()->getSecurityOrigin());
+ render_frame()->Send(new ChromeViewHostMsg_GetPluginInfo(
+ routing_id(), GURL(GetPluginParams().url), top_origin.GetURL(), mime_type,
+ &output));
if (output.status == status_)
return;
blink::WebPlugin* new_plugin = ChromeContentRendererClient::CreatePlugin(

Powered by Google App Engine
This is Rietveld 408576698