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

Unified Diff: chrome/browser/safe_browsing/ui_manager.h

Issue 2150903002: Reland add hooks to permission layer for permission action reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nits 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
« no previous file with comments | « chrome/browser/safe_browsing/ping_manager.cc ('k') | chrome/browser/safe_browsing/ui_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/ui_manager.h
diff --git a/chrome/browser/safe_browsing/ui_manager.h b/chrome/browser/safe_browsing/ui_manager.h
index b9b7e528776c46bf77029701458c9f1ddb226a3b..4b39b6543217b87e2c6c0347899701cb6f584c90 100644
--- a/chrome/browser/safe_browsing/ui_manager.h
+++ b/chrome/browser/safe_browsing/ui_manager.h
@@ -16,9 +16,11 @@
#include "base/memory/ref_counted.h"
#include "base/observer_list.h"
#include "base/time/time.h"
+#include "chrome/browser/permissions/permission_uma_util.h"
#include "components/safe_browsing_db/hit_report.h"
#include "components/safe_browsing_db/util.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/permission_type.h"
#include "url/gurl.h"
namespace base {
@@ -148,6 +150,12 @@ class SafeBrowsingUIManager
void ReportInvalidCertificateChain(const std::string& serialized_report,
const base::Closure& callback);
+ // Report permission action to SafeBrowsing servers. Can only be called on UI
+ // thread.
+ void ReportPermissionAction(const GURL& origin,
+ content::PermissionType permission,
+ PermissionAction action);
+
// Add and remove observers. These methods must be invoked on the UI thread.
void AddObserver(Observer* observer);
void RemoveObserver(Observer* remove);
@@ -168,6 +176,11 @@ class SafeBrowsingUIManager
void ReportInvalidCertificateChainOnIOThread(
const std::string& serialized_report);
+ // Report permission action to SafeBrowsing servers.
+ void ReportPermissionActionOnIOThread(const GURL& origin,
+ content::PermissionType permission,
+ PermissionAction action);
+
// Updates the whitelist state. Called on the UI thread.
void AddToWhitelist(const UnsafeResource& resource);
« no previous file with comments | « chrome/browser/safe_browsing/ping_manager.cc ('k') | chrome/browser/safe_browsing/ui_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698