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

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

Issue 1475803002: Remove kuint16max. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kint2
Patch Set: cloud print 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 001b12c27b3445077ef6d426703eb03e237600ce..e72cc6c2b2a65564762eefafc2f3f358ca0c353c 100644
--- a/extensions/common/permissions/usb_device_permission_data.h
+++ b/extensions/common/permissions/usb_device_permission_data.h
@@ -4,9 +4,10 @@
#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"
@@ -20,7 +21,7 @@ namespace extensions {
// 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 values.
+// productId are decimal strings representing uint16_t values.
class UsbDevicePermissionData {
public:
enum SpecialInterfaces {
@@ -35,8 +36,8 @@ class UsbDevicePermissionData {
};
UsbDevicePermissionData();
- UsbDevicePermissionData(uint16 vendor_id,
- uint16 product_id,
+ UsbDevicePermissionData(uint16_t vendor_id,
+ uint16_t product_id,
int interface_id);
// Check if |param| (which must be a UsbDevicePermissionData::CheckParam)
@@ -52,17 +53,17 @@ class UsbDevicePermissionData {
bool operator<(const UsbDevicePermissionData& rhs) const;
bool operator==(const UsbDevicePermissionData& rhs) const;
- const uint16& vendor_id() const { return vendor_id_; }
- const uint16& product_id() const { return product_id_; }
+ const uint16_t& vendor_id() const { return vendor_id_; }
+ const uint16_t& 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& vendor_id() { return vendor_id_; }
- uint16& product_id() { return product_id_; }
+ uint16_t& vendor_id() { return vendor_id_; }
+ uint16_t& product_id() { return product_id_; }
private:
- uint16 vendor_id_;
- uint16 product_id_;
+ uint16_t vendor_id_;
+ uint16_t 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