diff options
author | ricea <ricea@chromium.org> | 2015-09-25 11:45:13 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-25 18:46:07 +0000 |
commit | c700927282ae201df4e0938cfbaeefa4a96bfc80 (patch) | |
tree | 2eb3e9ad671e2b9c1aaa53de210c568ffe2301c8 /extensions/common/permissions | |
parent | 1c5d55a1edfc5da9f019e866ab426064ea292d40 (diff) | |
download | chromium_src-c700927282ae201df4e0938cfbaeefa4a96bfc80.zip chromium_src-c700927282ae201df4e0938cfbaeefa4a96bfc80.tar.gz chromium_src-c700927282ae201df4e0938cfbaeefa4a96bfc80.tar.bz2 |
Use the appropriate variant of IntToString in //extensions
Using the wrong variant of IntToString() can lead to unexpected
behaviour and bugs. Use the appropriate variant for the type being
converted.
No behaviour change intended.
BUG=505479
TEST=compiled
Review URL: https://codereview.chromium.org/1352893003
Cr-Commit-Position: refs/heads/master@{#350874}
Diffstat (limited to 'extensions/common/permissions')
-rw-r--r-- | extensions/common/permissions/api_permission_set.cc | 4 | ||||
-rw-r--r-- | extensions/common/permissions/manifest_permission_set.cc | 2 | ||||
-rw-r--r-- | extensions/common/permissions/socket_permission_entry.cc | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/extensions/common/permissions/api_permission_set.cc b/extensions/common/permissions/api_permission_set.cc index 5093f2e..164390b 100644 --- a/extensions/common/permissions/api_permission_set.cc +++ b/extensions/common/permissions/api_permission_set.cc @@ -108,7 +108,7 @@ bool ParseChildPermissions(const std::string& base_name, if (error) { *error = ErrorUtils::FormatErrorMessageUTF16( errors::kInvalidPermission, - base_name + '.' + base::IntToString(i)); + base_name + '.' + base::SizeTToString(i)); return false; } LOG(WARNING) << "Permission is not a string."; @@ -155,7 +155,7 @@ bool APIPermissionSet::ParseFromJSON( if (!permissions->GetDictionary(i, &dict) || dict->size() != 1) { if (error) { *error = ErrorUtils::FormatErrorMessageUTF16( - errors::kInvalidPermission, base::IntToString(i)); + errors::kInvalidPermission, base::SizeTToString(i)); return false; } LOG(WARNING) << "Permission is not a string or single key dict."; diff --git a/extensions/common/permissions/manifest_permission_set.cc b/extensions/common/permissions/manifest_permission_set.cc index fecb611..fd2d521 100644 --- a/extensions/common/permissions/manifest_permission_set.cc +++ b/extensions/common/permissions/manifest_permission_set.cc @@ -71,7 +71,7 @@ bool ManifestPermissionSet::ParseFromJSON( if (!permissions->GetDictionary(i, &dict) || dict->size() != 1) { if (error) { *error = ErrorUtils::FormatErrorMessageUTF16( - errors::kInvalidPermission, base::IntToString(i)); + errors::kInvalidPermission, base::SizeTToString(i)); return false; } LOG(WARNING) << "Permission is not a string or single key dict."; diff --git a/extensions/common/permissions/socket_permission_entry.cc b/extensions/common/permissions/socket_permission_entry.cc index 012eda0..31ec6b8 100644 --- a/extensions/common/permissions/socket_permission_entry.cc +++ b/extensions/common/permissions/socket_permission_entry.cc @@ -218,7 +218,7 @@ std::string SocketPermissionEntry::GetHostPatternAsString() const { if (pattern_.port == kWildcardPortNumber) result.append(1, kColon).append(kWildcard); else - result.append(1, kColon).append(base::IntToString(pattern_.port)); + result.append(1, kColon).append(base::UintToString(pattern_.port)); return result; } |