Skip to content
  • xhwang's avatar
    media: Verify CDM host files · 785a8347
    xhwang authored
    This change provides the Content Decryption Module (CDM) a way to verify
    the host files, the CDM adapter and the CDM itself.
    
    GetCdmHostFilePath() provides a list of host files.
    
    CdmHostFile opens the pair of a file and its corresponding signature
    file. CdmHostFiles manages all files (and signature files) opened for
    verification.
    
    On platforms that use the Zygote, files are opened in the Zygote process.
    After a child process is forked, if it's not a ppapi process, all files
    will be immediately closed.
    
    On other platforms, files are opened after the ppapi process is
    launched, but before the sandbox is sealed.
    
    On all platforms, if the ppapi process hosts a CDM, VerifyHostFiles()
    will be called with the files managed in CdmHostFiles. Then all opened
    files will be closed.
    
    A browser test is added to make sure files are opened correctly and are
    passed in VerifyHostFiles() as expected.
    
    BUG=658036
    TEST=New browser_tests added.
    
    Review-Url: https://codereview.chromium.org/2582463003
    Cr-Commit-Position: refs/heads/master@{#446260}
    785a8347