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

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

Issue 2675483002: Replace PermissionType in chrome/ with ContentSettingsType (Closed)
Patch Set: rebase + include content_settings_types.h more 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_blacklist_client.cc
diff --git a/chrome/browser/permissions/permission_blacklist_client.cc b/chrome/browser/permissions/permission_blacklist_client.cc
index 4262df65d0d8d71e4fccd7e792408bcbf9ccc9ee..c57000b7103d2f06a89b85974487a167245c7d55 100644
--- a/chrome/browser/permissions/permission_blacklist_client.cc
+++ b/chrome/browser/permissions/permission_blacklist_client.cc
@@ -20,27 +20,28 @@
// static
void PermissionBlacklistClient::CheckSafeBrowsingBlacklist(
scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager> db_manager,
- content::PermissionType permission_type,
+ ContentSettingsType content_settings_type,
const GURL& request_origin,
content::WebContents* web_contents,
int timeout,
base::Callback<void(bool)> callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
- new PermissionBlacklistClient(db_manager, permission_type, request_origin,
- web_contents, timeout, callback);
+ new PermissionBlacklistClient(db_manager, content_settings_type,
+ request_origin, web_contents, timeout,
+ callback);
}
PermissionBlacklistClient::PermissionBlacklistClient(
scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager> db_manager,
- content::PermissionType permission_type,
+ ContentSettingsType content_settings_type,
const GURL& request_origin,
content::WebContents* web_contents,
int timeout,
base::Callback<void(bool)> callback)
: content::WebContentsObserver(web_contents),
db_manager_(db_manager),
- permission_type_(permission_type),
+ content_settings_type_(content_settings_type),
callback_(callback),
timeout_(timeout),
is_active_(true) {
@@ -89,8 +90,8 @@ void PermissionBlacklistClient::OnCheckApiBlacklistUrlResult(
timer_.reset(nullptr);
bool permission_blocked =
metadata.api_permissions.find(
- PermissionUtil::ConvertPermissionTypeToSafeBrowsingName(
- permission_type_)) != metadata.api_permissions.end();
+ PermissionUtil::ConvertContentSettingsTypeToSafeBrowsingName(
+ content_settings_type_)) != metadata.api_permissions.end();
if (permission_blocked)
response = SafeBrowsingResponse::BLACKLISTED;
« no previous file with comments | « chrome/browser/permissions/permission_blacklist_client.h ('k') | chrome/browser/permissions/permission_context_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698