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

Unified Diff: public/platform/modules/webusb/WebUSBError.h

Issue 1264483005: Add WebUSB bindings and client interface [part 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove CallbackPromiseAdapter usage Created 5 years, 5 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
Index: public/platform/modules/webusb/WebUSBError.h
diff --git a/public/platform/modules/background_sync/WebSyncError.h b/public/platform/modules/webusb/WebUSBError.h
similarity index 54%
copy from public/platform/modules/background_sync/WebSyncError.h
copy to public/platform/modules/webusb/WebUSBError.h
index cf537ad304dd119a19d82831846dafced3270600..d9a636e2b46900c584755be75935bd2aa37eefe7 100644
--- a/public/platform/modules/background_sync/WebSyncError.h
+++ b/public/platform/modules/webusb/WebUSBError.h
@@ -2,23 +2,24 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WebSyncError_h
-#define WebSyncError_h
+#ifndef WebUSBError_h
+#define WebUSBError_h
#include "public/platform/WebString.h"
namespace blink {
-struct WebSyncError {
+// Error object used to create DOMExceptions when a Web USB request cannot be
+// satisfied.
+struct WebUSBError {
enum ErrorType {
dcheng 2015/07/31 18:58:25 enum class here as well. You can probably just nam
Ken Rockot(use gerrit already) 2015/07/31 19:14:28 Done.
- ErrorTypeAbort = 0,
- ErrorTypeNoPermission,
- ErrorTypeNotFound,
- ErrorTypeUnknown,
- ErrorTypeLast = ErrorTypeUnknown
+ DeviceError,
+ SecurityError,
+ ServiceError,
+ TransferError,
};
- WebSyncError(ErrorType errorType, const WebString& message)
+ WebUSBError(ErrorType errorType, const WebString& message)
: errorType(errorType)
, message(message)
{
@@ -30,4 +31,4 @@ struct WebSyncError {
} // namespace blink
-#endif // WebSyncError_h
+#endif // WebUSBError_h

Powered by Google App Engine
This is Rietveld 408576698