Core CDM: Retrieving USAGE_INFO triggers clean-up.

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

The CDM will delete all usage info / secure stop files on the device
when usage table entries labeled as USAGE_INFO are detected when
restoring the usage table.  DeviceFiles no longer transfers the
stored USAGE_INFO entry info into the run-time entry info vector for
the table.

This CL makes only minor changes to test data.  Significant updates
to both device file and usage table header unittests are required to
remove usage info / secure stop run-time resources.

Bug: 242289743
Test: run_x86_64_tests
Change-Id: I2d1fc0d6a4c994bc10bfce47818f101f95883979
This commit is contained in:
Alex Dale
2022-10-13 13:47:58 -07:00
parent b039f31b27
commit da9ba6c3ba
5 changed files with 128 additions and 67 deletions

View File

@@ -277,9 +277,14 @@ class DeviceFiles {
// When retrieving usage table information from the file system; any
// table that has yet to be updated for the LRU attributes will be
// indicated by |lru_upgrade|.
// Tables from earlier CDM releases might contain USAGE_INFO type
// entries. This entries are no long required, by their presence
// requires the usage table to be cleaned up. |has_usage_info_entries|
// 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, bool* lru_upgrade,
bool* has_usage_info_entries);
virtual bool DeleteUsageTableInfo();