Commit 85205e83 authored by Maksim Ivanov's avatar Maksim Ivanov Committed by Chromium LUCI CQ

Fix use-after-move in //c/b/chromeos/usb/

Fix use-after-move (potential) bugs found by the
"bugprone-use-after-move" clang-tidy check.

Bug: 1122844
Change-Id: I7bde24a2f8e6d12603b92020da1b5410d3cf8457
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2555066
Commit-Queue: Nicholas Verne <nverne@chromium.org>
Auto-Submit: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: default avatarNicholas Verne <nverne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#832066}
parent 3121cd37
......@@ -539,11 +539,11 @@ void CrosUsbDetector::OnDeviceAdded(device::mojom::UsbDeviceInfoPtr device) {
void CrosUsbDetector::OnDeviceAdded(device::mojom::UsbDeviceInfoPtr device_info,
bool hide_notification) {
std::string guid = device_info->guid;
device_manager_->CheckAccess(
device_info->guid,
base::BindOnce(&CrosUsbDetector::OnDeviceChecked,
weak_ptr_factory_.GetWeakPtr(), std::move(device_info),
hide_notification));
guid, base::BindOnce(&CrosUsbDetector::OnDeviceChecked,
weak_ptr_factory_.GetWeakPtr(),
std::move(device_info), hide_notification));
}
void CrosUsbDetector::OnDeviceRemoved(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment