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

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

Issue 2640033006: Convert AutoBlocker static class to KeyedService. (Closed)
Patch Set: Git surgery. Created 3 years, 11 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
« no previous file with comments | « chrome/browser/permissions/permission_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/permissions/permission_util.cc
diff --git a/chrome/browser/permissions/permission_util.cc b/chrome/browser/permissions/permission_util.cc
index 0643a0f7fc9c37a247e5ce3d82ab37e6f0a642f3..2e8d5075375871d61b0521cffc961bd89c9bcced 100644
--- a/chrome/browser/permissions/permission_util.cc
+++ b/chrome/browser/permissions/permission_util.cc
@@ -55,6 +55,38 @@ std::string PermissionUtil::GetPermissionString(
return std::string();
}
+std::string PermissionUtil::ConvertPermissionTypeToSafeBrowsingName(
+ const content::PermissionType& permission_type) {
+ switch (permission_type) {
+ case content::PermissionType::GEOLOCATION:
+ return "GEOLOCATION";
+ case content::PermissionType::NOTIFICATIONS:
+ return "NOTIFICATIONS";
+ case content::PermissionType::MIDI_SYSEX:
+ return "MIDI_SYSEX";
+ case content::PermissionType::PUSH_MESSAGING:
+ return "PUSH_MESSAGING";
+ case content::PermissionType::DURABLE_STORAGE:
+ return "DURABLE_STORAGE";
+ case content::PermissionType::PROTECTED_MEDIA_IDENTIFIER:
+ return "PROTECTED_MEDIA_IDENTIFIER";
+ case content::PermissionType::AUDIO_CAPTURE:
+ return "AUDIO_CAPTURE";
+ case content::PermissionType::VIDEO_CAPTURE:
+ return "VIDEO_CAPTURE";
+ case content::PermissionType::MIDI:
+ return "MIDI";
+ case content::PermissionType::BACKGROUND_SYNC:
+ return "BACKGROUND_SYNC";
+ case content::PermissionType::FLASH:
+ return "FLASH";
+ case content::PermissionType::NUM:
+ break;
+ }
+ NOTREACHED();
+ return std::string();
+}
+
PermissionRequestType PermissionUtil::GetRequestType(
content::PermissionType type) {
switch (type) {
« no previous file with comments | « chrome/browser/permissions/permission_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698