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

Unified Diff: chrome/browser/permissions/permission_uma_util.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: Rebase 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 | « chrome/browser/permissions/permission_request_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/permissions/permission_uma_util.cc
diff --git a/chrome/browser/permissions/permission_uma_util.cc b/chrome/browser/permissions/permission_uma_util.cc
index 45dac64b0977455d4b571a42b99b6083df98f4d0..7a92ef93a1ec2968d32f475bca3934abdd16d174 100644
--- a/chrome/browser/permissions/permission_uma_util.cc
+++ b/chrome/browser/permissions/permission_uma_util.cc
@@ -327,6 +327,12 @@ void PermissionUmaUtil::PermissionIgnored(
permission, kPermissionsPromptIgnoredPriorIgnoreCountPrefix,
PermissionDecisionAutoBlocker::GetIgnoreCount(requesting_origin,
permission, profile));
+
+ // RecordPermission* methods need to be called before RecordIgnore in the
+ // blocker because they record the number of prior ignore and dismiss values,
+ // and we don't want to include the current ignore.
+ PermissionDecisionAutoBlocker(profile).RecordIgnore(requesting_origin,
+ permission);
}
void PermissionUmaUtil::PermissionRevoked(PermissionType permission,
« no previous file with comments | « chrome/browser/permissions/permission_request_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698