Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Issue 2939923003: Check embargo status in PlatformNotificationServiceImpl::CheckPermissionOnIOThread (Closed)

Created:
3 years, 6 months ago by dominickn
Modified:
3 years, 6 months ago
Reviewers:
CC:
chromium-reviews
Target Ref:
refs/branch-heads/3112
Project:
chromium
Visibility:
Public.

Description

Check 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-Original-Commit-Position: refs/heads/master@{#477856} Review-Url: https://codereview.chromium.org/2939923003 . Cr-Commit-Position: refs/branch-heads/3112@{#348} Cr-Branched-From: b6460e24cf59f429d69de255538d0fc7a425ccf9-refs/heads/master@{#474897} Committed: https://chromium.googlesource.com/chromium/src/+/611ba643701ed338a8f7bab4b607b8ef530ee2e8

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -33 lines) Patch
M chrome/browser/notifications/platform_notification_service_impl.cc View 3 chunks +14 lines, -1 line 0 comments Download
M chrome/browser/permissions/permission_decision_auto_blocker.h View 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/permissions/permission_decision_auto_blocker.cc View 3 chunks +40 lines, -32 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
dominickn
3 years, 6 months ago (2017-06-15 00:04:40 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
611ba643701ed338a8f7bab4b607b8ef530ee2e8.

Powered by Google App Engine
This is Rietveld 408576698