OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/extensions/api/usb/usb_api.h" | 5 #include "chrome/browser/extensions/api/usb/usb_api.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 const char kDataKey[] = "data"; | 59 const char kDataKey[] = "data"; |
60 const char kResultCodeKey[] = "resultCode"; | 60 const char kResultCodeKey[] = "resultCode"; |
61 | 61 |
62 const char kErrorInitService[] = "Failed to initialize USB service."; | 62 const char kErrorInitService[] = "Failed to initialize USB service."; |
63 | 63 |
64 const char kErrorOpen[] = "Failed to open device."; | 64 const char kErrorOpen[] = "Failed to open device."; |
65 const char kErrorCancelled[] = "Transfer was cancelled."; | 65 const char kErrorCancelled[] = "Transfer was cancelled."; |
66 const char kErrorDisconnect[] = "Device disconnected."; | 66 const char kErrorDisconnect[] = "Device disconnected."; |
67 const char kErrorGeneric[] = "Transfer failed."; | 67 const char kErrorGeneric[] = "Transfer failed."; |
| 68 #if !defined(OS_CHROMEOS) |
68 const char kErrorNotSupported[] = "Not supported on this platform."; | 69 const char kErrorNotSupported[] = "Not supported on this platform."; |
| 70 #endif |
69 const char kErrorOverflow[] = "Inbound transfer overflow."; | 71 const char kErrorOverflow[] = "Inbound transfer overflow."; |
70 const char kErrorStalled[] = "Transfer stalled."; | 72 const char kErrorStalled[] = "Transfer stalled."; |
71 const char kErrorTimeout[] = "Transfer timed out."; | 73 const char kErrorTimeout[] = "Transfer timed out."; |
72 const char kErrorTransferLength[] = "Transfer length is insufficient."; | 74 const char kErrorTransferLength[] = "Transfer length is insufficient."; |
73 | 75 |
74 const char kErrorCannotListInterfaces[] = "Error listing interfaces."; | 76 const char kErrorCannotListInterfaces[] = "Error listing interfaces."; |
75 const char kErrorCannotClaimInterface[] = "Error claiming interface."; | 77 const char kErrorCannotClaimInterface[] = "Error claiming interface."; |
76 const char kErrorCannotReleaseInterface[] = "Error releasing interface."; | 78 const char kErrorCannotReleaseInterface[] = "Error releasing interface."; |
77 const char kErrorCannotSetInterfaceAlternateSetting[] = | 79 const char kErrorCannotSetInterfaceAlternateSetting[] = |
78 "Error setting alternate interface setting."; | 80 "Error setting alternate interface setting."; |
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1162 SetResult(new base::FundamentalValue(false)); | 1164 SetResult(new base::FundamentalValue(false)); |
1163 CompleteWithError(kErrorResetDevice); | 1165 CompleteWithError(kErrorResetDevice); |
1164 return; | 1166 return; |
1165 } | 1167 } |
1166 | 1168 |
1167 SetResult(new base::FundamentalValue(true)); | 1169 SetResult(new base::FundamentalValue(true)); |
1168 AsyncWorkCompleted(); | 1170 AsyncWorkCompleted(); |
1169 } | 1171 } |
1170 | 1172 |
1171 } // namespace extensions | 1173 } // namespace extensions |
OLD | NEW |