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

Unified Diff: net/base/host_port_pair.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: fix comments Created 4 years, 8 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
« no previous file with comments | « no previous file | net/base/ip_address.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_port_pair.cc
diff --git a/net/base/host_port_pair.cc b/net/base/host_port_pair.cc
index 441a35965d8f4fa7e93a8b323d1a4ffca19d1d20..3bdfc5de62c5bf96ce2a4381d291cb97d4718e1d 100644
--- a/net/base/host_port_pair.cc
+++ b/net/base/host_port_pair.cc
@@ -38,7 +38,7 @@ HostPortPair HostPortPair::FromString(const std::string& str) {
if (key_port.size() != 2)
return HostPortPair();
int port;
- if (!ParseNonNegativeDecimalInt(key_port[1], &port))
+ if (!ParseInt32(key_port[1], ParseIntFormat::NON_NEGATIVE, &port))
return HostPortPair();
if (!IsPortValid(port))
return HostPortPair();
« no previous file with comments | « no previous file | net/base/ip_address.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698