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

Side by Side Diff: device/usb/public/interfaces/device_manager_struct_traits.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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "device/usb/public/interfaces/device_manager_struct_traits.h" 5 #include "device/usb/public/interfaces/device_manager_struct_traits.h"
6 6
7 namespace mojo { 7 namespace mojo {
8 8
9 // static 9 // static
10 bool StructTraits<device::usb::DeviceFilterDataView, device::UsbDeviceFilter>:: 10 bool StructTraits<
11 Read(device::usb::DeviceFilterDataView input, 11 device::mojom::UsbDeviceFilterDataView,
12 device::UsbDeviceFilter* output) { 12 device::UsbDeviceFilter>::Read(device::mojom::UsbDeviceFilterDataView input,
13 device::UsbDeviceFilter* output) {
13 if (input.has_vendor_id()) 14 if (input.has_vendor_id())
14 output->vendor_id = input.vendor_id(); 15 output->vendor_id = input.vendor_id();
15 if (input.has_product_id()) 16 if (input.has_product_id())
16 output->product_id = input.product_id(); 17 output->product_id = input.product_id();
17 if (input.has_class_code()) 18 if (input.has_class_code())
18 output->interface_class = input.class_code(); 19 output->interface_class = input.class_code();
19 if (input.has_subclass_code()) 20 if (input.has_subclass_code())
20 output->interface_subclass = input.subclass_code(); 21 output->interface_subclass = input.subclass_code();
21 if (input.has_protocol_code()) 22 if (input.has_protocol_code())
22 output->interface_protocol = input.protocol_code(); 23 output->interface_protocol = input.protocol_code();
23 return input.ReadSerialNumber(&output->serial_number); 24 return input.ReadSerialNumber(&output->serial_number);
24 } 25 }
25 26
26 } // namespace mojo 27 } // namespace mojo
OLDNEW
« no previous file with comments | « device/usb/public/interfaces/device_manager_struct_traits.h ('k') | device/usb/usb_descriptors_fuzzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698