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

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

Issue 2069343002: Pass profile to PermissionUmaUtil::PermissionIgnored (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-hooks-to-permission-layer
Patch Set: Rebase Created 4 years, 5 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
Index: chrome/browser/permissions/permission_infobar_delegate.cc
diff --git a/chrome/browser/permissions/permission_infobar_delegate.cc b/chrome/browser/permissions/permission_infobar_delegate.cc
index 32cea3dd03ae9269fc25e2c1f49e6292b3e0567d..5300e7e4c28de326a9bdfb966f6fd9122fc20e04 100644
--- a/chrome/browser/permissions/permission_infobar_delegate.cc
+++ b/chrome/browser/permissions/permission_infobar_delegate.cc
@@ -12,20 +12,21 @@
PermissionInfobarDelegate::~PermissionInfobarDelegate() {
if (!action_taken_)
- // TODO(stefanocs): Pass in a non null profile.
PermissionUmaUtil::PermissionIgnored(permission_type_, requesting_origin_,
- nullptr);
+ profile_);
}
PermissionInfobarDelegate::PermissionInfobarDelegate(
const GURL& requesting_origin,
content::PermissionType permission_type,
ContentSettingsType content_settings_type,
+ Profile* profile,
const base::Callback<void(bool, bool)>& callback)
: requesting_origin_(requesting_origin),
action_taken_(false),
permission_type_(permission_type),
content_settings_type_(content_settings_type),
+ profile_(profile),
callback_(callback) {}
base::string16 PermissionInfobarDelegate::GetMessageText() const {

Powered by Google App Engine
This is Rietveld 408576698