• xhwang's avatar
    media: Check kDisableInfobarForProtectedMediaIdentifier in... · 5f80e74c
    xhwang authored
    media: Check kDisableInfobarForProtectedMediaIdentifier in ProtectedMediaIdentifierPermissionContext.
    
    Previously this flag was checked in BrowserCdmManager. When this flag is set,
    we would NOT check any preference and content setting related to protected
    media identifier. Permission was granted blindly by default.
    
    This CL moves the check to ProtectedMediaIdentifierPermissionContext. Now the
    impact of this flag is more restrictive: only when the permission status is
    "ASK" will we replace it with "ALLOW". This applies to both permission request
    and permission check. If the permission is "BLOCKED" for any reason (e.g.
    invalid origin, disabled by master switch, blocked in content setting), the
    permission request/check will be blocked.
    
    BUG=456219
    TEST=Manually tested with and without the switch.
    
    Review URL: https://codereview.chromium.org/1007163003
    
    Cr-Commit-Position: refs/heads/master@{#320997}
    5f80e74c
browser_cdm_manager.cc 20.2 KB