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

Issue 1360253002: Log GOAWAY frame debug data. (Closed)

Created:
5 years, 2 months ago by Bence
Modified:
5 years, 1 month ago
Reviewers:
eroman, Ryan Hamilton
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

Log GOAWAY frame debug data. * Buffer GOAWAY frame debug data in BufferedSpdyFramer. * Add |debug_data| argument to BufferedSpdyFramerVisitorInterface::OnGoAway(). * Add "debug_data" field to NetLog::TYPE_HTTP2_SESSION_GOAWAY event. * Strip value depending on NetLogCaptureMode both in native and Javascript code. * Add unittests. BUG=478685 Committed: https://crrev.com/14ebd6d0797d64a3d2eceb2950048b65015d471e Cr-Commit-Position: refs/heads/master@{#353531}

Patch Set 1 #

Patch Set 2 : Update visitor implementation in flip_server test. #

Patch Set 3 : Strip private information. #

Patch Set 4 : Rebase. #

Patch Set 5 : Rebase. #

Patch Set 6 : Add test. #

Patch Set 7 : Nit. #

Total comments: 6

Patch Set 8 : s/goaway_debug_data/debug_data/g; locally tested for functionality. #

Patch Set 9 : Add unittest. #

Patch Set 10 : Update EventType in test. #

Patch Set 11 : Initialize |goaway_count_|. #

Total comments: 18

Patch Set 12 : Re: #7. #

Total comments: 8

