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

Unified Diff: extensions/common/permissions/usb_device_permission_data.h

Issue 1485853003: Revert of Remove kuint16max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint2
Patch Set: Created 5 years 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: extensions/common/permissions/usb_device_permission_data.h
diff --git a/extensions/common/permissions/usb_device_permission_data.h b/extensions/common/permissions/usb_device_permission_data.h
index e72cc6c2b2a65564762eefafc2f3f358ca0c353c..001b12c27b3445077ef6d426703eb03e237600ce 100644
--- a/extensions/common/permissions/usb_device_permission_data.h
+++ b/extensions/common/permissions/usb_device_permission_data.h
@@ -4,10 +4,9 @@
#ifndef EXTENSIONS_COMMON_PERMISSIONS_USB_DEVICE_PERMISSION_DATA_H_
#define EXTENSIONS_COMMON_PERMISSIONS_USB_DEVICE_PERMISSION_DATA_H_
-#include <stdint.h>
-
#include <string>
+#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "extensions/common/permissions/api_permission.h"
@@ -21,7 +20,7 @@
// A pattern that can be used to match a USB device permission.
// Should be of the format: vendorId:productId, where both vendorId and
-// productId are decimal strings representing uint16_t values.
+// productId are decimal strings representing uint16 values.
class UsbDevicePermissionData {
public:
enum SpecialInterfaces {
@@ -36,8 +35,8 @@
};
UsbDevicePermissionData();
- UsbDevicePermissionData(uint16_t vendor_id,
- uint16_t product_id,
+ UsbDevicePermissionData(uint16 vendor_id,
+ uint16 product_id,
int interface_id);
// Check if |param| (which must be a UsbDevicePermissionData::CheckParam)
@@ -53,17 +52,17 @@
bool operator<(const UsbDevicePermissionData& rhs) const;
bool operator==(const UsbDevicePermissionData& rhs) const;
- const uint16_t& vendor_id() const { return vendor_id_; }
- const uint16_t& product_id() const { return product_id_; }
+ const uint16& vendor_id() const { return vendor_id_; }
+ const uint16& product_id() const { return product_id_; }
// These accessors are provided for IPC_STRUCT_TRAITS_MEMBER. Please
// think twice before using them for anything else.
- uint16_t& vendor_id() { return vendor_id_; }
- uint16_t& product_id() { return product_id_; }
+ uint16& vendor_id() { return vendor_id_; }
+ uint16& product_id() { return product_id_; }
private:
- uint16_t vendor_id_;
- uint16_t product_id_;
+ uint16 vendor_id_;
+ uint16 product_id_;
int interface_id_;
};
« no previous file with comments | « components/policy/core/browser/url_blacklist_manager.cc ('k') | extensions/common/permissions/usb_device_permission_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698