Core CDM: Remove usage info as a run-time type.
[ Merge of http://go/wvgerrit/159221 ] This CL modifies how usage entry info is tracked internally by the CDM at run time. It removes the different "storage types" that entries represent (license or usage info), and instead it contains only the information associated with license types. The presences of a key-set-id allows the UsageTableHeader to determine if the entry slot is currently being used, or if it can be treated as unoccupied. By removing this different type, it completely prevents the CDM and its tests from using "usage-info" type entries. This required significant updates to the UsageTableHeader tests. Additionally, several of the variable names within the usage table have been simplified and shortened to reflect their new meanings. Bug: 242289743 Test: run_x86_64_tests and usage_table_header_unittest Change-Id: I939e479779425550a17a3c9e6c6d1bc6885e493e
This commit is contained in:
@@ -103,17 +103,6 @@ class DeviceFiles {
|
||||
CryptoWrappedKey wrapped_private_key;
|
||||
};
|
||||
|
||||
struct CdmUsageData {
|
||||
std::string provider_session_token;
|
||||
CdmKeyMessage license_request;
|
||||
CdmKeyResponse license;
|
||||
std::string key_set_id;
|
||||
CdmUsageEntry usage_entry;
|
||||
uint32_t usage_entry_number;
|
||||
std::string drm_certificate;
|
||||
CryptoWrappedKey wrapped_private_key;
|
||||
};
|
||||
|
||||
DeviceFiles(wvutil::FileSystem*);
|
||||
virtual ~DeviceFiles();
|
||||
|
||||
@@ -179,7 +168,7 @@ class DeviceFiles {
|
||||
|
||||
virtual bool StoreUsageTableInfo(
|
||||
const CdmUsageTableHeader& usage_table_header,
|
||||
const std::vector<CdmUsageEntryInfo>& usage_entry_info);
|
||||
const std::vector<CdmUsageEntryInfo>& usage_entry_info_list);
|
||||
|
||||
// When retrieving usage table information from the file system; any
|
||||
// table that has yet to be updated for the LRU attributes will be
|
||||
@@ -190,7 +179,7 @@ class DeviceFiles {
|
||||
// is set to true if any are detected.
|
||||
virtual bool RetrieveUsageTableInfo(
|
||||
CdmUsageTableHeader* usage_table_header,
|
||||
std::vector<CdmUsageEntryInfo>* usage_entry_info, bool* lru_upgrade,
|
||||
std::vector<CdmUsageEntryInfo>* usage_entry_info_list, bool* lru_upgrade,
|
||||
bool* has_usage_info_entries);
|
||||
|
||||
virtual bool DeleteUsageTableInfo();
|
||||
@@ -262,10 +251,6 @@ class DeviceFiles {
|
||||
FRIEND_TEST(DeviceFilesTest, OkpInfo_FileDoesNotExist);
|
||||
FRIEND_TEST(DeviceFilesTest, OkpInfo_DeleteFile);
|
||||
FRIEND_TEST(DeviceFilesTest, OkpInfo_StoreAndRetrieve);
|
||||
FRIEND_TEST(DeviceFilesUsageInfoTest, Delete);
|
||||
FRIEND_TEST(DeviceFilesUsageInfoTest, DeleteAll);
|
||||
FRIEND_TEST(DeviceFilesUsageInfoTest, Read);
|
||||
FRIEND_TEST(DeviceFilesUsageInfoTest, Store);
|
||||
FRIEND_TEST(DeviceFilesUsageTableTest, Read);
|
||||
FRIEND_TEST(DeviceFilesUsageTableTest, Store);
|
||||
FRIEND_TEST(DeviceFilesUsageTableTest, ReadWithoutLruData);
|
||||
@@ -275,11 +260,7 @@ class DeviceFiles {
|
||||
FRIEND_TEST(StoreCertificateTest, DefaultAndLegacy);
|
||||
FRIEND_TEST(WvCdmRequestLicenseTest, UnprovisionTest);
|
||||
FRIEND_TEST(WvCdmRequestLicenseTest, ForceL3Test);
|
||||
FRIEND_TEST(WvCdmRequestLicenseTest, UsageInfoRetryTest);
|
||||
FRIEND_TEST(WvCdmRequestLicenseTest, UsageReleaseAllTest);
|
||||
FRIEND_TEST(WvCdmUsageInfoTest, UsageInfo);
|
||||
FRIEND_TEST(WvCdmUsageTest, WithClientId);
|
||||
FRIEND_TEST(WvCdmExtendedDurationTest, UsageOverflowTest);
|
||||
#endif
|
||||
|
||||
static std::set<std::string> reserved_license_ids_;
|
||||
|
||||
Reference in New Issue
Block a user