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..d996d771e1a82c7a1151422a1fc4c9ed454c3d8d 100644 |
--- a/chrome/browser/permissions/permission_context_base.h |
+++ b/chrome/browser/permissions/permission_context_base.h |
@@ -15,6 +15,7 @@ |
#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" |
Nathan Parker
2016/12/12 19:02:25
Rather than including the .h, you can should be ab
meredithl
2016/12/15 00:15:45
Done.
|
#include "content/public/browser/permission_type.h" |
#if defined(OS_ANDROID) |
@@ -80,6 +81,18 @@ class PermissionContextBase : public KeyedService { |
bool user_gesture, |
const BrowserPermissionCallback& callback); |
+ // Called when the requesting origin and permission have been checked by Safe |
+ // Browsing. 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 permission_blocked); |
+ |
// Returns whether the permission has been granted, denied... |
virtual ContentSetting GetPermissionStatus( |
const GURL& requesting_origin, |
@@ -155,6 +168,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; |