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

Unified Diff: chrome/browser/extensions/api/usb/usb_api.cc

Issue 11827026: Overhaul JSON Schema Compiler to support a number of features required to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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: chrome/browser/extensions/api/usb/usb_api.cc
diff --git a/chrome/browser/extensions/api/usb/usb_api.cc b/chrome/browser/extensions/api/usb/usb_api.cc
index 717a52c50f6cbfa62c6d2ad27643596406f133a7..987c2886c3008ab1f2fd2dba53cd8b097675d187 100644
--- a/chrome/browser/extensions/api/usb/usb_api.cc
+++ b/chrome/browser/extensions/api/usb/usb_api.cc
@@ -68,10 +68,10 @@ static UsbDevice* device_for_test_ = NULL;
static bool ConvertDirection(const Direction& input,
UsbDevice::TransferDirection* output) {
switch (input) {
- case usb::USB_DIRECTION_IN:
+ case usb::DIRECTION_IN:
*output = UsbDevice::INBOUND;
return true;
- case usb::USB_DIRECTION_OUT:
+ case usb::DIRECTION_OUT:
*output = UsbDevice::OUTBOUND;
return true;
default:
@@ -84,16 +84,16 @@ static bool ConvertDirection(const Direction& input,
static bool ConvertRequestType(const RequestType& input,
UsbDevice::TransferRequestType* output) {
switch (input) {
- case usb::USB_REQUEST_TYPE_STANDARD:
+ case usb::REQUEST_TYPE_STANDARD:
*output = UsbDevice::STANDARD;
return true;
- case usb::USB_REQUEST_TYPE_CLASS:
+ case usb::REQUEST_TYPE_CLASS:
*output = UsbDevice::CLASS;
return true;
- case usb::USB_REQUEST_TYPE_VENDOR:
+ case usb::REQUEST_TYPE_VENDOR:
*output = UsbDevice::VENDOR;
return true;
- case usb::USB_REQUEST_TYPE_RESERVED:
+ case usb::REQUEST_TYPE_RESERVED:
*output = UsbDevice::RESERVED;
return true;
default:
@@ -106,16 +106,16 @@ static bool ConvertRequestType(const RequestType& input,
static bool ConvertRecipient(const Recipient& input,
UsbDevice::TransferRecipient* output) {
switch (input) {
- case usb::USB_RECIPIENT_DEVICE:
+ case usb::RECIPIENT_DEVICE:
*output = UsbDevice::DEVICE;
return true;
- case usb::USB_RECIPIENT_INTERFACE:
+ case usb::RECIPIENT_INTERFACE:
*output = UsbDevice::INTERFACE;
return true;
- case usb::USB_RECIPIENT_ENDPOINT:
+ case usb::RECIPIENT_ENDPOINT:
*output = UsbDevice::ENDPOINT;
return true;
- case usb::USB_RECIPIENT_OTHER:
+ case usb::RECIPIENT_OTHER:
*output = UsbDevice::OTHER;
return true;
default:
@@ -127,13 +127,13 @@ static bool ConvertRecipient(const Recipient& input,
template<class T>
static bool GetTransferSize(const T& input, size_t* output) {
- if (input.direction == usb::USB_DIRECTION_IN) {
+ if (input.direction == usb::DIRECTION_IN) {
const int* length = input.length.get();
if (length) {
*output = *length;
return true;
}
- } else if (input.direction == usb::USB_DIRECTION_OUT) {
+ } else if (input.direction == usb::DIRECTION_OUT) {
if (input.data.get()) {
*output = input.data->size();
return true;

Powered by Google App Engine
This is Rietveld 408576698