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

Unified Diff: content/renderer/media/cdm/pepper_cdm_wrapper_impl.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: 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 542923f008033058eaeb081bf6a200f90e09fb03..208edd3ef5d77d3dee21d4fb640753c20f5698fd 100644
--- a/content/renderer/media/cdm/pepper_cdm_wrapper_impl.cc
+++ b/content/renderer/media/cdm/pepper_cdm_wrapper_impl.cc
@@ -19,6 +19,7 @@
#include "third_party/WebKit/public/web/WebPlugin.h"
#include "third_party/WebKit/public/web/WebPluginContainer.h"
#include "third_party/WebKit/public/web/WebView.h"
+#include "url/origin.h"
namespace content {
@@ -37,8 +38,7 @@ std::unique_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(
- blink::WebStringToGURL(frame->getSecurityOrigin().toString()));
+ GURL frame_security_origin(url::Origin(frame->getSecurityOrigin()).GetURL());
if (frame_security_origin != security_origin) {
LOG(ERROR) << "Frame has a different origin than the EME call.";
return std::unique_ptr<PepperCdmWrapper>();

Powered by Google App Engine
This is Rietveld 408576698