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

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

Issue 2726493002: Add a console message when a permission is embargoed due to repeated dismissals. (Closed)
Patch Set: Created 3 years, 10 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_context_base.cc
diff --git a/chrome/browser/permissions/permission_context_base.cc b/chrome/browser/permissions/permission_context_base.cc
index be0dce6dc03e9f90f0ff4767d28f57d9d72e9c82..46a195754340282e5b3f424a52a5f94104b7742c 100644
--- a/chrome/browser/permissions/permission_context_base.cc
+++ b/chrome/browser/permissions/permission_context_base.cc
@@ -108,6 +108,16 @@ void PermissionContextBase::RequestPermission(
.c_str()));
callback.Run(CONTENT_SETTING_BLOCK);
return;
+ } else if (result.source == PermissionStatusSource::MULTIPLE_DISMISSALS) {
+ web_contents->GetMainFrame()->AddMessageToConsole(
+ content::CONSOLE_MESSAGE_LEVEL_INFO,
+ base::StringPrintf(
+ "%s permission has been blocked as the user has dismissed the "
+ "permission prompt several times. See "
+ "https://www.chromestatus.com/features/6443143280984064 for more "
+ "information.",
+ PermissionUtil::GetPermissionString(content_settings_type_)
+ .c_str()));
raymes 2017/02/28 23:44:38 nit: it would be nice to get some of this logging
dominickn 2017/03/01 02:28:44 Done.
}
// If we are under embargo, record the embargo reason for which we have
« 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