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

Issue 1829873002: Add base/parse_number.h to generalize number parsing done in //net. (Closed)

Created:
4 years, 9 months ago by eroman
Modified:
4 years, 9 months ago
Reviewers:
mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add base/parse_number.h to generalize number parsing done in //net. In particular, the current use of base::StringToInt() is problematic as it permits strings with a leading plus sign, which is invalid in most places where //net parses numbers. BUG=596523, 596538 Committed: https://crrev.com/94e42f599fa98662868c993cc4e432fd25a40f99 Cr-Commit-Position: refs/heads/master@{#382936}

Patch Set 1 #

Total comments: 19

Patch Set 2 : respond to matt's comments #

Patch Set 3 : more tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -16 lines) Patch
M net/base/host_port_pair.cc View 2 chunks +2 lines, -1 line 0 comments Download
M net/base/host_port_pair_unittest.cc View 1 chunk +2 lines, -5 lines 0 comments Download
M net/base/ip_address.cc View 2 chunks +2 lines, -8 lines 0 comments Download
A net/base/parse_number.h View 1 1 chunk +68 lines, -0 lines 0 comments Download
A net/base/parse_number.cc View 1 1 chunk +23 lines, -0 lines 0 comments Download
A net/base/parse_number_unittest.cc View 1 2 1 chunk +71 lines, -0 lines 0 comments Download
M net/base/sdch_manager.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M net/net.gypi View 2 chunks +3 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 17 (8 generated)
eroman
https://codereview.chromium.org/1829873002/diff/1/net/base/parse_number.h File net/base/parse_number.h (right): https://codereview.chromium.org/1829873002/diff/1/net/base/parse_number.h#newcode63 net/base/parse_number.h:63: NET_EXPORT bool ParseNonNegativeDecimalInt(const base::StringPiece& input, This may seem like ...
4 years, 9 months ago (2016-03-23 19:15:01 UTC) #2
mmenke
LGTM! https://codereview.chromium.org/1829873002/diff/1/net/base/host_port_pair.cc File net/base/host_port_pair.cc (right): https://codereview.chromium.org/1829873002/diff/1/net/base/host_port_pair.cc#newcode8 net/base/host_port_pair.cc:8: #include "base/strings/string_number_conversions.h" Hrm...Guess we still need this for ...
4 years, 9 months ago (2016-03-23 19:32:28 UTC) #3
eroman
https://codereview.chromium.org/1829873002/diff/1/net/base/host_port_pair.cc File net/base/host_port_pair.cc (right): https://codereview.chromium.org/1829873002/diff/1/net/base/host_port_pair.cc#newcode8 net/base/host_port_pair.cc:8: #include "base/strings/string_number_conversions.h" On 2016/03/23 19:32:28, mmenke wrote: > Hrm...Guess ...
4 years, 9 months ago (2016-03-23 19:50:30 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829873002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829873002/40001
4 years, 9 months ago (2016-03-23 19:51:48 UTC) #7
mmenke
https://codereview.chromium.org/1829873002/diff/1/net/base/parse_number.h File net/base/parse_number.h (right): https://codereview.chromium.org/1829873002/diff/1/net/base/parse_number.h#newcode24 net/base/parse_number.h:24: // //base versions. On 2016/03/23 19:50:30, eroman wrote: > ...
4 years, 9 months ago (2016-03-23 20:12:07 UTC) #8
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-23 20:58:43 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829873002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829873002/40001
4 years, 9 months ago (2016-03-23 21:56:39 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 9 months ago (2016-03-23 22:07:17 UTC) #15
commit-bot: I haz the power
4 years, 9 months ago (2016-03-23 22:08:19 UTC) #17
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/94e42f599fa98662868c993cc4e432fd25a40f99
Cr-Commit-Position: refs/heads/master@{#382936}

Powered by Google App Engine
This is Rietveld 408576698