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

Issue 1197853005: Collecting statistics on iframe permissions use. (Closed)

Created:
5 years, 6 months ago by keenanb
Modified:
5 years, 5 months ago
CC:
chromium-reviews, markusheintz_, Miguel Garcia
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Collecting statistics on iframe permissions use. The implementation of planned changes to iframe permissions handling should hinge on the expected impact of the changes. This rough patch allows us to collect some information about the expected impact by monitoring how often an iframe requests permissions, what kinds it requests, and what permissions its parent has or doesn't. TBR=tsepez@chromium.org Committed: https://crrev.com/edebda0b1b4feb0cc6f3d4a665a58efcc9f42d22 Cr-Commit-Position: refs/heads/master@{#338373}

Patch Set 1 #

Total comments: 29

Patch Set 2 : #

Patch Set 3 : Made suggested fixes and changed logging details. #

Total comments: 15

Patch Set 4 : Fixed naming and style. #

Total comments: 22

Patch Set 5 : Cleaned up text and removed GetOrigin DCHECK. #

Total comments: 15

Patch Set 6 : Reworded bias comment and fixed naming. #

Total comments: 1

Patch Set 7 : Fixed to use permission status. #

Total comments: 8

Patch Set 8 : Fixed NOTREACHED calls. #

Total comments: 7

Patch Set 9 : Fixed documentation. #

Total comments: 3

Patch Set 10 : Implemented PERMISSION_STATUS_LAST more cleanly. #

Patch Set 11 : Just rebased. #

Total comments: 7

Patch Set 12 : Fixed histogram name chaching issue. #

Patch Set 13 : Avoided crash when missing PermissionManager. #

Total comments: 1

Patch Set 14 : Fixed nits. #

Patch Set 15 : Just rebased. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -9 lines) Patch
M chrome/browser/permissions/permission_context_base.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/permissions/permission_context_uma_util.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/permissions/permission_context_uma_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +56 lines, -4 lines 0 comments Download
M content/public/common/permission_status.mojom View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +27 lines, -1 line 0 comments Download

Messages

