Index: media/cdm/ppapi/ppapi_cdm_adapter.cc |
diff --git a/media/cdm/ppapi/ppapi_cdm_adapter.cc b/media/cdm/ppapi/ppapi_cdm_adapter.cc |
index d3a143a44aed157f8eee1474e0f6b74caacac6cd..e7c3064365aa0e82c8c331077e13badac4e91e68 100644 |
--- a/media/cdm/ppapi/ppapi_cdm_adapter.cc |
+++ b/media/cdm/ppapi/ppapi_cdm_adapter.cc |
@@ -320,14 +320,14 @@ namespace media { |
PpapiCdmAdapter::PpapiCdmAdapter(PP_Instance instance, pp::Module* module) |
: pp::Instance(instance), |
pp::ContentDecryptor_Private(this), |
-#if defined(OS_CHROMEOS) |
output_protection_(this), |
- platform_verification_(this), |
output_link_mask_(0), |
output_protection_mask_(0), |
query_output_protection_in_progress_(false), |
uma_for_output_protection_query_reported_(false), |
uma_for_output_protection_positive_result_reported_(false), |
+#if defined(OS_CHROMEOS) |
+ platform_verification_(this), |
#endif |
allocator_(this), |
cdm_(NULL), |
@@ -1069,7 +1069,6 @@ void PpapiCdmAdapter::SendPlatformChallenge(const char* service_id, |
} |
void PpapiCdmAdapter::EnableOutputProtection(uint32_t desired_protection_mask) { |
-#if defined(OS_CHROMEOS) |
int32_t result = output_protection_.EnableProtection( |
desired_protection_mask, |
callback_factory_.NewCallback(&PpapiCdmAdapter::EnableProtectionDone)); |
@@ -1079,11 +1078,9 @@ void PpapiCdmAdapter::EnableOutputProtection(uint32_t desired_protection_mask) { |
if (result != PP_OK && result != PP_OK_COMPLETIONPENDING) |
CDM_DLOG() << __FUNCTION__ << " failed!"; |
-#endif |
} |
void PpapiCdmAdapter::QueryOutputProtectionStatus() { |
-#if defined(OS_CHROMEOS) |
PP_DCHECK(!query_output_protection_in_progress_); |
output_link_mask_ = output_protection_mask_ = 0; |
@@ -1100,8 +1097,6 @@ void PpapiCdmAdapter::QueryOutputProtectionStatus() { |
// Fall through on error and issue an empty OnQueryOutputProtectionStatus(). |
PP_DCHECK(result != PP_OK); |
CDM_DLOG() << __FUNCTION__ << " failed, result = " << result; |
-#endif |
- cdm_->OnQueryOutputProtectionStatus(cdm::kQueryFailed, 0, 0); |
} |
void PpapiCdmAdapter::OnDeferredInitializationDone(cdm::StreamType stream_type, |
@@ -1139,7 +1134,6 @@ cdm::FileIO* PpapiCdmAdapter::CreateFileIO(cdm::FileIOClient* client) { |
callback_factory_.NewCallback(&PpapiCdmAdapter::OnFirstFileRead)); |
} |
-#if defined(OS_CHROMEOS) |
void PpapiCdmAdapter::ReportOutputProtectionUMA(OutputProtectionStatus status) { |
pp::UMAPrivate uma_interface(this); |
uma_interface.HistogramEnumeration("Media.EME.OutputProtection", status, |
@@ -1185,6 +1179,7 @@ void PpapiCdmAdapter::ReportOutputProtectionQueryResult() { |
// queries and success results. |
} |
+#if defined(OS_CHROMEOS) |
void PpapiCdmAdapter::SendPlatformChallengeDone( |
int32_t result, |
const linked_ptr<PepperPlatformChallengeResponse>& response) { |
@@ -1212,6 +1207,7 @@ void PpapiCdmAdapter::SendPlatformChallengeDone( |
signed_data_var.Unmap(); |
signed_data_signature_var.Unmap(); |
} |
+#endif |
void PpapiCdmAdapter::EnableProtectionDone(int32_t result) { |
// Does nothing since clients must call QueryOutputProtectionStatus() to |
@@ -1237,7 +1233,6 @@ void PpapiCdmAdapter::QueryOutputProtectionStatusDone(int32_t result) { |
cdm_->OnQueryOutputProtectionStatus(query_result, output_link_mask_, |
output_protection_mask_); |
} |
-#endif |
PpapiCdmAdapter::SessionError::SessionError( |
cdm::Error error, |