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

Unified Diff: media/cdm/proxy_decryptor.cc

Issue 1013913002: media: Fix permission request/check for EME on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 5 years, 9 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/cdm/proxy_decryptor.cc
diff --git a/media/cdm/proxy_decryptor.cc b/media/cdm/proxy_decryptor.cc
index 3f1911b97876effce81a759e52b83bc32ec761bf..02ef8bf654f8f8410ed32f4d424635828d054e6f 100644
--- a/media/cdm/proxy_decryptor.cc
+++ b/media/cdm/proxy_decryptor.cc
@@ -133,15 +133,13 @@ bool ProxyDecryptor::GenerateKeyRequest(const std::string& init_data_type,
return true;
}
-#if defined(OS_CHROMEOS)
+#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
media_permission_->RequestPermission(
MediaPermission::PROTECTED_MEDIA_IDENTIFIER, security_origin_,
base::Bind(&ProxyDecryptor::OnPermissionStatus,
weak_ptr_factory_.GetWeakPtr(), session_type, init_data_type,
init_data_vector, base::Passed(&promise)));
#else
- // TODO(xhwang): Fix the Android path by requesting permission for key systems
- // that don't use AesDecryptor in M43.
OnPermissionStatus(session_type, init_data_type, init_data_vector,
promise.Pass(), true /* granted */);
#endif
@@ -157,8 +155,8 @@ void ProxyDecryptor::OnPermissionStatus(
bool granted) {
// ProxyDecryptor is only used by Prefixed EME, where RequestPermission() is
// only for triggering the permission UI. Later CheckPermission() will be
- // called (e.g. in PlatformVerificationFlow) and the permission status will be
- // evaluated there.
+ // called (e.g. in PlatformVerificationFlow on ChromeOS; in BrowserCdmManager
+ // on Android) and the permission status will be evaluated then.
DVLOG_IF(1, !granted) << "Permission request rejected.";
const uint8* init_data_vector_data =

Powered by Google App Engine
This is Rietveld 408576698