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

Unified Diff: media/blink/webencryptedmediaclient_impl.cc

Issue 2712983004: Simplify/Cleanup MediaClient (Closed)
Patch Set: Fix test leak Created 3 years, 8 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 | « media/blink/webencryptedmediaclient_impl.h ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webencryptedmediaclient_impl.cc
diff --git a/media/blink/webencryptedmediaclient_impl.cc b/media/blink/webencryptedmediaclient_impl.cc
index 9dd3c26f6f299f028b25deb1968c9e2e13cc49ee..97d6d05cf69ad345b1ff80abf17ee578b71c013b 100644
--- a/media/blink/webencryptedmediaclient_impl.cc
+++ b/media/blink/webencryptedmediaclient_impl.cc
@@ -12,7 +12,7 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "media/base/key_systems.h"
-#include "media/base/media_client.h"
+#include "media/base/media_log.h"
#include "media/base/media_permission.h"
#include "media/blink/webcontentdecryptionmodule_impl.h"
#include "media/blink/webcontentdecryptionmoduleaccess_impl.h"
@@ -88,10 +88,12 @@ class WebEncryptedMediaClientImpl::Reporter {
WebEncryptedMediaClientImpl::WebEncryptedMediaClientImpl(
base::Callback<bool(void)> are_secure_codecs_supported_cb,
CdmFactory* cdm_factory,
- MediaPermission* media_permission)
+ MediaPermission* media_permission,
+ const scoped_refptr<MediaLog>& media_log)
: are_secure_codecs_supported_cb_(are_secure_codecs_supported_cb),
cdm_factory_(cdm_factory),
key_system_config_selector_(KeySystems::GetInstance(), media_permission),
+ media_log_(media_log),
weak_factory_(this) {
DCHECK(cdm_factory_);
}
@@ -103,15 +105,9 @@ void WebEncryptedMediaClientImpl::requestMediaKeySystemAccess(
blink::WebEncryptedMediaRequest request) {
GetReporter(request.keySystem())->ReportRequested();
- if (GetMediaClient()) {
- GURL security_origin(url::Origin(request.getSecurityOrigin()).GetURL());
-
- GetMediaClient()->RecordRapporURL("Media.OriginUrl.EME", security_origin);
-
- if (!request.getSecurityOrigin().isPotentiallyTrustworthy()) {
- GetMediaClient()->RecordRapporURL("Media.OriginUrl.EME.Insecure",
- security_origin);
- }
+ media_log_->RecordRapporWithSecurityOrigin("Media.OriginUrl.EME");
+ if (!request.getSecurityOrigin().isPotentiallyTrustworthy()) {
+ media_log_->RecordRapporWithSecurityOrigin("Media.OriginUrl.EME.Insecure");
}
key_system_config_selector_.SelectConfig(
« no previous file with comments | « media/blink/webencryptedmediaclient_impl.h ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698