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

Unified Diff: media/blink/webencryptedmediaclient_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/webencryptedmediaclient_impl.cc
diff --git a/media/blink/webencryptedmediaclient_impl.cc b/media/blink/webencryptedmediaclient_impl.cc
index 6ad39772bb8740e0b6ef021d0cfa7ca370562571..4d6c1d620a1cd34f5dfd031ebd72ec799d750f94 100644
--- a/media/blink/webencryptedmediaclient_impl.cc
+++ b/media/blink/webencryptedmediaclient_impl.cc
@@ -22,6 +22,8 @@
#include "third_party/WebKit/public/platform/WebMediaKeySystemConfiguration.h"
#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 {
@@ -102,8 +104,7 @@ void WebEncryptedMediaClientImpl::requestMediaKeySystemAccess(
GetReporter(request.keySystem())->ReportRequested();
if (GetMediaClient()) {
- GURL security_origin(
- blink::WebStringToGURL(request.getSecurityOrigin().toString()));
+ GURL security_origin(url::Origin(request.getSecurityOrigin()).GetURL());
GetMediaClient()->RecordRapporURL("Media.OriginUrl.EME", security_origin);

Powered by Google App Engine
This is Rietveld 408576698