Index: chrome/browser/usb/web_usb_permission_provider.cc |
diff --git a/chrome/browser/usb/web_usb_permission_provider.cc b/chrome/browser/usb/web_usb_permission_provider.cc |
index fe270111cb401d4df78ada9c3b5a974a7e1b21e8..7645ed362816d95c204377dd9d73ca082422bb9f 100644 |
--- a/chrome/browser/usb/web_usb_permission_provider.cc |
+++ b/chrome/browser/usb/web_usb_permission_provider.cc |
@@ -10,6 +10,7 @@ |
#include "base/command_line.h" |
#include "base/stl_util.h" |
#include "chrome/browser/profiles/profile.h" |
+#include "chrome/browser/usb/usb_blocklist.h" |
#include "chrome/browser/usb/usb_chooser_context.h" |
#include "chrome/browser/usb/usb_chooser_context_factory.h" |
#include "chrome/browser/usb/usb_tab_helper.h" |
@@ -59,6 +60,10 @@ bool WebUSBPermissionProvider::HasDevicePermission( |
content::RenderFrameHost* render_frame_host, |
scoped_refptr<const device::UsbDevice> device) { |
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
+ |
+ if (UsbBlocklist::Get().IsExcluded(device)) |
+ return false; |
+ |
WebContents* web_contents = |
WebContents::FromRenderFrameHost(render_frame_host); |
GURL embedding_origin = |