Make CdmProvisioningResponse const and DeviceFiles level support

* Make CdmProvisioningResponse const.

  [ Merge of http://go/wvgerrit/14618 ]

  The lack of const on this reference seems to be a mistake, since the
  responses is never modified.  This also allows the new CE CDM to pass
  responses directly through from the caller.

* Let Properties determine DeviceFiles level support

  [ Merge of http://go/wvgerrit/14620 ]

  Non-Android platforms do not have multiple security levels, and so do
  not use the security level to construct a base path.

  Instead of requiring a known "security level" to construct a file,
  accept anything that platform Properties will accept as a base path.

* Drop Properties::GetSecurityLevel().

  [ Merge of http://go/wvgerrit/14617 ]

  This seems to be dead code.

Change-Id: I94a970279213100730d6e6c763558dbe386f936a
This commit is contained in:
Rahul Frias
2015-09-25 18:26:54 -07:00
parent d5e3c89be8
commit 4e047b8b0c
8 changed files with 28 additions and 32 deletions

View File

@@ -76,14 +76,10 @@ DeviceFiles::~DeviceFiles() {
}
bool DeviceFiles::Init(CdmSecurityLevel security_level) {
switch (security_level) {
case kSecurityLevelL1:
case kSecurityLevelL2:
case kSecurityLevelL3:
break;
default:
LOGW("DeviceFiles::Init: Unsupported security level %d", security_level);
return false;
std::string path;
if (!Properties::GetDeviceFilesBasePath(security_level, &path)) {
LOGW("DeviceFiles::Init: Unsupported security level %d", security_level);
return false;
}
if (!test_file_) file_.reset(new File());
security_level_ = security_level;