Chromium Code Reviews| Index: components/usb_service/usb_error.cc |
| diff --git a/components/usb_service/usb_error.cc b/components/usb_service/usb_error.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ea73d2751d8d33659d1eb029f818ff0285059879 |
| --- /dev/null |
| +++ b/components/usb_service/usb_error.cc |
| @@ -0,0 +1,15 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "components/usb_service/usb_error.h" |
| + |
| +#include "third_party/libusb/src/libusb/libusb.h" |
| + |
| +namespace usb_service { |
| + |
| +std::string ConvertErrorToString(int errcode) { |
| + return libusb_strerror((libusb_error)errcode); |
|
Ken Rockot(use gerrit already)
2014/06/19 23:09:37
nit: Please use static_cast<libusb_error>(errorcod
|
| +} |
| + |
| +} // namespace usb_service; |