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

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 on #427122 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
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 173791497c2c89c6f88e2be3875089bdf7c39889..18ba495e05d6983cd2eace2a824cc45569dc6bd0 100644
--- a/content/renderer/media/cdm/pepper_cdm_wrapper_impl.cc
+++ b/content/renderer/media/cdm/pepper_cdm_wrapper_impl.cc
@@ -21,6 +21,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 {
@@ -39,8 +40,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>();
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698