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

Issue 938853002: quic_client should check return codes when parsing command-line flags. (Closed)

Created:
5 years, 10 months ago by dougk
Modified:
5 years, 10 months ago
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

quic_client should check return codes when parsing command-line flags. This is a minimal fix to prevent silently doing the wrong thing. A better fix would resolve names, and use the URL itself as a fallback. BUG=none Committed: https://crrev.com/5ec46dd5b1a8840be3dbd8800419736a40a85bd9 Cr-Commit-Position: refs/heads/master@{#316925}

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -2 lines) Patch
M net/quic/quic_server_bin.cc View 1 chunk +3 lines, -0 lines 2 comments Download
M net/tools/quic/quic_client_bin.cc View 2 chunks +11 lines, -2 lines 2 comments Download

Messages

Total messages: 10 (3 generated)
dougk
5 years, 10 months ago (2015-02-18 22:40:54 UTC) #2
ramant (doing other things)
lgtm
5 years, 10 months ago (2015-02-18 23:10:21 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/938853002/1
5 years, 10 months ago (2015-02-18 23:18:59 UTC) #6
Ryan Hamilton
Two nits. https://codereview.chromium.org/938853002/diff/1/net/quic/quic_server_bin.cc File net/quic/quic_server_bin.cc (right): https://codereview.chromium.org/938853002/diff/1/net/quic/quic_server_bin.cc#newcode56 net/quic/quic_server_bin.cc:56: return 1; Early return please: if (!base::StringToInt()) ...
5 years, 10 months ago (2015-02-18 23:51:13 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 10 months ago (2015-02-18 23:54:46 UTC) #8
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/5ec46dd5b1a8840be3dbd8800419736a40a85bd9 Cr-Commit-Position: refs/heads/master@{#316925}
5 years, 10 months ago (2015-02-18 23:55:30 UTC) #9
dougk
5 years, 10 months ago (2015-02-19 00:29:19 UTC) #10
Message was sent while issue was closed.
new commit - https://codereview.chromium.org/934383002/

https://codereview.chromium.org/938853002/diff/1/net/quic/quic_server_bin.cc
File net/quic/quic_server_bin.cc (right):

https://codereview.chromium.org/938853002/diff/1/net/quic/quic_server_bin.cc#...
net/quic/quic_server_bin.cc:56: return 1;
On 2015/02/18 23:51:13, Ryan Hamilton wrote:
> Early return please:
> 
> if (!base::StringToInt()) {
>   std::cerr <<;
>   return 1;
> }
> FLAGS_port = port;
> 
> (Also it looks like you could just use &FLAGS_port in your call to
StringToInt)

Done.

https://codereview.chromium.org/938853002/diff/1/net/tools/quic/quic_client_b...
File net/tools/quic/quic_client_bin.cc (right):

https://codereview.chromium.org/938853002/diff/1/net/tools/quic/quic_client_b...
net/tools/quic/quic_client_bin.cc:133: return 1;
On 2015/02/18 23:51:13, Ryan Hamilton wrote:
> Early return please:
> 
> if (!base::StringToInt()) {
>   std::cerr <<;
>   return 1;
> }
> FLAGS_port = port;

Done.

Powered by Google App Engine
This is Rietveld 408576698