Fixes for usage table upgrades

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

License were not being upgraded successfully from usage
tables to usage table headers and entries (big usage tables).

Bug: 65730713

Test: WV unit/integration tests
Test: GTSMediaDrmTests
Test: Playback using netflix and play movies
Test: Manual upgrade from N (L3)
Change-Id: I7ef127204104fa36dd1ee385bc80ed6a81172b4b
This commit is contained in:
Rahul Frias
2017-09-16 21:26:44 -07:00
parent ec9e1343ee
commit 20eeb1e546
6 changed files with 230 additions and 46 deletions

View File

@@ -165,8 +165,17 @@ class CryptoSession {
virtual CdmResponseType ShrinkUsageTableHeader(
uint32_t new_entry_count, CdmUsageTableHeader* usage_table_header);
virtual CdmResponseType MoveUsageEntry(uint32_t new_entry_number);
virtual bool CreateOldUsageEntry(
uint64_t time_since_license_received,
uint64_t time_since_first_decrypt,
uint64_t time_since_last_decrypt,
UsageDurationStatus status,
const std::string& server_mac_key,
const std::string& client_mac_key,
const std::string& provider_session_token);
virtual CdmResponseType CopyOldUsageEntry(
const std::string& provider_session_token);
virtual metrics::CryptoMetrics* GetCryptoMetrics() { return metrics_; }
private:
friend class CryptoSessionForTest;