| Index: extensions/browser/api/usb_private/usb_private_api.cc
|
| diff --git a/extensions/browser/api/usb_private/usb_private_api.cc b/extensions/browser/api/usb_private/usb_private_api.cc
|
| index dd29fd23724064deb8cfccc973c0c04d91dc878a..74abda14d04532702d7057017c6090b7645a120b 100644
|
| --- a/extensions/browser/api/usb_private/usb_private_api.cc
|
| +++ b/extensions/browser/api/usb_private/usb_private_api.cc
|
| @@ -33,7 +33,6 @@ namespace {
|
|
|
| const char kErrorInitService[] = "Failed to initialize USB service.";
|
| const char kErrorNoDevice[] = "No such device.";
|
| -const char kErrorOpen[] = "Failed to open device.";
|
|
|
| } // namespace
|
|
|
| @@ -120,23 +119,17 @@ void UsbPrivateGetDeviceInfoFunction::AsyncWorkStart() {
|
| device_info.product_name.reset(new std::string(name));
|
| }
|
|
|
| - scoped_refptr<UsbDeviceHandle> device_handle = device->Open();
|
| - if (!device_handle.get()) {
|
| - CompleteWithError(kErrorOpen);
|
| - return;
|
| - }
|
| -
|
| base::string16 utf16;
|
| - if (device_handle->GetManufacturer(&utf16)) {
|
| + if (device->GetManufacturer(&utf16)) {
|
| device_info.manufacturer_string.reset(
|
| new std::string(base::UTF16ToUTF8(utf16)));
|
| }
|
|
|
| - if (device_handle->GetProduct(&utf16)) {
|
| + if (device->GetProduct(&utf16)) {
|
| device_info.product_string.reset(new std::string(base::UTF16ToUTF8(utf16)));
|
| }
|
|
|
| - if (device_handle->GetSerial(&utf16)) {
|
| + if (device->GetSerialNumber(&utf16)) {
|
| device_info.serial_string.reset(new std::string(base::UTF16ToUTF8(utf16)));
|
| }
|
|
|
|
|