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

Unified Diff: chrome/browser/permissions/permission_prompt_decision_log.h

Issue 2184823007: Add a feature which, when enabled, blocks permissions after X prompt dismissals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary PermissionUtil changes 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_prompt_decision_log.h
diff --git a/chrome/browser/permissions/permission_prompt_decision_log.h b/chrome/browser/permissions/permission_prompt_decision_log.h
new file mode 100644
index 0000000000000000000000000000000000000000..d450d9d089f8bd180c1c253139abeb64b3d17e6a
--- /dev/null
+++ b/chrome/browser/permissions/permission_prompt_decision_log.h
@@ -0,0 +1,29 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_PROMPT_DECISION_LOG_H_
+#define CHROME_BROWSER_PERMISSIONS_PERMISSION_PROMPT_DECISION_LOG_H_
+
+#include "base/macros.h"
+#include "content/public/browser/permission_type.h"
+#include "url/gurl.h"
+
+class GURL;
+class Profile;
+
+class PermissionPromptDecisionLog {
raymes 2016/08/01 05:09:11 Yeah naming is hard! Maybe PermissionPromptDismiss
dominickn 2016/08/03 05:38:46 I didn't want to call it "Dismissal" in case we wa
+ public:
+ PermissionPromptDecisionLog();
+ bool ShouldChangeDismissalToBlock(Profile* profile,
+ const GURL& url,
+ content::PermissionType permission);
+
+ private:
+ void UpdateFromVariations();
+
+ int prompt_dismissals_before_block_;
+};
+
+
raymes 2016/08/01 05:09:11 nit: no newline
dominickn 2016/08/03 05:38:46 Done.
+#endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_PROMPT_DECISION_LOG_H_

Powered by Google App Engine
This is Rietveld 408576698