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

Issue 2686463002: Add a source to the result of PermissionContextBase::GetPermissionStatus (Closed)

Created:
3 years, 10 months ago by raymes
Modified:
3 years, 10 months ago
CC:
chromium-reviews, awdf+watch_chromium.org, toyoshim+midi_chromium.org, chfremer+watch_chromium.org, mlamouri+watch-notifications_chromium.org, raymes+watch_chromium.org, feature-media-reviews_chromium.org, mcasas+watch+vc_chromium.org, mlamouri+watch-permissions_chromium.org, chrome-apps-syd-reviews_chromium.org, dominickn
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a source to the result of PermissionContextBase::GetPermissionStatus There are several different cases where it is helpful to know the source or reason for a particular permission status being returned. The immediate reason for needing this is to properly measure metrics for the PermissionDecisionAutoBlocker. This CL provides the first steps towards exposing permission decision information. PermissionContextBase::GetPermissionStatus now returns a PermissionResult which includes both the content setting being returned, as well as a PermissionStatusSource which describes the reason for the setting. Some initial reasons have been added, specifically: -MULTIPLE_DISMISSALS - when a permission is blocked as a result of multiple dismissals. -SAFE_BROWSING_BLACKLIST - when a permission is blocked because the origin is on the safe browsing blacklist. These will be hooked up in a subsequent CL. BUG=679877 TBR=peter@chromium.org,michaeln@chromium.org,sergeyu@chromium.org Review-Url: https://codereview.chromium.org/2686463002 Cr-Commit-Position: refs/heads/master@{#450590} Committed: https://chromium.googlesource.com/chromium/src/+/ab35971d1da1c791761f65f8dbd6df9512fd2c4d

Patch Set 1 #

Total comments: 6

Patch Set 2 : . #

Patch Set 3 : Add a source to the result of PermissionContextBase::GetPermissionStatus #

Patch Set 4 : Add a source to the result of PermissionContextBase::GetPermissionStatus #

Patch Set 5 : Add a source to the result of PermissionContextBase::GetPermissionStatus #

Patch Set 6 : Add a source to the result of PermissionContextBase::GetPermissionStatus #

Messages

Total messages: 44 (26 generated)
raymes
Hey Kendra, PTAL. We discussed doing this a little while back. Let me know if ...
3 years, 10 months ago (2017-02-07 07:21:41 UTC) #2
kcarattini
Thanks so much for doing this, Raymes! +cc peter since he might be interested in ...
3 years, 10 months ago (2017-02-07 22:53:33 UTC) #3
meredithl
lgtm Thanks, Raymes. This looks great to me (although I am by no means an ...
3 years, 10 months ago (2017-02-08 03:26:12 UTC) #4
raymes
Thanks, ptal! https://codereview.chromium.org/2686463002/diff/1/chrome/browser/permissions/permission_context_base.h File chrome/browser/permissions/permission_context_base.h (right): https://codereview.chromium.org/2686463002/diff/1/chrome/browser/permissions/permission_context_base.h#newcode34 chrome/browser/permissions/permission_context_base.h:34: enum class PermissionStatusSource { On 2017/02/07 22:53:33, ...
3 years, 10 months ago (2017-02-08 04:08:40 UTC) #5
kcarattini
Ok. Could you update the cl description to say exactly which "sources" you are adding ...
3 years, 10 months ago (2017-02-08 04:39:48 UTC) #8
Peter Beverloo
Thanks for the cc - this looks great! I'll use it to supersede 2534503002 once ...
3 years, 10 months ago (2017-02-08 15:51:42 UTC) #11
raymes
On 2017/02/08 04:39:48, kcarattini wrote: > Ok. Could you update the cl description to say ...
3 years, 10 months ago (2017-02-09 02:12:35 UTC) #14
raymes
On 2017/02/08 15:51:42, Peter Beverloo wrote: > Thanks for the cc - this looks great! ...
3 years, 10 months ago (2017-02-09 02:13:04 UTC) #15
kcarattini
lgtm Thanks, Raymes!
3 years, 10 months ago (2017-02-10 02:09:40 UTC) #16
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/2686463002/60001
3 years, 10 months ago (2017-02-14 04:27:57 UTC) #19
raymes
TBR OWNERS of client code michaeln: chrome/browser/storage/durable_storage_permission_context.cc chrome/browser/storage/durable_storage_permission_context_unittest.cc sergeyu: chrome/browser/media/midi_permission_context_unittest.cc chrome/browser/media/webrtc/media_stream_device_permission_context_unittest.cc peter: chrome/browser/notifications/notification_permission_context_unittest.cc
3 years, 10 months ago (2017-02-14 05:32:30 UTC) #27
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/2686463002/80001
3 years, 10 months ago (2017-02-14 05:32:53 UTC) #31
commit-bot: I haz the power
Failed to apply patch for chrome/browser/permissions/permission_context_base_unittest.cc: While running git apply --index -p1; error: patch failed: ...
3 years, 10 months ago (2017-02-14 07:10:33 UTC) #33
Peter Beverloo
lgtm
3 years, 10 months ago (2017-02-14 13:51:36 UTC) #34
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/2686463002/100001
3 years, 10 months ago (2017-02-15 01:41:20 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/365026)
3 years, 10 months ago (2017-02-15 03:39:17 UTC) #39
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/2686463002/100001
3 years, 10 months ago (2017-02-15 05:02:55 UTC) #41
commit-bot: I haz the power
3 years, 10 months ago (2017-02-15 06:24:22 UTC) #44
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/ab35971d1da1c791761f65f8dbd6...

Powered by Google App Engine
This is Rietveld 408576698