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

Unified Diff: chrome/browser/permissions/permission_request_impl.cc

Issue 2267353002: Permission Metrics: Switch the order of RecordIgnore and PermissionIgnored (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/permissions/permission_request_impl.cc
diff --git a/chrome/browser/permissions/permission_request_impl.cc b/chrome/browser/permissions/permission_request_impl.cc
index feb02d3af6353ba849f244936d76bc8f6602fbd6..ccddd4082cd02e8f2daa3e0b1cd250dd816a3500 100644
--- a/chrome/browser/permissions/permission_request_impl.cc
+++ b/chrome/browser/permissions/permission_request_impl.cc
@@ -33,11 +33,14 @@ PermissionRequestImpl::PermissionRequestImpl(
PermissionRequestImpl::~PermissionRequestImpl() {
DCHECK(is_finished_);
if (!action_taken_) {
- PermissionDecisionAutoBlocker(profile_).RecordIgnore(request_origin_,
- permission_type_);
-
+ // PermissionIgnored needs to be called before RecordIgnore in the blocker
+ // because it gets the number of prior ignore and dismiss values from the
+ // blocker and we don't want to include the current ignore.
PermissionUmaUtil::PermissionIgnored(permission_type_, GetGestureType(),
request_origin_, profile_);
+
+ PermissionDecisionAutoBlocker(profile_).RecordIgnore(request_origin_,
+ permission_type_);
raymes 2016/08/23 06:01:48 Could we instead move this into PermissionUmaUtil:
kcarattini 2016/08/23 07:19:50 Done. I like this, but I don't like that of symmet
raymes 2016/08/23 08:14:58 Were you thinking we should record the dismiss in
kcarattini 2016/08/23 10:00:58 Yes, that's what I meant :).
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698