Snap for 4751833 from 81ce8b4601 to pi-release
Change-Id: I4268093c35f4f4c710176801f85856ede49a569b
This commit is contained in:
@@ -54,6 +54,12 @@ CdmSession::CdmSession(FileSystem* file_system,
|
|||||||
}
|
}
|
||||||
|
|
||||||
CdmSession::~CdmSession() {
|
CdmSession::~CdmSession() {
|
||||||
|
if (usage_support_type_ == kUsageEntrySupport &&
|
||||||
|
has_provider_session_token() &&
|
||||||
|
usage_table_header_ != NULL) {
|
||||||
|
UpdateUsageEntryInformation();
|
||||||
|
}
|
||||||
|
|
||||||
if (!key_set_id_.empty()) {
|
if (!key_set_id_.empty()) {
|
||||||
// Unreserve the license ID.
|
// Unreserve the license ID.
|
||||||
file_handle_->UnreserveLicenseId(key_set_id_);
|
file_handle_->UnreserveLicenseId(key_set_id_);
|
||||||
|
|||||||
@@ -15,6 +15,8 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
const std::string kKeyBuildInfo = "build_info";
|
||||||
|
|
||||||
// URL for Google Provisioning Server.
|
// URL for Google Provisioning Server.
|
||||||
// The provisioning server supplies the certificate that is needed
|
// The provisioning server supplies the certificate that is needed
|
||||||
// to communicate with the License Server.
|
// to communicate with the License Server.
|
||||||
@@ -235,6 +237,15 @@ CdmResponseType CertificateProvisioning::GetProvisioningRequest(
|
|||||||
return CLIENT_IDENTIFICATION_TOKEN_ERROR_2;
|
return CLIENT_IDENTIFICATION_TOKEN_ERROR_2;
|
||||||
}
|
}
|
||||||
client_id->set_token(token);
|
client_id->set_token(token);
|
||||||
|
|
||||||
|
std::string value;
|
||||||
|
if (Properties::GetBuildInfo(&value)) {
|
||||||
|
ClientIdentification_NameValue* client_info;
|
||||||
|
|
||||||
|
client_info = client_id->add_client_info();
|
||||||
|
client_info->set_name(kKeyBuildInfo);
|
||||||
|
client_info->set_value(value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t nonce;
|
uint32_t nonce;
|
||||||
|
|||||||
@@ -133,15 +133,6 @@ CdmResponseType ClientIdentification::Prepare(
|
|||||||
client_info->set_name(kKeyBuildInfo);
|
client_info->set_name(kKeyBuildInfo);
|
||||||
client_info->set_value(value);
|
client_info->set_value(value);
|
||||||
}
|
}
|
||||||
if (!device_id_.empty()) {
|
|
||||||
client_info = client_id->add_client_info();
|
|
||||||
client_info->set_name(kKeyDeviceId);
|
|
||||||
client_info->set_value(b2a_hex(device_id_));
|
|
||||||
} else if (crypto_session_->GetInternalDeviceUniqueId(&value)) {
|
|
||||||
client_info = client_id->add_client_info();
|
|
||||||
client_info->set_name(kKeyDeviceId);
|
|
||||||
client_info->set_value(value);
|
|
||||||
}
|
|
||||||
if (Properties::GetWVCdmVersion(&value)) {
|
if (Properties::GetWVCdmVersion(&value)) {
|
||||||
client_info = client_id->add_client_info();
|
client_info = client_id->add_client_info();
|
||||||
client_info->set_name(kKeyWvCdmVersion);
|
client_info->set_name(kKeyWvCdmVersion);
|
||||||
|
|||||||
@@ -338,11 +338,12 @@ TEST_F(CdmSessionTest, UpdateUsageEntry) {
|
|||||||
|
|
||||||
// Set up mocks and expectations for the UpdateUsageEntryInformation call.
|
// Set up mocks and expectations for the UpdateUsageEntryInformation call.
|
||||||
EXPECT_CALL(*crypto_session_, GetUsageSupportType(_))
|
EXPECT_CALL(*crypto_session_, GetUsageSupportType(_))
|
||||||
.WillOnce(DoAll(SetArgPointee<0>(kUsageEntrySupport), Return(NO_ERROR)));
|
.WillRepeatedly(DoAll(
|
||||||
|
SetArgPointee<0>(kUsageEntrySupport), Return(NO_ERROR)));
|
||||||
EXPECT_CALL(*license_parser_, provider_session_token())
|
EXPECT_CALL(*license_parser_, provider_session_token())
|
||||||
.WillOnce(Return("Mock provider session token"));
|
.WillRepeatedly(Return("Mock provider session token"));
|
||||||
EXPECT_CALL(usage_table_header_, UpdateEntry(NotNull(), NotNull()))
|
EXPECT_CALL(usage_table_header_, UpdateEntry(NotNull(), NotNull()))
|
||||||
.WillOnce(Return(NO_ERROR));
|
.WillRepeatedly(Return(NO_ERROR));
|
||||||
|
|
||||||
EXPECT_EQ(NO_ERROR, cdm_session_->Init(NULL));
|
EXPECT_EQ(NO_ERROR, cdm_session_->Init(NULL));
|
||||||
EXPECT_EQ(kUsageEntrySupport, cdm_session_->get_usage_support_type())
|
EXPECT_EQ(kUsageEntrySupport, cdm_session_->get_usage_support_type())
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user