From f4c37e57cc75fbc46faef7f1333c4fa21e4882e8 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 21 Nov 2022 11:32:54 -0500 Subject: [PATCH] chore: removed unneeded code --- shell/browser/usb/usb_chooser_context.cc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/shell/browser/usb/usb_chooser_context.cc b/shell/browser/usb/usb_chooser_context.cc index c7204dba2f218..79f101d8c0ce0 100644 --- a/shell/browser/usb/usb_chooser_context.cc +++ b/shell/browser/usb/usb_chooser_context.cc @@ -333,11 +333,8 @@ void UsbChooserContext::OnDeviceRemoved( !device_info->serial_number.value().empty()) { return; } - - std::vector revoked_urls; for (auto& map_entry : ephemeral_devices_) { - if (map_entry.second.erase(device_info->guid) > 0) - revoked_urls.push_back(map_entry.first); + map_entry.second.erase(device_info->guid); } } @@ -347,10 +344,6 @@ void UsbChooserContext::OnDeviceManagerConnectionError() { devices_.clear(); is_initialized_ = false; - // Store the revoked URLs to notify observers of the revoked permissions. - std::vector revoked_origins; - for (auto& map_entry : ephemeral_devices_) - revoked_origins.push_back(map_entry.first); ephemeral_devices_.clear(); // Notify all device observers.