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:
@@ -358,8 +358,7 @@ TEST_F(CryptoMetricsTest, AllCryptoMetrics) {
|
||||
crypto_metrics.usage_table_header_lru_usage_info_count_.Record(150);
|
||||
crypto_metrics.usage_table_header_lru_offline_license_count_.Record(50);
|
||||
crypto_metrics.usage_table_header_lru_evicted_entry_staleness_.Record(259200);
|
||||
crypto_metrics.usage_table_header_lru_evicted_entry_type_.Record(
|
||||
kStorageUsageInfo);
|
||||
crypto_metrics.usage_table_header_lru_evicted_entry_type_.Record(1);
|
||||
|
||||
// Oem crypto metrics.
|
||||
crypto_metrics.oemcrypto_api_version_.Record(123);
|
||||
@@ -482,8 +481,7 @@ TEST_F(CryptoMetricsTest, AllCryptoMetrics) {
|
||||
EXPECT_EQ(
|
||||
259200,
|
||||
actual.usage_table_header_lru_evicted_entry_staleness_s().int_value());
|
||||
EXPECT_EQ(kStorageUsageInfo,
|
||||
actual.usage_table_header_lru_evicted_entry_type().int_value());
|
||||
EXPECT_EQ(1, actual.usage_table_header_lru_evicted_entry_type().int_value());
|
||||
|
||||
// Oem crypto metrics.
|
||||
EXPECT_EQ(123, actual.oemcrypto_api_version().int_value());
|
||||
|
||||
Reference in New Issue
Block a user