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

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

Issue 2701343002: Implement permission embargo suppression metrics. (Closed)
Patch Set: Rebase 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
Index: chrome/browser/permissions/permission_decision_auto_blocker.h
diff --git a/chrome/browser/permissions/permission_decision_auto_blocker.h b/chrome/browser/permissions/permission_decision_auto_blocker.h
index ade0ff052df8a52ade501cf8689448bc3885f36b..d35e6d7b58f09577a68e52610378e63074eeff23 100644
--- a/chrome/browser/permissions/permission_decision_auto_blocker.h
+++ b/chrome/browser/permissions/permission_decision_auto_blocker.h
@@ -10,6 +10,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/singleton.h"
#include "base/time/default_clock.h"
+#include "chrome/browser/permissions/permission_util.h"
#include "components/content_settings/core/common/content_settings_types.h"
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
#include "components/keyed_service/core/keyed_service.h"
@@ -80,10 +81,8 @@ class PermissionDecisionAutoBlocker : public KeyedService {
// Updates the threshold to start blocking prompts from the field trial.
static void UpdateFromVariations();
- // Checks if |request_origin| is under embargo for |permission|. Internally,
- // this will make a call to IsUnderEmbargo to check the content setting first,
- // but may also make a call to Safe Browsing to check the API blacklist, which
- // is performed asynchronously.
+ // Updates whether |request_origin| should be under embargo for |permission|.
+ // Makes an asynchronous call to Safe Browsing to check the API blacklist.
void UpdateEmbargoedStatus(ContentSettingsType permission,
const GURL& request_origin,
content::WebContents* web_contents,
@@ -92,8 +91,8 @@ class PermissionDecisionAutoBlocker : public KeyedService {
// Checks the status of the content setting to determine if |request_origin|
// is under embargo for |permission|. This checks both embargo for Permissions
// Blacklisting and repeated dismissals.
- bool IsUnderEmbargo(ContentSettingsType permission,
- const GURL& request_origin);
+ PermissionResult GetEmbargoResult(ContentSettingsType permission,
+ const GURL& request_origin);
private:
friend class PermissionContextBaseTests;

Powered by Google App Engine
This is Rietveld 408576698