DescriptionCheck embargo status in PlatformNotificationServiceImpl::CheckPermissionOnIOThread
window.Notification.permission directly checks the
HostContentSettingsMap for notification permission. This means that if
the permission is embargoed, it will incorrectly return "default"
instead of "denied".
This CL refactors PermissionDecisionAutoBlocker::GetEmbargoResult to be
a static method that can be called with a HostContentSettingsMap
argument. This allows the PlatformNotificationServiceImpl (which is
running on the IO thread) to check the embargo status of the
notification permission and return the correct value.
The long-term fix here is that PermissionManager::GetPermissionStatus
must be made thread safe so that there is one and only one way to
correctly query permission status from any thread.
BUG=730273
Review-Url: https://codereview.chromium.org/2926773002
Cr-Commit-Position: refs/heads/master@{#477856}
Committed: https://chromium.googlesource.com/chromium/src/+/66e276cfca435df9c8c5d42580a6a88406b311fe
Patch Set 1 #
Total comments: 4
Patch Set 2 : Nits #
Dependent Patchsets: Messages
Total messages: 21 (14 generated)
|