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

Unified Diff: device/usb/mojo/device_manager_impl.cc

Issue 2266153002: Modify UsbDeviceFilter::MatchesAny to return true for empty filters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed code for unit test Created 4 years, 4 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 | device/usb/usb_device_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/mojo/device_manager_impl.cc
diff --git a/device/usb/mojo/device_manager_impl.cc b/device/usb/mojo/device_manager_impl.cc
index 0b71c390922cb9791e367c8d1cdcf05488313c60..1f6625db8c0fb980feefaf51880c3fc3038689a2 100644
--- a/device/usb/mojo/device_manager_impl.cc
+++ b/device/usb/mojo/device_manager_impl.cc
@@ -91,7 +91,7 @@ void DeviceManagerImpl::OnGetDevices(
std::vector<DeviceInfoPtr> device_infos;
for (const auto& device : devices) {
- if (filters.empty() || UsbDeviceFilter::MatchesAny(device, filters)) {
+ if (UsbDeviceFilter::MatchesAny(device, filters)) {
if (permission_provider_ &&
permission_provider_->HasDevicePermission(device)) {
device_infos.push_back(DeviceInfo::From(*device));
« no previous file with comments | « no previous file | device/usb/usb_device_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698