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

Unified Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 1568073002: Reduce string copies in GURL creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/renderer/pepper/pepper_plugin_instance_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index 172c3b7e1c1b740cfe74c72d0cf1dc991719d198..3d898bd61048052af6220735bf83c8a3edeb2ae9 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -94,6 +94,7 @@
#include "printing/metafile_skia_wrapper.h"
#include "printing/pdf_metafile_skia.h"
#include "skia/ext/platform_canvas.h"
+#include "third_party/WebKit/public/platform/URLConversion.h"
#include "third_party/WebKit/public/platform/WebCursorInfo.h"
#include "third_party/WebKit/public/platform/WebGamepads.h"
#include "third_party/WebKit/public/platform/WebRect.h"
@@ -2863,8 +2864,8 @@ PP_Var PepperPluginInstanceImpl::GetPluginReferrerURL(
WebString referer = request.httpHeaderField("Referer");
if (referer.isEmpty())
return PP_MakeUndefined();
- return ppapi::PPB_URLUtil_Shared::GenerateURLReturn(GURL(referer),
- components);
+ return ppapi::PPB_URLUtil_Shared::GenerateURLReturn(
+ blink::WebStringToGURL(referer), components);
}
PP_ExternalPluginResult PepperPluginInstanceImpl::ResetAsProxied(

Powered by Google App Engine
This is Rietveld 408576698