Chromium Code Reviews| 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 d35e6d7b58f09577a68e52610378e63074eeff23..2196ca4319777253cbcf9c4818ecc4f55ddd6ef3 100644 |
| --- a/chrome/browser/permissions/permission_decision_auto_blocker.h |
| +++ b/chrome/browser/permissions/permission_decision_auto_blocker.h |
| @@ -58,8 +58,20 @@ class PermissionDecisionAutoBlocker : public KeyedService { |
| static PermissionDecisionAutoBlocker* GetForProfile(Profile* profile); |
| - // Removes any recorded counts for urls which match |filter|. |
| - void RemoveCountsByUrl(base::Callback<bool(const GURL& url)> filter); |
| + // Updates the threshold to start blocking prompts from the field trial. |
| + static void UpdateFromVariations(); |
| + |
| + // Makes an asynchronous call to Safe Browsing to check the API blacklist. |
|
raymes
2017/02/23 06:09:30
nit: you may also want to note that the result wil
dominickn
2017/02/23 06:14:19
Done.
|
| + void CheckSafeBrowsingBlacklist(content::WebContents* web_contents, |
| + const GURL& request_origin, |
| + ContentSettingsType permission, |
| + base::Callback<void(bool)> callback); |
| + |
| + // 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. |
| + PermissionResult GetEmbargoResult(const GURL& request_origin, |
| + ContentSettingsType permission); |
| // Returns the current number of dismisses recorded for |permission| type at |
| // |url|. |
| @@ -78,21 +90,8 @@ class PermissionDecisionAutoBlocker : public KeyedService { |
| // Records that an ignore of a prompt for |permission| was made. |
| int RecordIgnore(const GURL& url, ContentSettingsType permission); |
| - // Updates the threshold to start blocking prompts from the field trial. |
| - static void UpdateFromVariations(); |
| - |
| - // 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, |
| - base::Callback<void(bool)> callback); |
| - |
| - // 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. |
| - PermissionResult GetEmbargoResult(ContentSettingsType permission, |
| - const GURL& request_origin); |
| + // Removes any recorded counts for urls which match |filter|. |
| + void RemoveCountsByUrl(base::Callback<bool(const GURL& url)> filter); |
| private: |
| friend class PermissionContextBaseTests; |
| @@ -103,13 +102,13 @@ class PermissionDecisionAutoBlocker : public KeyedService { |
| // Get the result of the Safe Browsing check, if |should_be_embargoed| is true |
| // then |request_origin| will be placed under embargo for that |permission|. |
| - void CheckSafeBrowsingResult(ContentSettingsType permission, |
| - const GURL& request_origin, |
| + void CheckSafeBrowsingResult(const GURL& request_origin, |
| + ContentSettingsType permission, |
| base::Callback<void(bool)> callback, |
| bool should_be_embargoed); |
| - void PlaceUnderEmbargo(ContentSettingsType permission, |
| - const GURL& request_origin, |
| + void PlaceUnderEmbargo(const GURL& request_origin, |
| + ContentSettingsType permission, |
| const char* key); |
| void SetSafeBrowsingDatabaseManagerAndTimeoutForTesting( |