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

Unified Diff: extensions/browser/api/usb/usb_api.cc

Issue 2727633004: Change UsbDeviceFilter to use const references instead of (Closed)
Patch Set: Fix callsite missed earlier due to not building for CrOS Created 3 years, 9 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: extensions/browser/api/usb/usb_api.cc
diff --git a/extensions/browser/api/usb/usb_api.cc b/extensions/browser/api/usb/usb_api.cc
index 9e3bb6bfd1a6db0e93083246a4fd28f00d8293db..c0e279cf8dcb05e12c56a97ff4dc5eaa4216f75c 100644
--- a/extensions/browser/api/usb/usb_api.cc
+++ b/extensions/browser/api/usb/usb_api.cc
@@ -613,7 +613,7 @@ void UsbGetDevicesFunction::OnGetDevicesComplete(
std::unique_ptr<base::ListValue> result(new base::ListValue());
UsbGuidMap* guid_map = UsbGuidMap::Get(browser_context());
for (const scoped_refptr<UsbDevice>& device : devices) {
- if (UsbDeviceFilter::MatchesAny(device, filters_) &&
+ if (UsbDeviceFilter::MatchesAny(*device, filters_) &&
HasDevicePermission(device)) {
Device api_device;
guid_map->GetApiDevice(device, &api_device);

Powered by Google App Engine
This is Rietveld 408576698