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

Unified Diff: extensions/browser/api/hid/hid_device_manager.cc

Issue 518963002: Add whitelisted permission for access to Universal 2nd Factor devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: indates -> indicates Created 6 years, 3 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 | « no previous file | extensions/common/api/_permission_features.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/hid/hid_device_manager.cc
diff --git a/extensions/browser/api/hid/hid_device_manager.cc b/extensions/browser/api/hid/hid_device_manager.cc
index 16dd55565ac70c9723e8e6b60da70ce38e510306..b57e2d91a5fb0e111dd651a3cd30f7caf2f5019f 100644
--- a/extensions/browser/api/hid/hid_device_manager.cc
+++ b/extensions/browser/api/hid/hid_device_manager.cc
@@ -128,6 +128,15 @@ bool HidDeviceManager::HasPermission(const Extension* extension,
return true;
}
+ if (extension->permissions_data()->HasAPIPermission(
+ APIPermission::kU2fDevices)) {
+ HidDeviceFilter u2f_filter;
+ u2f_filter.SetUsagePage(0xF1D0);
+ if (u2f_filter.Matches(device_info)) {
+ return true;
+ }
+ }
+
return false;
}
« no previous file with comments | « no previous file | extensions/common/api/_permission_features.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698