Chromium Code Reviews| 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..de0e1272a4ff8a905fa81ae6c897220c55fd59fc 100644 |
| --- a/chrome/browser/permissions/permission_context_base.h |
| +++ b/chrome/browser/permissions/permission_context_base.h |
| @@ -12,9 +12,11 @@ |
| #include "base/memory/weak_ptr.h" |
| #include "build/build_config.h" |
| #include "chrome/browser/permissions/permission_request.h" |
| +#include "chrome/browser/safe_browsing/safe_browsing_service.h" |
|
dominickn
2016/12/07 04:34:29
Nit: I don't think you need this include in this f
meredithl
2016/12/07 06:37:11
Done.
|
| #include "components/content_settings/core/common/content_settings.h" |
| #include "components/content_settings/core/common/content_settings_types.h" |
| #include "components/keyed_service/core/keyed_service.h" |
| +#include "components/safe_browsing_db/database_manager.h" |
| #include "content/public/browser/permission_type.h" |
| #if defined(OS_ANDROID) |
| @@ -80,6 +82,18 @@ class PermissionContextBase : public KeyedService { |
| bool user_gesture, |
| const BrowserPermissionCallback& callback); |
| + // The requesting origin and permission have been checked by Safe Browsing |
|
dominickn
2016/12/07 04:34:29
Nit: update the first sentence of this comment to
meredithl
2016/12/07 06:37:11
Done.
|
| + // The result 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 result); |
|
dominickn
2016/12/07 04:34:29
Nit: "result" is a little vague. Perhaps change it
meredithl
2016/12/07 06:37:11
Done.
|
| + |
| // Returns whether the permission has been granted, denied... |
| virtual ContentSetting GetPermissionStatus( |
| const GURL& requesting_origin, |
| @@ -155,6 +169,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; |