| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef EXTENSIONS_COMMON_PERMISSIONS_USB_DEVICE_PERMISSION_DATA_H_ | 4 #ifndef EXTENSIONS_COMMON_PERMISSIONS_USB_DEVICE_PERMISSION_DATA_H_ |
| 5 #define EXTENSIONS_COMMON_PERMISSIONS_USB_DEVICE_PERMISSION_DATA_H_ | 5 #define EXTENSIONS_COMMON_PERMISSIONS_USB_DEVICE_PERMISSION_DATA_H_ |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "extensions/common/permissions/api_permission.h" | 10 #include "extensions/common/permissions/api_permission.h" |
| 11 | 11 |
| 12 namespace base { | 12 namespace base { |
| 13 | 13 |
| 14 class Value; | 14 class Value; |
| 15 | 15 |
| 16 } // namespace base | 16 } // namespace base |
| 17 | 17 |
| 18 namespace device { | |
| 19 class UsbDevice; | |
| 20 } | |
| 21 | |
| 22 namespace extensions { | 18 namespace extensions { |
| 23 | 19 |
| 24 // A pattern that can be used to match a USB device permission. | 20 // A pattern that can be used to match a USB device permission. |
| 25 // Should be of the format: vendorId:productId, where both vendorId and | 21 // Should be of the format: vendorId:productId, where both vendorId and |
| 26 // productId are decimal strings representing uint16_t values. | 22 // productId are decimal strings representing uint16_t values. |
| 27 class UsbDevicePermissionData { | 23 class UsbDevicePermissionData { |
| 28 public: | 24 public: |
| 29 enum SpecialValues { | 25 enum SpecialValues { |
| 30 // A special interface id for stating permissions for an entire USB device, | 26 // A special interface id for stating permissions for an entire USB device, |
| 31 // no specific interface. This value must match value of Rule::ANY_INTERFACE | 27 // no specific interface. This value must match value of Rule::ANY_INTERFACE |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 int product_id_{SPECIAL_VALUE_ANY}; | 67 int product_id_{SPECIAL_VALUE_ANY}; |
| 72 // Not useful anymore. Kept around not to trigger permission change warnings | 68 // Not useful anymore. Kept around not to trigger permission change warnings |
| 73 // for existing apps. | 69 // for existing apps. |
| 74 int interface_id_{SPECIAL_VALUE_ANY}; | 70 int interface_id_{SPECIAL_VALUE_ANY}; |
| 75 int interface_class_{SPECIAL_VALUE_ANY}; | 71 int interface_class_{SPECIAL_VALUE_ANY}; |
| 76 }; | 72 }; |
| 77 | 73 |
| 78 } // namespace extensions | 74 } // namespace extensions |
| 79 | 75 |
| 80 #endif // EXTENSIONS_COMMON_PERMISSIONS_USB_DEVICE_PERMISSION_DATA_H_ | 76 #endif // EXTENSIONS_COMMON_PERMISSIONS_USB_DEVICE_PERMISSION_DATA_H_ |
| OLD | NEW |