Total messages: 61 (13 generated)
keenanb
hey joel. i forgot to add reviewers on friday. this is a tiny bit of ...
5 years, 6 months ago (2015-06-22 18:03:34 UTC) #2
jww
I was wondering about that :-) I'm about to jump on a flight, but I'll ...
5 years, 6 months ago (2015-06-22 18:06:22 UTC) #3
mlamouri (slow - plz ping)
I think you are missing the histograms.xml changes. Otherwise, I left some drive-by comments. I ...
5 years, 6 months ago (2015-06-22 22:10:57 UTC) #5
felt
driveby review: I see a bunch of TODOs and FIXMEs in chrome/browser/content_settings/permission_context_uma_util.cc. * You should ...
5 years, 6 months ago (2015-06-22 22:56:01 UTC) #7
jww
As felt said, it's a bit hard to look over this without addressing those TODOs/FIXMEs. ...
5 years, 6 months ago (2015-06-23 05:32:58 UTC) #8
mlamouri (slow - plz ping)
https://codereview.chromium.org/1197853005/diff/1/chrome/browser/content_settings/permission_context_uma_util.cc File chrome/browser/content_settings/permission_context_uma_util.cc (right): https://codereview.chromium.org/1197853005/diff/1/chrome/browser/content_settings/permission_context_uma_util.cc#newcode155 chrome/browser/content_settings/permission_context_uma_util.cc:155: // TODO(keenanb) On 2015/06/23 at 05:32:58, jww wrote: > ...
5 years, 6 months ago (2015-06-23 10:02:32 UTC) #9
keenanb
thanks for your feedback. i'm in the process of uploading a new patch. it is ...
5 years, 6 months ago (2015-06-24 22:26:11 UTC) #10
keenanb
This patch should be clean and complete (for what it attempts). The histogram ContentSettings.PermissionRequested.OffOrigin_Geolocation records ...
5 years, 6 months ago (2015-06-25 21:52:08 UTC) #11
mlamouri (slow - plz ping)
https://codereview.chromium.org/1197853005/diff/40001/chrome/browser/content_settings/permission_context_uma_util.cc File chrome/browser/content_settings/permission_context_uma_util.cc (right): https://codereview.chromium.org/1197853005/diff/40001/chrome/browser/content_settings/permission_context_uma_util.cc#newcode155 chrome/browser/content_settings/permission_context_uma_util.cc:155: return "?"; NOT_REACHED(); And after the switch() |return "";| ...
5 years, 5 months ago (2015-06-29 14:23:08 UTC) #12
keenanb
Hopefully one last review will finish this off. https://codereview.chromium.org/1197853005/diff/40001/chrome/browser/content_settings/permission_context_uma_util.cc File chrome/browser/content_settings/permission_context_uma_util.cc (right): https://codereview.chromium.org/1197853005/diff/40001/chrome/browser/content_settings/permission_context_uma_util.cc#newcode155 chrome/browser/content_settings/permission_context_uma_util.cc:155: return ...
5 years, 5 months ago (2015-06-29 19:09:00 UTC) #13
jww
Looking much better! https://codereview.chromium.org/1197853005/diff/60001/chrome/browser/content_settings/permission_context_uma_util.cc File chrome/browser/content_settings/permission_context_uma_util.cc (right): https://codereview.chromium.org/1197853005/diff/60001/chrome/browser/content_settings/permission_context_uma_util.cc#newcode155 chrome/browser/content_settings/permission_context_uma_util.cc:155: case PermissionType::NUM: nit: Can you make ...
5 years, 5 months ago (2015-06-29 21:26:59 UTC) #14
keenanb
https://codereview.chromium.org/1197853005/diff/60001/chrome/browser/content_settings/permission_context_uma_util.cc File chrome/browser/content_settings/permission_context_uma_util.cc (right): https://codereview.chromium.org/1197853005/diff/60001/chrome/browser/content_settings/permission_context_uma_util.cc#newcode155 chrome/browser/content_settings/permission_context_uma_util.cc:155: case PermissionType::NUM: On 2015/06/29 21:26:59, jww wrote: > nit: ...
5 years, 5 months ago (2015-06-29 22:43:45 UTC) #15
jww
lgtm, with my one comment. However, make sure mlamouri@ and felt@ are happy, too. In ...
5 years, 5 months ago (2015-06-29 22:53:23 UTC) #16
keenanb
On 2015/06/29 22:53:23, jww wrote: > https://codereview.chromium.org/1197853005/diff/60001/tools/metrics/histograms/histograms.xml > File tools/metrics/histograms/histograms.xml (right): > > https://codereview.chromium.org/1197853005/diff/60001/tools/metrics/histograms/histograms.xml#newcode3927 > ...
5 years, 5 months ago (2015-06-29 23:27:32 UTC) #17
mlamouri (slow - plz ping)
Sorry, I still have a few comments. It looks way better but the UMA we ...
5 years, 5 months ago (2015-06-30 10:27:21 UTC) #18
keenanb
https://codereview.chromium.org/1197853005/diff/80001/chrome/browser/content_settings/permission_context_uma_util.cc File chrome/browser/content_settings/permission_context_uma_util.cc (right): https://codereview.chromium.org/1197853005/diff/80001/chrome/browser/content_settings/permission_context_uma_util.cc#newcode158 chrome/browser/content_settings/permission_context_uma_util.cc:158: return std::string(); On 2015/06/30 10:27:20, Mounir Lamouri wrote: > ...
5 years, 5 months ago (2015-06-30 21:20:08 UTC) #19
mlamouri (slow - plz ping)
lgtm if you use PermissionStatus instead of ContentSetting for the permission. You might want to ...
5 years, 5 months ago (2015-07-01 11:23:05 UTC) #20
keenanb
hey, mlamouri or jww. could you double check this before i commit. you both approved ...
5 years, 5 months ago (2015-07-07 00:09:46 UTC) #21
jww
Generally still lgtm, with a few nits. Once you've corrected those, make sure to add ...
5 years, 5 months ago (2015-07-07 18:41:46 UTC) #22
jww
On 2015/07/07 18:41:46, jww wrote: > Generally still lgtm, with a few nits. Once you've ...
5 years, 5 months ago (2015-07-07 18:42:23 UTC) #23
keenanb
https://codereview.chromium.org/1197853005/diff/120001/chrome/browser/content_settings/permission_context_uma_util.cc File chrome/browser/content_settings/permission_context_uma_util.cc (right): https://codereview.chromium.org/1197853005/diff/120001/chrome/browser/content_settings/permission_context_uma_util.cc#newcode160 chrome/browser/content_settings/permission_context_uma_util.cc:160: NOTREACHED(); On 2015/07/07 18:41:46, jww wrote: > This NOTREACHED ...
5 years, 5 months ago (2015-07-07 21:02:59 UTC) #24
jww
https://codereview.chromium.org/1197853005/diff/140001/content/child/background_sync/background_sync_provider.cc File content/child/background_sync/background_sync_provider.cc (right): https://codereview.chromium.org/1197853005/diff/140001/content/child/background_sync/background_sync_provider.cc#newcode278 content/child/background_sync/background_sync_provider.cc:278: // PERMISSION_STATUS_NUM should never be passed into this function. ...
5 years, 5 months ago (2015-07-07 21:14:23 UTC) #25
mlamouri (slow - plz ping)
https://codereview.chromium.org/1197853005/diff/140001/content/public/common/permission_status.mojom File content/public/common/permission_status.mojom (right): https://codereview.chromium.org/1197853005/diff/140001/content/public/common/permission_status.mojom#newcode11 content/public/common/permission_status.mojom:11: NUM I'm confused but maybe I'm missing something. Why ...
5 years, 5 months ago (2015-07-07 21:18:47 UTC) #26
keenanb
https://codereview.chromium.org/1197853005/diff/140001/content/child/background_sync/background_sync_provider.cc File content/child/background_sync/background_sync_provider.cc (right): https://codereview.chromium.org/1197853005/diff/140001/content/child/background_sync/background_sync_provider.cc#newcode278 content/child/background_sync/background_sync_provider.cc:278: // PERMISSION_STATUS_NUM should never be passed into this function. ...
5 years, 5 months ago (2015-07-08 00:37:21 UTC) #27
mlamouri (slow - plz ping)
https://codereview.chromium.org/1197853005/diff/140001/content/public/common/permission_status.mojom File content/public/common/permission_status.mojom (right): https://codereview.chromium.org/1197853005/diff/140001/content/public/common/permission_status.mojom#newcode11 content/public/common/permission_status.mojom:11: NUM On 2015/07/08 at 00:37:21, keenanb wrote: > On ...
5 years, 5 months ago (2015-07-08 15:00:44 UTC) #28
jww
https://codereview.chromium.org/1197853005/diff/160001/content/child/background_sync/background_sync_provider.cc File content/child/background_sync/background_sync_provider.cc (right): https://codereview.chromium.org/1197853005/diff/160001/content/child/background_sync/background_sync_provider.cc#newcode257 content/child/background_sync/background_sync_provider.cc:257: void BackgroundSyncProvider::GetPermissionStatusCallback( Sorry to beat on a dead horse ...
5 years, 5 months ago (2015-07-08 15:53:58 UTC) #29
jww
https://codereview.chromium.org/1197853005/diff/160001/content/child/background_sync/background_sync_provider.cc File content/child/background_sync/background_sync_provider.cc (right): https://codereview.chromium.org/1197853005/diff/160001/content/child/background_sync/background_sync_provider.cc#newcode257 content/child/background_sync/background_sync_provider.cc:257: void BackgroundSyncProvider::GetPermissionStatusCallback( On 2015/07/08 15:53:58, jww wrote: > Sorry ...
5 years, 5 months ago (2015-07-08 15:55:09 UTC) #30
keenanb
i took mlamouri's advice. https://codereview.chromium.org/1197853005/diff/160001/content/child/background_sync/background_sync_provider.cc File content/child/background_sync/background_sync_provider.cc (right): https://codereview.chromium.org/1197853005/diff/160001/content/child/background_sync/background_sync_provider.cc#newcode257 content/child/background_sync/background_sync_provider.cc:257: void BackgroundSyncProvider::GetPermissionStatusCallback( On 2015/07/08 15:55:09, ...
5 years, 5 months ago (2015-07-08 22:31:52 UTC) #31
mlamouri (slow - plz ping)
still lgtm. Note that you will need to rebase your CL because the files have ...
5 years, 5 months ago (2015-07-08 22:55:21 UTC) #32
keenanb
On 2015/07/08 22:55:21, Mounir Lamouri wrote: > still lgtm. > > Note that you will ...
5 years, 5 months ago (2015-07-09 00:50:51 UTC) #33
keenanb
tsepez, i made a tiny change to content/public/common/permission_status.mojom. could you take a look? asvitkine, could ...
5 years, 5 months ago (2015-07-09 17:35:26 UTC) #35
Alexei Svitkine (slow)
https://codereview.chromium.org/1197853005/diff/200001/chrome/browser/permissions/permission_context_uma_util.cc File chrome/browser/permissions/permission_context_uma_util.cc (right): https://codereview.chromium.org/1197853005/diff/200001/chrome/browser/permissions/permission_context_uma_util.cc#newcode226 chrome/browser/permissions/permission_context_uma_util.cc:226: "Permissions.Requested.CrossOrigin_" + PermissionTypeToString(type), This is not correct. The macros ...
5 years, 5 months ago (2015-07-09 17:42:03 UTC) #36
felt
https://codereview.chromium.org/1197853005/diff/200001/chrome/browser/permissions/permission_context_uma_util.cc File chrome/browser/permissions/permission_context_uma_util.cc (right): https://codereview.chromium.org/1197853005/diff/200001/chrome/browser/permissions/permission_context_uma_util.cc#newcode226 chrome/browser/permissions/permission_context_uma_util.cc:226: "Permissions.Requested.CrossOrigin_" + PermissionTypeToString(type), On 2015/07/09 17:42:03, Alexei Svitkine wrote: ...
5 years, 5 months ago (2015-07-09 17:45:25 UTC) #37
keenanb
https://codereview.chromium.org/1197853005/diff/200001/chrome/browser/permissions/permission_context_uma_util.cc File chrome/browser/permissions/permission_context_uma_util.cc (right): https://codereview.chromium.org/1197853005/diff/200001/chrome/browser/permissions/permission_context_uma_util.cc#newcode226 chrome/browser/permissions/permission_context_uma_util.cc:226: "Permissions.Requested.CrossOrigin_" + PermissionTypeToString(type), On 2015/07/09 17:42:03, Alexei Svitkine wrote: ...
5 years, 5 months ago (2015-07-09 19:33:50 UTC) #38
Alexei Svitkine (slow)
https://codereview.chromium.org/1197853005/diff/200001/chrome/browser/permissions/permission_context_uma_util.cc File chrome/browser/permissions/permission_context_uma_util.cc (right): https://codereview.chromium.org/1197853005/diff/200001/chrome/browser/permissions/permission_context_uma_util.cc#newcode226 chrome/browser/permissions/permission_context_uma_util.cc:226: "Permissions.Requested.CrossOrigin_" + PermissionTypeToString(type), On 2015/07/09 19:33:50, keenanb wrote: > ...
5 years, 5 months ago (2015-07-09 19:51:03 UTC) #39
keenanb
On 2015/07/09 19:51:03, Alexei Svitkine wrote: > https://codereview.chromium.org/1197853005/diff/200001/chrome/browser/permissions/permission_context_uma_util.cc > File chrome/browser/permissions/permission_context_uma_util.cc (right): > > https://codereview.chromium.org/1197853005/diff/200001/chrome/browser/permissions/permission_context_uma_util.cc#newcode226 ...
5 years, 5 months ago (2015-07-09 20:27:12 UTC) #40
Alexei Svitkine (slow)
lgtm
5 years, 5 months ago (2015-07-09 20:55:34 UTC) #41
palmer
LGTM.
5 years, 5 months ago (2015-07-09 22:08:05 UTC) #43
Charlie Reis
content/ LGTM
5 years, 5 months ago (2015-07-09 22:23:27 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1197853005/220001
5 years, 5 months ago (2015-07-09 22:29:09 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/77652)
5 years, 5 months ago (2015-07-09 22:43:48 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1197853005/220001
5 years, 5 months ago (2015-07-09 22:46:13 UTC) #52
jww
On 2015/07/09 22:46:13, commit-bot: I haz the power wrote: > CQ is trying da patch. ...
5 years, 5 months ago (2015-07-09 23:02:42 UTC) #53
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/76812) (exceeded global retry quota)
5 years, 5 months ago (2015-07-09 23:15:01 UTC) #55
jww
https://codereview.chromium.org/1197853005/diff/240001/chrome/browser/permissions/permission_context_uma_util.cc File chrome/browser/permissions/permission_context_uma_util.cc (right): https://codereview.chromium.org/1197853005/diff/240001/chrome/browser/permissions/permission_context_uma_util.cc#newcode224 chrome/browser/permissions/permission_context_uma_util.cc:224: if (manager) { nit: Change this to if (!manager) ...
5 years, 5 months ago (2015-07-10 18:28:34 UTC) #56
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1197853005/280001
5 years, 5 months ago (2015-07-10 20:40:32 UTC) #59
commit-bot: I haz the power
Committed patchset #15 (id:280001)
5 years, 5 months ago (2015-07-10 21:53:32 UTC) #60
commit-bot: I haz the power
5 years, 5 months ago (2015-07-10 21:54:35 UTC) #61
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/edebda0b1b4feb0cc6f3d4a665a58efcc9f42d22
Cr-Commit-Position: refs/heads/master@{#338373}

Powered by Google App Engine
This is Rietveld 408576698