• Thomas Anderson's avatar
    Revert "Immediately stop media streams if users revokes consent" · 4bbcea44
    Thomas Anderson authored
    This reverts commit 4e31d46a.
    
    Reason for revert: MediaStreamPermissionTest.DenyingPermissionStopsStreamWhenRelevant flakes on "Win7 Tests (1)":
    https://ci.chromium.org/p/chromium/builders/ci/Win7%20Tests%20%281%29/106475
    
    Original change's description:
    > Immediately stop media streams if users revokes consent
    > 
    > Since camera and microphone are particularly sensitive permissions we
    > should be viligent and stop streams immediately when the user revokes
    > the permission.
    > 
    > This CL uses the permission controller subscription functionality to
    > listen to permission changes on the relevant origins. Each DeviceRequest
    > will have up to 2 permission subscriptions (1 audio, 1 video). When
    > a permission is changed to non-Granted the specific DeviceRequest is
    > canceled. Subscriptions are removed when the DeviceRequest is deleted.
    > 
    > Because MediaStreamManager is an IO thread class but
    > PermissionController is a UI thread class, this CL has to do a bit of
    > thread hoping:
    > 
    > FinalizeStream(IO) > SubscribeToPermissionControllerOnUIThread(UI) >
    > SetPermissionSubscriptionIDs(IO) >(maybe)>
    > UnsubscribeFromPermissionControllerOnUIThread(UI)
    > 
    > DeleteRequest(IO) > UnsubscribeFromPermissionControllerOnUIThread(UI)
    > 
    > Bug: 1116435
    > 
    > Change-Id: I6649125e028d607eeb7ba5701b710a715addf6f2
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2352790
    > Commit-Queue: Andy Paicu <andypaicu@chromium.org>
    > Reviewed-by: Guido Urdaneta <guidou@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#798564}
    
    TBR=guidou@chromium.org,andypaicu@chromium.org
    
    Change-Id: I59eabef07aa990fd22bebba445c36c273c1a8342
    No-Presubmit: true
    No-Tree-Checks: true
    No-Try: true
    Bug: 1116435
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2360119Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
    Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#798753}
    4bbcea44
BUILD.gn 371 KB