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

Unified Diff: media/blink/webcontentdecryptionmodule_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: media/blink/webcontentdecryptionmodule_impl.cc
diff --git a/media/blink/webcontentdecryptionmodule_impl.cc b/media/blink/webcontentdecryptionmodule_impl.cc
index b54ebe2e8c0da6808004f6fc20017285bc5e2dcc..283ac61c5c8c14098d0b8fc377c7d3fb240c54e3 100644
--- a/media/blink/webcontentdecryptionmodule_impl.cc
+++ b/media/blink/webcontentdecryptionmodule_impl.cc
@@ -21,6 +21,7 @@
#include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "url/gurl.h"
+#include "url/origin.h"
namespace media {
@@ -63,8 +64,7 @@ void WebContentDecryptionModuleImpl::Create(
return;
}
- GURL security_origin_as_gurl(
- blink::WebStringToGURL(security_origin.toString()));
+ GURL security_origin_as_gurl(url::Origin(security_origin).GetURL());
// CdmSessionAdapter::CreateCdm() will keep a reference to |adapter|. Then
// if WebContentDecryptionModuleImpl is successfully created (returned in

Powered by Google App Engine
This is Rietveld 408576698