Merge CE Device Changes

This is a merge of the following changes made for CE devices in the
widevine share repo:

http://go/wvgerrit/16211 Only load offline session if needed in GKR
http://go/wvgerrit/16245 Unreserve IDs in reservation test
http://go/wvgerrit/16242 Re-enable WebM tests
http://go/wvgerrit/16240 Un-reserve reserved license IDs
http://go/wvgerrit/16190 Add temporary session type
http://go/wvgerrit/16189 Enforce license type and can_persist for storage

Change-Id: I592416f66c0d1286844266c01cc9b4906c7b6b05
This commit is contained in:
Fred Gylys-Colwell
2015-12-07 14:12:46 -08:00
parent 6886b1fa12
commit e4513f4a59
12 changed files with 68 additions and 7 deletions

View File

@@ -132,6 +132,7 @@ CdmLicense::CdmLicense(const CdmSessionId& session_id)
session_id_(session_id),
initialized_(false),
renew_with_client_id_(false),
is_offline_(false),
clock_(new Clock()) {}
CdmLicense::CdmLicense(const CdmSessionId& session_id, Clock* clock)
@@ -139,7 +140,8 @@ CdmLicense::CdmLicense(const CdmSessionId& session_id, Clock* clock)
policy_engine_(NULL),
session_id_(session_id),
initialized_(false),
renew_with_client_id_(false) {
renew_with_client_id_(false),
is_offline_(false) {
clock_.reset(clock);
}
@@ -522,6 +524,10 @@ CdmResponseType CdmLicense::HandleKeyResponse(
return NO_CONTENT_KEY;
}
if (license.id().type() == video_widevine_server::sdk::OFFLINE &&
license.policy().can_persist())
is_offline_ = true;
if (license.id().has_provider_session_token())
provider_session_token_ = license.id().provider_session_token();
@@ -1102,6 +1108,7 @@ bool CdmLicense::PrepareContentId(const CdmLicenseType license_type,
content_id->set_license_type(video_widevine_server::sdk::OFFLINE);
break;
case kLicenseTypeStreaming:
case kLicenseTypeTemporary:
content_id->set_license_type(video_widevine_server::sdk::STREAMING);
break;
default: