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

Unified Diff: content/shell/browser/shell_permission_manager.cc

Issue 2908133003: Split GetPermissionStatus into GetPermissionStatusForFrame/Worker
Patch Set: Split GetPermissionStatus into GetPermissionStatusForFrame/Worker Created 3 years, 7 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: content/shell/browser/shell_permission_manager.cc
diff --git a/content/shell/browser/shell_permission_manager.cc b/content/shell/browser/shell_permission_manager.cc
index aed1bd334b777ffb7dc2f81fa13780178ff31bfe..94707d378270ee6665877a0c7f802aeb86f6372f 100644
--- a/content/shell/browser/shell_permission_manager.cc
+++ b/content/shell/browser/shell_permission_manager.cc
@@ -66,10 +66,11 @@ void ShellPermissionManager::ResetPermission(
const GURL& embedding_origin) {
}
-blink::mojom::PermissionStatus ShellPermissionManager::GetPermissionStatus(
+blink::mojom::PermissionStatus
+ShellPermissionManager::GetPermissionStatusForFrame(
benwells 2017/05/31 01:48:10 Nit: This would be clearer if there was a private
raymes 2017/06/01 02:54:40 Done.
PermissionType permission,
- const GURL& requesting_origin,
- const GURL& embedding_origin) {
+ content::RenderFrameHost* render_frame_host,
+ const GURL& requesting_origin) {
// Background sync browser tests require permission to be granted by default.
// TODO(nsatragno): add a command line flag so that it's only granted for
// tests.
@@ -86,6 +87,14 @@ blink::mojom::PermissionStatus ShellPermissionManager::GetPermissionStatus(
return blink::mojom::PermissionStatus::DENIED;
}
+blink::mojom::PermissionStatus
+ShellPermissionManager::GetPermissionStatusForWorker(
+ PermissionType permission,
+ const GURL& requesting_origin) {
+ return GetPermissionStatusForFrame(permission, /*render_frame_host=*/nullptr,
benwells 2017/05/30 06:49:13 nit: is this a typical way of commenting nullptrs?
benwells 2017/05/31 01:48:10 (thanks for explaining offline)
+ requesting_origin);
+}
+
int ShellPermissionManager::SubscribePermissionStatusChange(
PermissionType permission,
const GURL& requesting_origin,

Powered by Google App Engine
This is Rietveld 408576698