Patch Set 13 : Re: #12. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+226 lines, -45 lines) Patch
M chrome/browser/resources/net_internals/log_util.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/net_internals/log_view_painter.js View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +34 lines, -7 lines 0 comments Download
M chrome/test/data/webui/net_internals/log_view_painter.js View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +32 lines, -4 lines 0 comments Download
M net/http/http_log_util.h View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M net/http/http_log_util.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +14 lines, -1 line 0 comments Download
M net/http/http_log_util_unittest.cc View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M net/log/net_log_capture_mode.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -0 lines 0 comments Download
M net/log/net_log_capture_mode.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -2 lines 0 comments Download
M net/spdy/buffered_spdy_framer.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +14 lines, -4 lines 0 comments Download
M net/spdy/buffered_spdy_framer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +30 lines, -3 lines 0 comments Download
M net/spdy/buffered_spdy_framer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +33 lines, -3 lines 0 comments Download
M net/spdy/spdy_session.h View 1 chunk +2 lines, -1 line 0 comments Download
M net/spdy/spdy_session.cc View 1 2 3 4 5 6 7 2 chunks +11 lines, -6 lines 0 comments Download
M net/spdy/spdy_session_unittest.cc View 1 2 7 2 chunks +28 lines, -10 lines 0 comments Download
M net/spdy/spdy_test_util_common.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M net/tools/flip_server/spdy_interface.h View 1 chunk +2 lines, -1 line 0 comments Download
M net/tools/flip_server/spdy_interface_test.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 20 (7 generated)
Bence
Ryan: PTAL. Thanks.
5 years, 2 months ago (2015-10-02 22:31:42 UTC) #3
Ryan Hamilton
Looks pretty good. You should probably have eroman review the net-internals js changes because I'm ...
5 years, 2 months ago (2015-10-05 21:17:55 UTC) #4
Bence
Eric: PTAL at chrome/*/log_view_painter.js (both of them). Ryan: PTAnotherL. Thank you both. https://codereview.chromium.org/1360253002/diff/130001/net/spdy/buffered_spdy_framer.cc File net/spdy/buffered_spdy_framer.cc ...
5 years, 2 months ago (2015-10-06 15:18:57 UTC) #6
eroman
nice testing coverage. Just a few comments but otherwise LG https://codereview.chromium.org/1360253002/diff/210001/chrome/browser/resources/net_internals/log_view_painter.js File chrome/browser/resources/net_internals/log_view_painter.js (right): https://codereview.chromium.org/1360253002/diff/210001/chrome/browser/resources/net_internals/log_view_painter.js#newcode567 ...
5 years, 2 months ago (2015-10-06 17:19:41 UTC) #7
Ryan Hamilton
LGTM. as usual eroman has some great suggestions.
5 years, 2 months ago (2015-10-07 00:00:35 UTC) #8
Bence
Eric: thanks for the great suggestions. PTAL. https://codereview.chromium.org/1360253002/diff/210001/chrome/browser/resources/net_internals/log_view_painter.js File chrome/browser/resources/net_internals/log_view_painter.js (right): https://codereview.chromium.org/1360253002/diff/210001/chrome/browser/resources/net_internals/log_view_painter.js#newcode567 chrome/browser/resources/net_internals/log_view_painter.js:567: stripCookiesAndLoginInfo = ...
5 years, 2 months ago (2015-10-07 15:18:27 UTC) #11
eroman
lgtm https://codereview.chromium.org/1360253002/diff/270001/chrome/browser/resources/net_internals/log_view_painter.js File chrome/browser/resources/net_internals/log_view_painter.js (right): https://codereview.chromium.org/1360253002/diff/270001/chrome/browser/resources/net_internals/log_view_painter.js#newcode567 chrome/browser/resources/net_internals/log_view_painter.js:567: stripCookiesAndLoginInfoAndGoAwayDebugData = function(entry) { This name is accurate ...
5 years, 2 months ago (2015-10-07 17:00:51 UTC) #12
Bence
On 2015/10/07 17:00:51, eroman wrote: > lgtm > > https://codereview.chromium.org/1360253002/diff/270001/chrome/browser/resources/net_internals/log_view_painter.js > File chrome/browser/resources/net_internals/log_view_painter.js (right): > ...
5 years, 2 months ago (2015-10-08 14:15:48 UTC) #13
eroman
Sorry Bench in committee today ... I can help u look at that issue tomorrow ...
5 years, 2 months ago (2015-10-08 17:13:49 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1360253002/290001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1360253002/290001
5 years, 2 months ago (2015-10-12 14:27:50 UTC) #17
commit-bot: I haz the power
Committed patchset #13 (id:290001)
5 years, 2 months ago (2015-10-12 16:23:23 UTC) #18
commit-bot: I haz the power
Patchset 13 (id:??) landed as https://crrev.com/14ebd6d0797d64a3d2eceb2950048b65015d471e Cr-Commit-Position: refs/heads/master@{#353531}
5 years, 2 months ago (2015-10-12 16:24:21 UTC) #19
Bence
5 years, 1 month ago (2015-10-30 11:55:27 UTC) #20
Message was sent while issue was closed.
Sorry I forgot to publish these drafts earlier.  Thank you for having reviewed
this CL.

https://codereview.chromium.org/1360253002/diff/270001/chrome/browser/resourc...
File chrome/browser/resources/net_internals/log_view_painter.js (right):

https://codereview.chromium.org/1360253002/diff/270001/chrome/browser/resourc...
chrome/browser/resources/net_internals/log_view_painter.js:567:
stripCookiesAndLoginInfoAndGoAwayDebugData = function(entry) {
On 2015/10/07 17:00:51, eroman wrote:
> This name is accurate however a bit too long IMO.
> 
> What about "stripPrivacyInfo()" ? (I imagine we will keep adding things to
this,
> so the more general name my age better). This also seems in line with the
> "privacyStripping" variable that it is conditionally called on.

stripPrivacyInfo sounds a lot better, should have thought about that.

Done.

https://codereview.chromium.org/1360253002/diff/270001/net/http/http_log_util.cc
File net/http/http_log_util.cc (right):

https://codereview.chromium.org/1360253002/diff/270001/net/http/http_log_util...
net/http/http_log_util.cc:85: return std::string("[") +
base::SizeTToString(debug_data.size()) +
On 2015/10/07 17:00:51, eroman wrote:
> [observation (no action needed)] Google has StrCat(a, b, c) which would be
used
> in places like this.
> 
> Too bad Chrome code doesn't have anything equivalent, since chaining operator+
> unfortunately generates bad code (multiple allocations and temporary string
> allocations).
> 
> Meh.

Acknowledged.

https://codereview.chromium.org/1360253002/diff/270001/net/log/net_log_captur...
File net/log/net_log_capture_mode.h (right):

https://codereview.chromium.org/1360253002/diff/270001/net/log/net_log_captur...
net/log/net_log_capture_mode.h:36: //
IncludeCookiesAndCredentialsAndGoAwayDebugData().
On 2015/10/07 17:00:51, eroman wrote:
> IncludePrivacyInfo ?
> 
> (not the best name, but "Privacy" gives a pretty strong clue was to what it
> means)

Done.

https://codereview.chromium.org/1360253002/diff/270001/net/spdy/buffered_spdy...
File net/spdy/buffered_spdy_framer.cc (right):

https://codereview.chromium.org/1360253002/diff/270001/net/spdy/buffered_spdy...
net/spdy/buffered_spdy_framer.cc:247: goaway_fields_->debug_data.size()));
On 2015/10/07 17:00:51, eroman wrote:
> This looks correct.
> 
> However when first reading it I had to pause to consider whether the unsigned
> subtraction (kGoAwayDebugDataMaxSize - goaway_fields_->debug_data.size())
could
> ever underflow.
> 
> Consider wrapping it in:
> 
> if (goaway_fields_->debug_data.size() < kGoAwayDebugDataMaxSize) {
>   ...
> }
> 
> As a defensive measure in case goaway_fields_ is ever increased beyond the
> maximum outside this function.

Done.

Powered by Google App Engine
This is Rietveld 408576698