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

Unified Diff: content/renderer/media/cdm/pepper_cdm_wrapper_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/media/cdm/pepper_cdm_wrapper_impl.cc
diff --git a/content/renderer/media/cdm/pepper_cdm_wrapper_impl.cc b/content/renderer/media/cdm/pepper_cdm_wrapper_impl.cc
index 8d24724d434ffa717ee355eb998a1f6bd63a394e..45405f4292431e3eae2c27d2cc59cd8c93460af1 100644
--- a/content/renderer/media/cdm/pepper_cdm_wrapper_impl.cc
+++ b/content/renderer/media/cdm/pepper_cdm_wrapper_impl.cc
@@ -9,6 +9,7 @@
#include "content/renderer/pepper/pepper_plugin_instance_impl.h"
#include "content/renderer/pepper/pepper_webplugin_impl.h"
+#include "third_party/WebKit/public/platform/URLConversion.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebElement.h"
@@ -36,7 +37,8 @@ scoped_ptr<PepperCdmWrapper> PepperCdmWrapperImpl::Create(
// Note: The code will continue after navigation to the "same" origin, even
// though the CDM is no longer necessary.
// TODO: Consider avoiding this possibility entirely. http://crbug.com/575236
- GURL frame_security_origin(frame->securityOrigin().toString());
+ GURL frame_security_origin(
+ blink::WebStringToGURL(frame->securityOrigin().toString()));
if (frame_security_origin != security_origin) {
LOG(ERROR) << "Frame has a different origin than the EME call.";
return scoped_ptr<PepperCdmWrapper>();
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.cc ('k') | content/renderer/media/user_media_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698