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

Unified Diff: chrome/browser/usb/usb_chooser_controller.cc

Issue 2821723002: Move classes in the device.usb Mojo namespace to device.mojom (Closed)
Patch Set: mcasas@ nits Created 3 years, 8 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 | « chrome/browser/usb/usb_chooser_controller.h ('k') | chrome/browser/usb/usb_chooser_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/usb/usb_chooser_controller.cc
diff --git a/chrome/browser/usb/usb_chooser_controller.cc b/chrome/browser/usb/usb_chooser_controller.cc
index a08a9626b22d2bfd5a471e0fab05667716fbd339..9a9cd36fb3c91199fd26c7579c10347b801456c9 100644
--- a/chrome/browser/usb/usb_chooser_controller.cc
+++ b/chrome/browser/usb/usb_chooser_controller.cc
@@ -76,7 +76,7 @@ base::string16 GetDeviceName(scoped_refptr<UsbDevice> device) {
UsbChooserController::UsbChooserController(
RenderFrameHost* render_frame_host,
const std::vector<UsbDeviceFilter>& device_filters,
- const device::usb::ChooserService::GetPermissionCallback& callback)
+ const device::mojom::UsbChooserService::GetPermissionCallback& callback)
: ChooserController(render_frame_host,
IDS_USB_DEVICE_CHOOSER_PROMPT_ORIGIN,
IDS_USB_DEVICE_CHOOSER_PROMPT_EXTENSION_NAME),
@@ -160,10 +160,8 @@ void UsbChooserController::Select(const std::vector<size_t>& indices) {
requesting_origin_, embedding_origin_, devices_[index].first->guid());
}
- device::usb::DeviceInfoPtr device_info_ptr =
- device::usb::DeviceInfo::From(*devices_[index].first);
- callback_.Run(std::move(device_info_ptr));
- callback_.Reset(); // Reset |callback_| so that it is only run once.
+ callback_.Run(device::mojom::UsbDeviceInfo::From(*devices_[index].first));
+ callback_.Reset(); // |callback_| must only be run once.
RecordWebUsbChooserClosure(
devices_[index].first->serial_number().empty()
« no previous file with comments | « chrome/browser/usb/usb_chooser_controller.h ('k') | chrome/browser/usb/usb_chooser_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698