summaryrefslogtreecommitdiffstats
path: root/extensions/common/extension.cc
diff options
context:
space:
mode:
authorricea <ricea@chromium.org>2015-09-25 11:45:13 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-25 18:46:07 +0000
commitc700927282ae201df4e0938cfbaeefa4a96bfc80 (patch)
tree2eb3e9ad671e2b9c1aaa53de210c568ffe2301c8 /extensions/common/extension.cc
parent1c5d55a1edfc5da9f019e866ab426064ea292d40 (diff)
downloadchromium_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/extension.cc')
-rw-r--r--extensions/common/extension.cc18
1 files changed, 6 insertions, 12 deletions
diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc
index 024e558..4232509 100644
--- a/extensions/common/extension.cc
+++ b/extensions/common/extension.cc
@@ -631,9 +631,8 @@ bool Extension::LoadExtent(const char* key,
for (size_t i = 0; i < pattern_list->GetSize(); ++i) {
std::string pattern_string;
if (!pattern_list->GetString(i, &pattern_string)) {
- *error = ErrorUtils::FormatErrorMessageUTF16(value_error,
- base::UintToString(i),
- errors::kExpectString);
+ *error = ErrorUtils::FormatErrorMessageUTF16(
+ value_error, base::SizeTToString(i), errors::kExpectString);
return false;
}
@@ -646,8 +645,7 @@ bool Extension::LoadExtent(const char* key,
if (parse_result != URLPattern::PARSE_SUCCESS) {
*error = ErrorUtils::FormatErrorMessageUTF16(
- value_error,
- base::UintToString(i),
+ value_error, base::SizeTToString(i),
URLPattern::GetParseResultString(parse_result));
return false;
}
@@ -655,8 +653,7 @@ bool Extension::LoadExtent(const char* key,
// Do not allow authors to claim "<all_urls>".
if (pattern.match_all_urls()) {
*error = ErrorUtils::FormatErrorMessageUTF16(
- value_error,
- base::UintToString(i),
+ value_error, base::SizeTToString(i),
errors::kCannotClaimAllURLsInExtent);
return false;
}
@@ -664,8 +661,7 @@ bool Extension::LoadExtent(const char* key,
// Do not allow authors to claim "*" for host.
if (pattern.host().empty()) {
*error = ErrorUtils::FormatErrorMessageUTF16(
- value_error,
- base::UintToString(i),
+ value_error, base::SizeTToString(i),
errors::kCannotClaimAllHostsInExtent);
return false;
}
@@ -674,9 +670,7 @@ bool Extension::LoadExtent(const char* key,
// imply one at the end.
if (pattern.path().find('*') != std::string::npos) {
*error = ErrorUtils::FormatErrorMessageUTF16(
- value_error,
- base::UintToString(i),
- errors::kNoWildCardsInPaths);
+ value_error, base::SizeTToString(i), errors::kNoWildCardsInPaths);
return false;
}
pattern.SetPath(pattern.path() + '*');