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

Unified Diff: net/proxy/proxy_bypass_rules.cc

Issue 1828103002: Extend net/base/parse_number.h for parsing of negative numbers, and determining if there was overflo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@proxy_num
Patch Set: Created 4 years, 9 months 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
« net/base/parse_number_unittest.cc ('K') | « net/base/sdch_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_bypass_rules.cc
diff --git a/net/proxy/proxy_bypass_rules.cc b/net/proxy/proxy_bypass_rules.cc
index eafaa98cc0593a82608be9d6d49ff99f6d99261b..3dce9ce7324c8541d703d95ab7ac289ee93a7ce7 100644
--- a/net/proxy/proxy_bypass_rules.cc
+++ b/net/proxy/proxy_bypass_rules.cc
@@ -319,7 +319,7 @@ bool ProxyBypassRules::AddRuleFromStringInternal(
std::string::size_type pos_colon = raw.rfind(':');
port = -1;
if (pos_colon != std::string::npos) {
- if (!ParseNonNegativeDecimalInt(
+ if (!ParseNonNegativeInteger(
base::StringPiece(raw.begin() + pos_colon + 1, raw.end()), &port) ||
port > 0xFFFF) {
return false; // Port was invalid.
« net/base/parse_number_unittest.cc ('K') | « net/base/sdch_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698