summaryrefslogtreecommitdiffstats
path: root/media/base/key_systems.cc
diff options
context:
space:
mode:
authorjrummell <jrummell@chromium.org>2015-04-21 15:28:34 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-21 22:28:58 +0000
commit01db4c8321aee76ce432561ef492fecb833a6363 (patch)
tree5932b9fbd192f4ac093a071de9e3e63bdca90700 /media/base/key_systems.cc
parent0044897feca3e12b01ea0f50939b5a5eb33c6046 (diff)
downloadchromium_src-01db4c8321aee76ce432561ef492fecb833a6363.zip
chromium_src-01db4c8321aee76ce432561ef492fecb833a6363.tar.gz
chromium_src-01db4c8321aee76ce432561ef492fecb833a6363.tar.bz2
Change enums in eme_constants.h to enum classes
BUG=473830 TEST=media_unittests pass Review URL: https://codereview.chromium.org/1093253002 Cr-Commit-Position: refs/heads/master@{#326147}
Diffstat (limited to 'media/base/key_systems.cc')
-rw-r--r--media/base/key_systems.cc48
1 files changed, 27 insertions, 21 deletions
diff --git a/media/base/key_systems.cc b/media/base/key_systems.cc
index 7bbbde7..f899925 100644
--- a/media/base/key_systems.cc
+++ b/media/base/key_systems.cc
@@ -108,10 +108,11 @@ static void AddClearKey(std::vector<KeySystemInfo>* concrete_key_systems) {
info.max_audio_robustness = EmeRobustness::EMPTY;
info.max_video_robustness = EmeRobustness::EMPTY;
- info.persistent_license_support = EME_SESSION_TYPE_NOT_SUPPORTED;
- info.persistent_release_message_support = EME_SESSION_TYPE_NOT_SUPPORTED;
- info.persistent_state_support = EME_FEATURE_NOT_SUPPORTED;
- info.distinctive_identifier_support = EME_FEATURE_NOT_SUPPORTED;
+ info.persistent_license_support = EmeSessionTypeSupport::NOT_SUPPORTED;
+ info.persistent_release_message_support =
+ EmeSessionTypeSupport::NOT_SUPPORTED;
+ info.persistent_state_support = EmeFeatureSupport::NOT_SUPPORTED;
+ info.distinctive_identifier_support = EmeFeatureSupport::NOT_SUPPORTED;
info.use_aes_decryptor = true;
@@ -400,31 +401,34 @@ void KeySystemsImpl::AddConcreteSupportedKeySystems(
DCHECK(!info.key_system.empty());
DCHECK(info.max_audio_robustness != EmeRobustness::INVALID);
DCHECK(info.max_video_robustness != EmeRobustness::INVALID);
- DCHECK(info.persistent_license_support != EME_SESSION_TYPE_INVALID);
- DCHECK(info.persistent_release_message_support != EME_SESSION_TYPE_INVALID);
- DCHECK(info.persistent_state_support != EME_FEATURE_INVALID);
- DCHECK(info.distinctive_identifier_support != EME_FEATURE_INVALID);
+ DCHECK(info.persistent_license_support != EmeSessionTypeSupport::INVALID);
+ DCHECK(info.persistent_release_message_support !=
+ EmeSessionTypeSupport::INVALID);
+ DCHECK(info.persistent_state_support != EmeFeatureSupport::INVALID);
+ DCHECK(info.distinctive_identifier_support != EmeFeatureSupport::INVALID);
// Supporting persistent state is a prerequsite for supporting persistent
// sessions.
- if (info.persistent_state_support == EME_FEATURE_NOT_SUPPORTED) {
- DCHECK(info.persistent_license_support == EME_SESSION_TYPE_NOT_SUPPORTED);
+ if (info.persistent_state_support == EmeFeatureSupport::NOT_SUPPORTED) {
+ DCHECK(info.persistent_license_support ==
+ EmeSessionTypeSupport::NOT_SUPPORTED);
DCHECK(info.persistent_release_message_support ==
- EME_SESSION_TYPE_NOT_SUPPORTED);
+ EmeSessionTypeSupport::NOT_SUPPORTED);
}
// persistent-release-message sessions are not currently supported.
// http://crbug.com/448888
DCHECK(info.persistent_release_message_support ==
- EME_SESSION_TYPE_NOT_SUPPORTED);
+ EmeSessionTypeSupport::NOT_SUPPORTED);
// If distinctive identifiers are not supported, then no other features can
// require them.
- if (info.distinctive_identifier_support == EME_FEATURE_NOT_SUPPORTED) {
+ if (info.distinctive_identifier_support ==
+ EmeFeatureSupport::NOT_SUPPORTED) {
DCHECK(info.persistent_license_support !=
- EME_SESSION_TYPE_SUPPORTED_WITH_IDENTIFIER);
+ EmeSessionTypeSupport::SUPPORTED_WITH_IDENTIFIER);
DCHECK(info.persistent_release_message_support !=
- EME_SESSION_TYPE_SUPPORTED_WITH_IDENTIFIER);
+ EmeSessionTypeSupport::SUPPORTED_WITH_IDENTIFIER);
}
// Distinctive identifiers and persistent state can only be reliably blocked
@@ -438,8 +442,10 @@ void KeySystemsImpl::AddConcreteSupportedKeySystems(
can_block = true;
#endif
if (!can_block) {
- DCHECK(info.distinctive_identifier_support == EME_FEATURE_ALWAYS_ENABLED);
- DCHECK(info.persistent_state_support == EME_FEATURE_ALWAYS_ENABLED);
+ DCHECK(info.distinctive_identifier_support ==
+ EmeFeatureSupport::ALWAYS_ENABLED);
+ DCHECK(info.persistent_state_support ==
+ EmeFeatureSupport::ALWAYS_ENABLED);
}
DCHECK(!IsSupportedKeySystem(info.key_system))
@@ -776,7 +782,7 @@ EmeSessionTypeSupport KeySystemsImpl::GetPersistentLicenseSessionSupport(
concrete_key_system_map_.find(key_system);
if (key_system_iter == concrete_key_system_map_.end()) {
NOTREACHED();
- return EME_SESSION_TYPE_INVALID;
+ return EmeSessionTypeSupport::INVALID;
}
return key_system_iter->second.persistent_license_support;
}
@@ -789,7 +795,7 @@ EmeSessionTypeSupport KeySystemsImpl::GetPersistentReleaseMessageSessionSupport(
concrete_key_system_map_.find(key_system);
if (key_system_iter == concrete_key_system_map_.end()) {
NOTREACHED();
- return EME_SESSION_TYPE_INVALID;
+ return EmeSessionTypeSupport::INVALID;
}
return key_system_iter->second.persistent_release_message_support;
}
@@ -802,7 +808,7 @@ EmeFeatureSupport KeySystemsImpl::GetPersistentStateSupport(
concrete_key_system_map_.find(key_system);
if (key_system_iter == concrete_key_system_map_.end()) {
NOTREACHED();
- return EME_FEATURE_INVALID;
+ return EmeFeatureSupport::INVALID;
}
return key_system_iter->second.persistent_state_support;
}
@@ -815,7 +821,7 @@ EmeFeatureSupport KeySystemsImpl::GetDistinctiveIdentifierSupport(
concrete_key_system_map_.find(key_system);
if (key_system_iter == concrete_key_system_map_.end()) {
NOTREACHED();
- return EME_FEATURE_INVALID;
+ return EmeFeatureSupport::INVALID;
}
return key_system_iter->second.distinctive_identifier_support;
}