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

Unified Diff: chrome/browser/permissions/permission_context_base.cc

Issue 2709213004: Make the PermissionDecisionAutoBlocker API consistent. (Closed)
Patch Set: Rebase Created 3 years, 10 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: chrome/browser/permissions/permission_context_base.cc
diff --git a/chrome/browser/permissions/permission_context_base.cc b/chrome/browser/permissions/permission_context_base.cc
index de0630514bc2d7a307c30e0e1f34c10dabfe81af..006faa076a6d114e8722518daf7fbb1b362d75f9 100644
--- a/chrome/browser/permissions/permission_context_base.cc
+++ b/chrome/browser/permissions/permission_context_base.cc
@@ -119,11 +119,13 @@ void PermissionContextBase::RequestPermission(
// Asynchronously check whether the origin should be blocked from making this
// permission request, e.g. it may be on the Safe Browsing API blacklist.
- PermissionDecisionAutoBlocker::GetForProfile(profile_)->UpdateEmbargoedStatus(
- content_settings_type_, requesting_origin, web_contents,
- base::Bind(&PermissionContextBase::ContinueRequestPermission,
- weak_factory_.GetWeakPtr(), web_contents, id,
- requesting_origin, embedding_origin, user_gesture, callback));
+ PermissionDecisionAutoBlocker::GetForProfile(profile_)
+ ->CheckSafeBrowsingBlacklist(
+ web_contents, requesting_origin, content_settings_type_,
+ base::Bind(&PermissionContextBase::ContinueRequestPermission,
+ weak_factory_.GetWeakPtr(), web_contents, id,
+ requesting_origin, embedding_origin, user_gesture,
+ callback));
}
void PermissionContextBase::ContinueRequestPermission(
@@ -182,7 +184,7 @@ PermissionResult PermissionContextBase::GetPermissionStatus(
if (content_setting == CONTENT_SETTING_ASK) {
PermissionResult result =
PermissionDecisionAutoBlocker::GetForProfile(profile_)
- ->GetEmbargoResult(content_settings_type_, requesting_origin);
+ ->GetEmbargoResult(requesting_origin, content_settings_type_);
DCHECK(result.content_setting == CONTENT_SETTING_ASK ||
result.content_setting == CONTENT_SETTING_BLOCK);
return result;

Powered by Google App Engine
This is Rietveld 408576698