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

Unified Diff: components/usb_service/usb_error.cc

Issue 344793009: Log errors from libusb. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 | « components/usb_service/usb_error.h ('k') | components/usb_service/usb_service_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d3e99601205a4c1384c96d811458588739419bdc
--- /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(static_cast<libusb_error>(errcode));
+}
+
+} // namespace usb_service;
« no previous file with comments | « components/usb_service/usb_error.h ('k') | components/usb_service/usb_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698