Merge "Fix handling of INSUFFICIENT_RESOURCES in LoadEntry"

This commit is contained in:
Srujan Gaddam
2019-01-17 03:33:49 +00:00
committed by Android (Google) Code Review
3 changed files with 54 additions and 24 deletions

View File

@@ -79,6 +79,11 @@ class UsageTableHeader {
// for the objects that DeleteEntry depends on.
void DeleteEntryForTest(uint32_t usage_entry_number);
// TODO(rfrias): Move to utility class
static int64_t GetRandomInRange(size_t upper_bound_exclusive);
static int64_t GetRandomInRangeWithExclusion(size_t upper_bound_exclusive,
size_t exclude);
private:
CdmResponseType MoveEntry(uint32_t from /* usage entry number */,
const CdmUsageEntry& from_usage_entry,
@@ -127,9 +132,6 @@ class UsageTableHeader {
metrics::CryptoMetrics alternate_crypto_metrics_;
// TODO(rfrias): Move to utility class
uint32_t GetRandomInRange(size_t upper_bound_inclusive);
// Test related declarations
friend class UsageTableHeaderTest;