• Xiaohan Wang's avatar
    media: Check CdmConfig in CdmAdapter · e18a5367
    Xiaohan Wang authored
    We used to have these checks in PpapiCdmAdapter, but they were lost when
    we added media::CdmAdapter.
    
    In summary:
    - Only allow storage ID when |allow_persistent_state| is true.
    - Only allow File IO when |allow_persistent_state| is true.
    - Only allow platform challenge when |allow_distinctive_identifier| is
      true.
    
    Also post tasks in CdmAdapter in failure cases to avoid reentrance into
    the CDM instance.
    
    this change. Filed crbug.com/836046 to refactor CdmAdapter and tests.
    
    Test: The current CdmAdapterTest makes it harder to add unittest for
    Bug: 510088,836046
    Change-Id: I5a88c253a75a3af00f553681b65792198f31dba7
    Reviewed-on: https://chromium-review.googlesource.com/1025220Reviewed-by: default avatarJohn Rummell <jrummell@chromium.org>
    Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#553373}
    e18a5367
cdm_adapter.cc 46.9 KB