|
|
Created:
4 years, 5 months ago by stefanocs Modified:
4 years, 5 months ago CC:
chromium-reviews, mlamouri+watch-permissions_chromium.org, grt+watch_chromium.org, chrome-apps-syd-reviews_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@add-source-ui-to-permission-report Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionAdd user gesture field to permission report
If |user_gesture| is true, PermissionReport::AFTER_GESTURE will be added in request trigger field to the permission report.
Adding the value of user_gesture from permission layer will be done in another cl.
BUG=613883
Committed: https://crrev.com/34ec372fbc7ea5ebd7b5db1f3270471cf82cf8f6
Cr-Commit-Position: refs/heads/master@{#406779}
Patch Set 1 #Patch Set 2 #Patch Set 3 #Patch Set 4 #
Total comments: 8
Patch Set 5 : Add user gesture mark #
Total comments: 2
Patch Set 6 : Change comment on SendReport + add test request trigger #Patch Set 7 : rebase #Patch Set 8 : merge #Patch Set 9 : fix test #Patch Set 10 : merge #Patch Set 11 : nit #
Depends on Patchset: Dependent Patchsets: Messages
Total messages: 54 (40 generated)
Description was changed from ========== Add user gesture field to permission reporting If user_gesture is true, PermissionReport::AFTER_GESTURE will be attached to the permission report. Getting the value of user_gesture will be done in another cl. BUG=613883 ========== to ========== Add user gesture field to permission report If |user_gesture| is true, PermissionReport::AFTER_GESTURE will be added in request trigger field to the permission report. Adding the value of user_gesture from permission layer will be done in another cl. BUG=613883 ==========
The CQ bit was checked by stefanocs@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
stefanocs@google.com changed reviewers: + kcarattini@chromium.org, raymes@chromium.org
https://codereview.chromium.org/2153763002/diff/60001/chrome/browser/permissi... File chrome/browser/permissions/permission_uma_util.cc (right): https://codereview.chromium.org/2153763002/diff/60001/chrome/browser/permissi... chrome/browser/permissions/permission_uma_util.cc:346: source_ui, false); Rather than using a bool, it's probably better to define an enum. This serves as documentation of what the argument is for (rather than just true/false). https://codereview.chromium.org/2153763002/diff/60001/chrome/browser/safe_bro... File chrome/browser/safe_browsing/permission_reporter_unittest.cc (right): https://codereview.chromium.org/2153763002/diff/60001/chrome/browser/safe_bro... chrome/browser/safe_browsing/permission_reporter_unittest.cc:122: permission_report.request_trigger(0))); Can we check that the number of these is 0? Is it necessary to cast this value?
https://codereview.chromium.org/2153763002/diff/60001/chrome/browser/permissi... File chrome/browser/permissions/permission_uma_util.cc (right): https://codereview.chromium.org/2153763002/diff/60001/chrome/browser/permissi... chrome/browser/permissions/permission_uma_util.cc:346: source_ui, false); On 2016/07/18 00:31:25, raymes wrote: > Rather than using a bool, it's probably better to define an enum. This serves as > documentation of what the argument is for (rather than just true/false). I see most of the other code just uses a bool for this, so I'm ok sticking with a bool. But we need to include inline comments denoting what the argument is. e.g. in this case, it would be: , false /* user_gesture */);
Thanks! https://codereview.chromium.org/2153763002/diff/60001/chrome/browser/permissi... File chrome/browser/permissions/permission_uma_util.cc (right): https://codereview.chromium.org/2153763002/diff/60001/chrome/browser/permissi... chrome/browser/permissions/permission_uma_util.cc:346: source_ui, false); On 2016/07/18 00:31:25, raymes wrote: > Rather than using a bool, it's probably better to define an enum. This serves as > documentation of what the argument is for (rather than just true/false). Done. I was planning on doing this before but I wasn't clear whether to use vector<RequestTrigger> or just RequestTrigger and since most of the code in permission layer uses bool, I wasn't sure where we going to convert it into a request trigger. So I decided to stick with this first. https://codereview.chromium.org/2153763002/diff/60001/chrome/browser/safe_bro... File chrome/browser/safe_browsing/permission_reporter_unittest.cc (right): https://codereview.chromium.org/2153763002/diff/60001/chrome/browser/safe_bro... chrome/browser/safe_browsing/permission_reporter_unittest.cc:122: permission_report.request_trigger(0))); On 2016/07/18 00:31:25, raymes wrote: > Can we check that the number of these is 0? > > Is it necessary to cast this value? Do you mean check the size of request trigger == 1? permission_report.request_trigger(0) returns an int, should I check for the int value instead?
https://codereview.chromium.org/2153763002/diff/60001/chrome/browser/safe_bro... File chrome/browser/safe_browsing/permission_reporter_unittest.cc (right): https://codereview.chromium.org/2153763002/diff/60001/chrome/browser/safe_bro... chrome/browser/safe_browsing/permission_reporter_unittest.cc:122: permission_report.request_trigger(0))); On 2016/07/18 00:48:07, stefanocs wrote: > On 2016/07/18 00:31:25, raymes wrote: > > Can we check that the number of these is 0? > > > > Is it necessary to cast this value? > > Do you mean check the size of request trigger == 1? Yes, you should check this as well. > > permission_report.request_trigger(0) returns an int, should I check for the int > value instead? https://codereview.chromium.org/2153763002/diff/80001/chrome/browser/safe_bro... File chrome/browser/safe_browsing/permission_reporter.h (right): https://codereview.chromium.org/2153763002/diff/80001/chrome/browser/safe_bro... chrome/browser/safe_browsing/permission_reporter.h:34: // requested, |action| as the action taken, and request trigger when "... and |user_gesture| in the list of request triggers if the action occurred after a user gesture." Or something like that.
https://codereview.chromium.org/2153763002/diff/60001/chrome/browser/safe_bro... File chrome/browser/safe_browsing/permission_reporter_unittest.cc (right): https://codereview.chromium.org/2153763002/diff/60001/chrome/browser/safe_bro... chrome/browser/safe_browsing/permission_reporter_unittest.cc:122: permission_report.request_trigger(0))); On 2016/07/18 01:00:04, kcarattini wrote: > On 2016/07/18 00:48:07, stefanocs wrote: > > On 2016/07/18 00:31:25, raymes wrote: > > > Can we check that the number of these is 0? > > > > > > Is it necessary to cast this value? > > > > Do you mean check the size of request trigger == 1? > > Yes, you should check this as well. > > > > permission_report.request_trigger(0) returns an int, should I check for the > int > > value instead? > Done. https://codereview.chromium.org/2153763002/diff/80001/chrome/browser/safe_bro... File chrome/browser/safe_browsing/permission_reporter.h (right): https://codereview.chromium.org/2153763002/diff/80001/chrome/browser/safe_bro... chrome/browser/safe_browsing/permission_reporter.h:34: // requested, |action| as the action taken, and request trigger when On 2016/07/18 01:00:04, kcarattini wrote: > "... and |user_gesture| in the list of request triggers if the action occurred > after a user gesture." > > Or something like that. Done.
lgtm https://codereview.chromium.org/2153763002/diff/60001/chrome/browser/safe_bro... File chrome/browser/safe_browsing/permission_reporter_unittest.cc (right): https://codereview.chromium.org/2153763002/diff/60001/chrome/browser/safe_bro... chrome/browser/safe_browsing/permission_reporter_unittest.cc:122: permission_report.request_trigger(0))); Sorry, yes I said 0 but I meant 1 :)
lgtm
stefanocs@google.com changed reviewers: + nparker@chromium.org
stefanocs@google.com changed reviewers: + nparker@chromium.org
Nathan, please review changes in chrome/browser/safe_browsing/ Thanks
Nathan, please review changes in chrome/browser/safe_browsing/ Thanks
lgtm
The CQ bit was checked by stefanocs@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-device-gn on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-gn/bui...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) ios-simulator-gn on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-gn/...)
The CQ bit was checked by stefanocs@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) ios-simulator-gn on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-gn/...)
The CQ bit was checked by stefanocs@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by stefanocs@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by stefanocs@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clan...)
The CQ bit was checked by stefanocs@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by stefanocs@google.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by stefanocs@google.com
The patchset sent to the CQ was uploaded after l-g-t-m from kcarattini@chromium.org, raymes@chromium.org, nparker@chromium.org Link to the patchset: https://codereview.chromium.org/2153763002/#ps200001 (title: "nit")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Add user gesture field to permission report If |user_gesture| is true, PermissionReport::AFTER_GESTURE will be added in request trigger field to the permission report. Adding the value of user_gesture from permission layer will be done in another cl. BUG=613883 ========== to ========== Add user gesture field to permission report If |user_gesture| is true, PermissionReport::AFTER_GESTURE will be added in request trigger field to the permission report. Adding the value of user_gesture from permission layer will be done in another cl. BUG=613883 ==========
Message was sent while issue was closed.
Committed patchset #11 (id:200001)
Message was sent while issue was closed.
Description was changed from ========== Add user gesture field to permission report If |user_gesture| is true, PermissionReport::AFTER_GESTURE will be added in request trigger field to the permission report. Adding the value of user_gesture from permission layer will be done in another cl. BUG=613883 ========== to ========== Add user gesture field to permission report If |user_gesture| is true, PermissionReport::AFTER_GESTURE will be added in request trigger field to the permission report. Adding the value of user_gesture from permission layer will be done in another cl. BUG=613883 Committed: https://crrev.com/34ec372fbc7ea5ebd7b5db1f3270471cf82cf8f6 Cr-Commit-Position: refs/heads/master@{#406779} ==========
Message was sent while issue was closed.
Patchset 11 (id:??) landed as https://crrev.com/34ec372fbc7ea5ebd7b5db1f3270471cf82cf8f6 Cr-Commit-Position: refs/heads/master@{#406779} |