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

Side by Side Diff: chrome/browser/permissions/permission_infobar_delegate.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, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/permissions/permission_request_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/permissions/permission_infobar_delegate.h" 5 #include "chrome/browser/permissions/permission_infobar_delegate.h"
6 6
7 #include "chrome/browser/permissions/permission_decision_auto_blocker.h" 7 #include "chrome/browser/permissions/permission_decision_auto_blocker.h"
8 #include "chrome/browser/permissions/permission_request.h" 8 #include "chrome/browser/permissions/permission_request.h"
9 #include "chrome/browser/permissions/permission_uma_util.h" 9 #include "chrome/browser/permissions/permission_uma_util.h"
10 #include "chrome/grit/generated_resources.h" 10 #include "chrome/grit/generated_resources.h"
11 #include "components/url_formatter/elide_url.h" 11 #include "components/url_formatter/elide_url.h"
12 #include "ui/base/l10n/l10n_util.h" 12 #include "ui/base/l10n/l10n_util.h"
13 13
14 PermissionInfoBarDelegate::~PermissionInfoBarDelegate() { 14 PermissionInfoBarDelegate::~PermissionInfoBarDelegate() {
15 if (!action_taken_) { 15 if (!action_taken_) {
16 PermissionUmaUtil::PermissionIgnored( 16 PermissionUmaUtil::PermissionIgnored(
17 permission_type_, 17 permission_type_,
18 user_gesture_ ? PermissionRequestGestureType::GESTURE 18 user_gesture_ ? PermissionRequestGestureType::GESTURE
19 : PermissionRequestGestureType::NO_GESTURE, 19 : PermissionRequestGestureType::NO_GESTURE,
20 requesting_origin_, profile_); 20 requesting_origin_, profile_);
21
22 PermissionDecisionAutoBlocker(profile_).RecordIgnore(requesting_origin_,
23 permission_type_);
24 } 21 }
25 } 22 }
26 23
27 PermissionInfoBarDelegate::PermissionInfoBarDelegate( 24 PermissionInfoBarDelegate::PermissionInfoBarDelegate(
28 const GURL& requesting_origin, 25 const GURL& requesting_origin,
29 content::PermissionType permission_type, 26 content::PermissionType permission_type,
30 ContentSettingsType content_settings_type, 27 ContentSettingsType content_settings_type,
31 bool user_gesture, 28 bool user_gesture,
32 Profile* profile, 29 Profile* profile,
33 const PermissionSetCallback& callback) 30 const PermissionSetCallback& callback)
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 92
96 SetPermission(update_content_setting, DENIED); 93 SetPermission(update_content_setting, DENIED);
97 return true; 94 return true;
98 } 95 }
99 96
100 void PermissionInfoBarDelegate::SetPermission(bool update_content_setting, 97 void PermissionInfoBarDelegate::SetPermission(bool update_content_setting,
101 PermissionAction decision) { 98 PermissionAction decision) {
102 action_taken_ = true; 99 action_taken_ = true;
103 callback_.Run(update_content_setting, decision); 100 callback_.Run(update_content_setting, decision);
104 } 101 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/permissions/permission_request_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698