| Index: chrome/browser/permissions/permission_context_base.h
|
| diff --git a/chrome/browser/permissions/permission_context_base.h b/chrome/browser/permissions/permission_context_base.h
|
| index f556165e1334adbf2f4f866fe7c3528a137b98cc..236046b82aed6caf5a76f9ec0f00ac4fe8ceb917 100644
|
| --- a/chrome/browser/permissions/permission_context_base.h
|
| +++ b/chrome/browser/permissions/permission_context_base.h
|
| @@ -28,6 +28,10 @@ namespace content {
|
| class WebContents;
|
| }
|
|
|
| +namespace safe_browsing {
|
| +class SafeBrowsingDatabaseManager;
|
| +}
|
| +
|
| using BrowserPermissionCallback = base::Callback<void(ContentSetting)>;
|
|
|
| // This base class contains common operations for granting permissions.
|
| @@ -80,7 +84,21 @@ class PermissionContextBase : public KeyedService {
|
| bool user_gesture,
|
| const BrowserPermissionCallback& callback);
|
|
|
| - // Returns whether the permission has been granted, denied...
|
| + // Called when the requesting origin and permission have been checked by Safe
|
| + // Browsing. |permission_blocked| determines whether to auto-block the
|
| + // permission request without prompting the user for a decision.
|
| + void CheckPermissionsBlacklistResult(
|
| + content::WebContents* web_contents,
|
| + const PermissionRequestID& id,
|
| + const GURL& requesting_origin,
|
| + const GURL& embedding_origin,
|
| + bool user_gesture,
|
| + const BrowserPermissionCallback& callback,
|
| + bool permission_blocked);
|
| +
|
| + // Returns whether the permission has been granted, denied etc. This method
|
| + // does not take into account the Safe Browsing blacklist, as it is executed
|
| + // synchronously.
|
| virtual ContentSetting GetPermissionStatus(
|
| const GURL& requesting_origin,
|
| const GURL& embedding_origin) const;
|
| @@ -155,6 +173,10 @@ class PermissionContextBase : public KeyedService {
|
| return content_settings_type_;
|
| }
|
|
|
| + // Virtual to allow for mocking in tests.
|
| + virtual scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager>
|
| + GetSafeBrowsingDatabaseManager();
|
| +
|
| private:
|
| friend class PermissionContextBaseTests;
|
|
|
|
|