diff options
author | avi <avi@chromium.org> | 2015-12-22 22:36:42 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-23 06:37:37 +0000 |
commit | 2d124c0ce773bd5dd334e2c6168cbb66a4b224d6 (patch) | |
tree | f677b902e1a77a269af4761c9a270f0ddabb6e5e /extensions/common/permissions | |
parent | bf2f7bc27f6baa44286fea07e39540c3ac8db77d (diff) | |
download | chromium_src-2d124c0ce773bd5dd334e2c6168cbb66a4b224d6.zip chromium_src-2d124c0ce773bd5dd334e2c6168cbb66a4b224d6.tar.gz chromium_src-2d124c0ce773bd5dd334e2c6168cbb66a4b224d6.tar.bz2 |
Switch to standard integer types in extensions/.
BUG=138542
TBR=benwells@chromium.org
Review URL: https://codereview.chromium.org/1543053002
Cr-Commit-Position: refs/heads/master@{#366716}
Diffstat (limited to 'extensions/common/permissions')
20 files changed, 42 insertions, 16 deletions
diff --git a/extensions/common/permissions/api_permission_set.h b/extensions/common/permissions/api_permission_set.h index bcb371b..c913466 100644 --- a/extensions/common/permissions/api_permission_set.h +++ b/extensions/common/permissions/api_permission_set.h @@ -5,6 +5,8 @@ #ifndef EXTENSIONS_COMMON_PERMISSIONS_API_PERMISSION_SET_H_ #define EXTENSIONS_COMMON_PERMISSIONS_API_PERMISSION_SET_H_ +#include <stddef.h> + #include <set> #include <string> #include <vector> diff --git a/extensions/common/permissions/base_set_operators.h b/extensions/common/permissions/base_set_operators.h index d18321c..2ac5357 100644 --- a/extensions/common/permissions/base_set_operators.h +++ b/extensions/common/permissions/base_set_operators.h @@ -5,6 +5,8 @@ #ifndef EXTENSIONS_COMMON_PERMISSIONS_BASE_SET_OPERATORS_H_ #define EXTENSIONS_COMMON_PERMISSIONS_BASE_SET_OPERATORS_H_ +#include <stddef.h> + #include <iterator> #include <map> diff --git a/extensions/common/permissions/extensions_api_permissions.cc b/extensions/common/permissions/extensions_api_permissions.cc index 70a667f..9f9127c 100644 --- a/extensions/common/permissions/extensions_api_permissions.cc +++ b/extensions/common/permissions/extensions_api_permissions.cc @@ -4,8 +4,11 @@ #include "extensions/common/permissions/extensions_api_permissions.h" +#include <stddef.h> + #include <vector> +#include "base/macros.h" #include "extensions/common/permissions/api_permission.h" #include "extensions/common/permissions/socket_permission.h" #include "extensions/common/permissions/usb_device_permission.h" diff --git a/extensions/common/permissions/manifest_permission.h b/extensions/common/permissions/manifest_permission.h index 7d21957..67c41d5 100644 --- a/extensions/common/permissions/manifest_permission.h +++ b/extensions/common/permissions/manifest_permission.h @@ -7,6 +7,7 @@ #include <string> +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/pickle.h" #include "extensions/common/permissions/api_permission_set.h" diff --git a/extensions/common/permissions/manifest_permission_set.cc b/extensions/common/permissions/manifest_permission_set.cc index fd2d521..39e2ba6 100644 --- a/extensions/common/permissions/manifest_permission_set.cc +++ b/extensions/common/permissions/manifest_permission_set.cc @@ -4,6 +4,8 @@ #include "extensions/common/permissions/manifest_permission_set.h" +#include <stddef.h> + #include "base/logging.h" #include "base/strings/string_number_conversions.h" #include "base/values.h" diff --git a/extensions/common/permissions/media_galleries_permission.cc b/extensions/common/permissions/media_galleries_permission.cc index 1b3b919..6a43268 100644 --- a/extensions/common/permissions/media_galleries_permission.cc +++ b/extensions/common/permissions/media_galleries_permission.cc @@ -4,6 +4,8 @@ #include "extensions/common/permissions/media_galleries_permission.h" +#include <stddef.h> + #include <set> #include <string> diff --git a/extensions/common/permissions/media_galleries_permission.h b/extensions/common/permissions/media_galleries_permission.h index 0276454..870a0a9 100644 --- a/extensions/common/permissions/media_galleries_permission.h +++ b/extensions/common/permissions/media_galleries_permission.h @@ -5,7 +5,6 @@ #ifndef EXTENSIONS_COMMON_PERMISSIONS_MEDIA_GALLERIES_PERMISSION_H_ #define EXTENSIONS_COMMON_PERMISSIONS_MEDIA_GALLERIES_PERMISSION_H_ -#include "base/basictypes.h" #include "extensions/common/permissions/api_permission.h" #include "extensions/common/permissions/media_galleries_permission_data.h" #include "extensions/common/permissions/set_disjunction_permission.h" diff --git a/extensions/common/permissions/media_galleries_permission_data.h b/extensions/common/permissions/media_galleries_permission_data.h index 920a905..05ae578 100644 --- a/extensions/common/permissions/media_galleries_permission_data.h +++ b/extensions/common/permissions/media_galleries_permission_data.h @@ -7,7 +7,6 @@ #include <string> -#include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "extensions/common/permissions/api_permission.h" diff --git a/extensions/common/permissions/permission_message_test_util.cc b/extensions/common/permissions/permission_message_test_util.cc index 9b1981e..d4ff639 100644 --- a/extensions/common/permissions/permission_message_test_util.cc +++ b/extensions/common/permissions/permission_message_test_util.cc @@ -4,6 +4,8 @@ #include "extensions/common/permissions/permission_message_test_util.h" +#include <stddef.h> + #include <algorithm> #include <iterator> diff --git a/extensions/common/permissions/permission_message_util.cc b/extensions/common/permissions/permission_message_util.cc index 566fe85..8fa3e6d 100644 --- a/extensions/common/permissions/permission_message_util.cc +++ b/extensions/common/permissions/permission_message_util.cc @@ -4,6 +4,8 @@ #include "extensions/common/permissions/permission_message_util.h" +#include <stddef.h> + #include "base/macros.h" #include "base/strings/string_split.h" #include "base/strings/utf_string_conversions.h" diff --git a/extensions/common/permissions/permission_set.h b/extensions/common/permissions/permission_set.h index 4f02dbd..b03a869 100644 --- a/extensions/common/permissions/permission_set.h +++ b/extensions/common/permissions/permission_set.h @@ -9,6 +9,7 @@ #include <string> #include "base/gtest_prod_util.h" +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "extensions/common/permissions/api_permission.h" #include "extensions/common/permissions/api_permission_set.h" diff --git a/extensions/common/permissions/permissions_data.cc b/extensions/common/permissions/permissions_data.cc index 5b28d85..8fa22f4 100644 --- a/extensions/common/permissions/permissions_data.cc +++ b/extensions/common/permissions/permissions_data.cc @@ -7,6 +7,7 @@ #include <utility> #include "base/command_line.h" +#include "base/macros.h" #include "content/public/common/url_constants.h" #include "extensions/common/constants.h" #include "extensions/common/error_utils.h" diff --git a/extensions/common/permissions/permissions_data.h b/extensions/common/permissions/permissions_data.h index 650c0ef..a78a0c1 100644 --- a/extensions/common/permissions/permissions_data.h +++ b/extensions/common/permissions/permissions_data.h @@ -9,6 +9,7 @@ #include <string> #include <vector> +#include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" diff --git a/extensions/common/permissions/permissions_info.h b/extensions/common/permissions/permissions_info.h index 43d61b2..d834c41 100644 --- a/extensions/common/permissions/permissions_info.h +++ b/extensions/common/permissions/permissions_info.h @@ -5,12 +5,15 @@ #ifndef EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_INFO_H_ #define EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_INFO_H_ +#include <stddef.h> + #include <map> #include <set> #include <string> #include "base/callback.h" #include "base/lazy_instance.h" +#include "base/macros.h" #include "extensions/common/permissions/api_permission.h" #include "extensions/common/permissions/api_permission_set.h" #include "extensions/common/permissions/permissions_provider.h" diff --git a/extensions/common/permissions/set_disjunction_permission.h b/extensions/common/permissions/set_disjunction_permission.h index 00ffad7..1e124ab 100644 --- a/extensions/common/permissions/set_disjunction_permission.h +++ b/extensions/common/permissions/set_disjunction_permission.h @@ -5,6 +5,8 @@ #ifndef EXTENSIONS_COMMON_PERMISSIONS_SET_DISJUNCTION_PERMISSION_H_ #define EXTENSIONS_COMMON_PERMISSIONS_SET_DISJUNCTION_PERMISSION_H_ +#include <stddef.h> + #include <set> #include <string> diff --git a/extensions/common/permissions/socket_permission.h b/extensions/common/permissions/socket_permission.h index 3fb1262..01be06c 100644 --- a/extensions/common/permissions/socket_permission.h +++ b/extensions/common/permissions/socket_permission.h @@ -5,6 +5,8 @@ #ifndef EXTENSIONS_COMMON_PERMISSIONS_SOCKET_PERMISSION_H_ #define EXTENSIONS_COMMON_PERMISSIONS_SOCKET_PERMISSION_H_ +#include <stdint.h> + #include <string> #include "extensions/common/permissions/api_permission.h" @@ -19,7 +21,7 @@ class SocketPermission struct CheckParam : APIPermission::CheckParam { CheckParam(content::SocketPermissionRequest::OperationType type, const std::string& host, - uint16 port) + uint16_t port) : request(type, host, port) {} content::SocketPermissionRequest request; }; diff --git a/extensions/common/permissions/socket_permission_entry.cc b/extensions/common/permissions/socket_permission_entry.cc index 926a07b..fdb6de8 100644 --- a/extensions/common/permissions/socket_permission_entry.cc +++ b/extensions/common/permissions/socket_permission_entry.cc @@ -4,6 +4,8 @@ #include "extensions/common/permissions/socket_permission_entry.h" +#include <stdint.h> + #include <cstdlib> #include <sstream> #include <tuple> @@ -25,8 +27,8 @@ using content::SocketPermissionRequest; const char kColon = ':'; const char kDot = '.'; const char kWildcard[] = "*"; -const uint16 kWildcardPortNumber = 0; -const uint16 kInvalidPort = 65535; +const uint16_t kWildcardPortNumber = 0; +const uint16_t kInvalidPort = 65535; bool StartsOrEndsWithWhitespace(const std::string& str) { return !str.empty() && (base::IsUnicodeWhitespace(str[0]) || @@ -182,7 +184,7 @@ bool SocketPermissionEntry::ParseHostPattern( int port; if (!base::StringToInt(pattern_tokens[1], &port) || port < 1 || port > 65535) return false; - result.pattern_.port = static_cast<uint16>(port); + result.pattern_.port = static_cast<uint16_t>(port); *entry = result; return true; diff --git a/extensions/common/permissions/usb_device_permission.cc b/extensions/common/permissions/usb_device_permission.cc index ab9a936..ab279b6 100644 --- a/extensions/common/permissions/usb_device_permission.cc +++ b/extensions/common/permissions/usb_device_permission.cc @@ -28,7 +28,7 @@ UsbDevicePermission::~UsbDevicePermission() {} PermissionIDSet UsbDevicePermission::GetPermissions() const { PermissionIDSet ids; - std::set<uint16> unknown_product_vendors; + std::set<uint16_t> unknown_product_vendors; bool found_unknown_vendor = false; for (const UsbDevicePermissionData& data : data_set_) { @@ -49,7 +49,7 @@ PermissionIDSet UsbDevicePermission::GetPermissions() const { } } - for (uint16 vendor_id : unknown_product_vendors) { + for (uint16_t vendor_id : unknown_product_vendors) { const char* vendor = device::UsbIds::GetVendorName(vendor_id); DCHECK(vendor); ids.insert(APIPermission::kUsbDeviceUnknownProduct, diff --git a/extensions/common/permissions/usb_device_permission.h b/extensions/common/permissions/usb_device_permission.h index 881d6dd..7cba580 100644 --- a/extensions/common/permissions/usb_device_permission.h +++ b/extensions/common/permissions/usb_device_permission.h @@ -5,7 +5,8 @@ #ifndef EXTENSIONS_COMMON_PERMISSIONS_USB_DEVICE_PERMISSION_H_ #define EXTENSIONS_COMMON_PERMISSIONS_USB_DEVICE_PERMISSION_H_ -#include "base/basictypes.h" +#include <stdint.h> + #include "extensions/common/permissions/api_permission.h" #include "extensions/common/permissions/set_disjunction_permission.h" #include "extensions/common/permissions/usb_device_permission_data.h" @@ -17,12 +18,12 @@ class UsbDevicePermission UsbDevicePermission> { public: struct CheckParam : public APIPermission::CheckParam { - CheckParam(uint16 vendor_id, uint16 product_id, int interface_id) - : vendor_id(vendor_id), - product_id(product_id), - interface_id(interface_id) {} - const uint16 vendor_id; - const uint16 product_id; + CheckParam(uint16_t vendor_id, uint16_t product_id, int interface_id) + : vendor_id(vendor_id), + product_id(product_id), + interface_id(interface_id) {} + const uint16_t vendor_id; + const uint16_t product_id; const int interface_id; }; diff --git a/extensions/common/permissions/usb_device_permission_data.cc b/extensions/common/permissions/usb_device_permission_data.cc index 5d49487..3d6817b 100644 --- a/extensions/common/permissions/usb_device_permission_data.cc +++ b/extensions/common/permissions/usb_device_permission_data.cc @@ -9,7 +9,6 @@ #include <tuple> #include <vector> -#include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h" |