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

Issue 2790473004: Permissions: Clear embargo if user changes an embargoed permission's setting. (Closed)

Created:
3 years, 8 months ago by Patti Lor
Modified:
3 years, 8 months ago
Reviewers:
dominickn, raymes, gone
CC:
chromium-reviews, mlamouri+watch-permissions_chromium.org, lgarron+watch_chromium.org, raymes+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Permissions: Clear embargo if user changes an embargoed permission's setting. Allow the embargo status of a permission to be cleared when the user changes the setting for an embargoed permission to "Ask" or "Allow". However, the system will still remember that the setting was previously embargoed, so if another permission prompt is dismissed for that permission, it will be re-embargoed. Permissions embargoed because they are blacklisted will be re-embargoed if they are still on the blacklist during the next permission request. BUG=704771 TEST=Run Chrome with the command line flag --enable-features=BlockPromptsIfDismissedOften and navigate to https://permission.site. Place the notification permission under embargo by clicking the "Notifications" button three times until the permission prompt no longer appears. In the page info bubble, the "Notifications" drop-down should say "block". Choose "Allow" instead, which should update the bubble to allow notifications and ask for the page to be reloaded. Then change the drop-down to "Ask", which should also update the notifications permission back to "Ask". Click the "Notifications" button on the page again and notice the permission prompt to ask for notifications permission is shown again. Review-Url: https://codereview.chromium.org/2790473004 Cr-Commit-Position: refs/heads/master@{#462733} Committed: https://chromium.googlesource.com/chromium/src/+/7131c1fee08ad62e85476acfd3604765bc997f39

Patch Set 1 #

Total comments: 16

Patch Set 2 : Review comments. #

Patch Set 3 : Hook up for permissions on Android. #

Total comments: 4

Patch Set 4 : Review comments. #

Total comments: 2

Patch Set 5 : Review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -2 lines) Patch
M chrome/browser/android/preferences/website_preference_bridge.cc View 1 2 3 2 chunks +14 lines, -0 lines 0 comments Download
M chrome/browser/permissions/permission_decision_auto_blocker.h View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/permissions/permission_decision_auto_blocker.cc View 1 2 3 1 chunk +35 lines, -0 lines 0 comments Download
M chrome/browser/permissions/permission_decision_auto_blocker_unittest.cc View 1 2 3 4 1 chunk +117 lines, -0 lines 0 comments Download
M chrome/browser/ui/page_info/page_info.cc View 1 2 3 2 chunks +8 lines, -2 lines 0 comments Download

Messages

Total messages: 49 (36 generated)
Patti Lor
Hey Dom, do you think it's also worth adding a couple tests with OnPermissionChanged() and ...
3 years, 8 months ago (2017-03-31 04:49:23 UTC) #6
dominickn
Thanks Patti! Looks pretty good! Mostly nits. https://codereview.chromium.org/2790473004/diff/1/chrome/browser/permissions/permission_decision_auto_blocker.cc File chrome/browser/permissions/permission_decision_auto_blocker.cc (right): https://codereview.chromium.org/2790473004/diff/1/chrome/browser/permissions/permission_decision_auto_blocker.cc#newcode311 chrome/browser/permissions/permission_decision_auto_blocker.cc:311: DCHECK(permission_dict->RemoveWithoutPathExpansion( I ...
3 years, 8 months ago (2017-04-03 01:35:31 UTC) #7
dominickn
One more thing - I think you can hook this up on Android as well ...
3 years, 8 months ago (2017-04-03 02:38:34 UTC) #8
Patti Lor
Thanks Dom, PTAL - I did a bit of refactoring of the existing code as ...
3 years, 8 months ago (2017-04-05 08:34:28 UTC) #25
dominickn
https://codereview.chromium.org/2790473004/diff/80001/chrome/browser/permissions/permission_decision_auto_blocker.cc File chrome/browser/permissions/permission_decision_auto_blocker.cc (right): https://codereview.chromium.org/2790473004/diff/80001/chrome/browser/permissions/permission_decision_auto_blocker.cc#newcode317 chrome/browser/permissions/permission_decision_auto_blocker.cc:317: PermissionManager::Get(profile_)->GetPermissionStatus( Instead of calling PermissionManager (and thus requiring an ...
3 years, 8 months ago (2017-04-05 08:50:19 UTC) #26
Patti Lor
https://codereview.chromium.org/2790473004/diff/80001/chrome/browser/permissions/permission_decision_auto_blocker.cc File chrome/browser/permissions/permission_decision_auto_blocker.cc (right): https://codereview.chromium.org/2790473004/diff/80001/chrome/browser/permissions/permission_decision_auto_blocker.cc#newcode317 chrome/browser/permissions/permission_decision_auto_blocker.cc:317: PermissionManager::Get(profile_)->GetPermissionStatus( On 2017/04/05 08:50:19, dominickn wrote: > Instead of ...
3 years, 8 months ago (2017-04-06 02:14:03 UTC) #33
dominickn
lgtm, thanks!
3 years, 8 months ago (2017-04-06 04:00:36 UTC) #34
Patti Lor
Thanks Dom! dfalcantara@chromium.org: Please review changes in chrome/browser/android/* raymes@chromium.org: Please review changes in chrome/browser/permissions/* and ...
3 years, 8 months ago (2017-04-06 04:05:14 UTC) #36
raymes
lgtm https://codereview.chromium.org/2790473004/diff/100001/chrome/browser/permissions/permission_decision_auto_blocker_unittest.cc File chrome/browser/permissions/permission_decision_auto_blocker_unittest.cc (right): https://codereview.chromium.org/2790473004/diff/100001/chrome/browser/permissions/permission_decision_auto_blocker_unittest.cc#newcode211 chrome/browser/permissions/permission_decision_auto_blocker_unittest.cc:211: // Notification's default setting is |CONTENT_SETTING_ASK|. nit: I ...
3 years, 8 months ago (2017-04-06 04:45:35 UTC) #37
Patti Lor
Thanks Raymes! https://codereview.chromium.org/2790473004/diff/100001/chrome/browser/permissions/permission_decision_auto_blocker_unittest.cc File chrome/browser/permissions/permission_decision_auto_blocker_unittest.cc (right): https://codereview.chromium.org/2790473004/diff/100001/chrome/browser/permissions/permission_decision_auto_blocker_unittest.cc#newcode211 chrome/browser/permissions/permission_decision_auto_blocker_unittest.cc:211: // Notification's default setting is |CONTENT_SETTING_ASK|. On ...
3 years, 8 months ago (2017-04-06 05:31:46 UTC) #40
gone
c/b/android lgtm
3 years, 8 months ago (2017-04-06 17:47:15 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2790473004/120001
3 years, 8 months ago (2017-04-07 00:22:43 UTC) #46
commit-bot: I haz the power
3 years, 8 months ago (2017-04-07 01:26:54 UTC) #49
Message was sent while issue was closed.
Committed patchset #5 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/7131c1fee08ad62e85476acfd360...

Powered by Google App Engine
This is Rietveld 408576698