[EME] Support reporting and restoring persistent usage data.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Dec 2017 21:35:58 +0000 (21:35 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Dec 2017 21:35:58 +0000 (21:35 +0000)
commitd2961f19660fec3c2e074d111a65c1e180363224
treea31f5624a0bd7cbd0d03f5f9f4d238ad7c89c5c7
parente2159952af78acbaf4060b64c2071529b75c8ae6
[EME] Support reporting and restoring persistent usage data.
https://bugs.webkit.org/show_bug.cgi?id=180684

Reviewed by Eric Carlson.

Add support for reading and acknowledging persistent usage data from the MediaKeys storage
directory.

Add a mechanism for passing the storage location down to CDMPrivate and CDMInstance objects
inside of the CDM class itself:

* Modules/encryptedmedia/CDM.cpp:
(WebCore::CDM::createInstance):
(WebCore::CDM::storageDirectory const):
* Modules/encryptedmedia/CDM.h:

Support loading expired session data, acknowledging expired session data, closing sessions
and removing usable key data.

* platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
(WebCore::isEqual):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::updateLicense):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::loadSession):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::closeSession):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::removeSessionData):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/encryptedmedia/CDM.cpp
Source/WebCore/Modules/encryptedmedia/CDM.h
Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h
Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm