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

Issue 2844083003: Create frame iterator for frame types except HEADER, PUSH_PROMISE and DATA. This helps use unified … (Closed)

Created:
3 years, 7 months ago by yasong
Modified:
3 years, 7 months ago
Reviewers:
Lei Zhang, Bence
CC:
chromium-reviews, cbentzel+watch_chromium.org, bnc+watch_chromium.org, net-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Create frame iterator for frame types except HEADER, PUSH_PROMISE and DATA. This helps use unified interface at call site. This CL lands server change 151846071 by yasong. BUG=488484 Review-Url: https://codereview.chromium.org/2844083003 Cr-Commit-Position: refs/heads/master@{#468033} Committed: https://chromium.googlesource.com/chromium/src/+/4c4914e6e841e18cfbc6d13ebb2ba38276aaff5f

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : windows compile error #

Patch Set 4 : add back NET_EXPORT_PRIVATE. #

Patch Set 5 : change NET_EXPORT_PRIVATE to SPDY_EXPORT_PRIVATE #

Total comments: 1

Patch Set 6 : remove cast to 0. #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+254 lines, -107 lines) Patch
M net/spdy/core/spdy_framer.h View 1 2 3 4 5 chunks +118 lines, -86 lines 0 comments Download
M net/spdy/core/spdy_framer.cc View 1 5 chunks +58 lines, -6 lines 11 comments Download
M net/spdy/core/spdy_framer_test.cc View 1 2 3 4 5 16 chunks +78 lines, -15 lines 0 comments Download

Messages

Total messages: 39 (29 generated)
Bence
Please note that new presubmit rules have just landed at https://crrev.com/2847613002 that will prevent you ...
3 years, 7 months ago (2017-04-28 12:52:24 UTC) #15
chromium-reviews
Thanks for the reminder. Will change it to the new macro. On Fri, Apr 28, ...
3 years, 7 months ago (2017-04-28 13:12:31 UTC) #16
yasong
On 2017/04/28 13:12:31, chromium-reviews wrote: > Thanks for the reminder. Will change it to the ...
3 years, 7 months ago (2017-04-28 14:28:54 UTC) #23
Bence
LGTM with nit. Thank you! https://codereview.chromium.org/2844083003/diff/80001/net/spdy/core/spdy_framer_test.cc File net/spdy/core/spdy_framer_test.cc (right): https://codereview.chromium.org/2844083003/diff/80001/net/spdy/core/spdy_framer_test.cc#newcode295 net/spdy/core/spdy_framer_test.cc:295: EXPECT_GT(it.NextFrame(&frame_list_buffer), (size_t)0); Could you ...
3 years, 7 months ago (2017-04-28 14:50:20 UTC) #24
yasong
On 2017/04/28 14:50:20, Bence wrote: > LGTM with nit. Thank you! > > https://codereview.chromium.org/2844083003/diff/80001/net/spdy/core/spdy_framer_test.cc > ...
3 years, 7 months ago (2017-04-28 14:57:57 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2844083003/100001
3 years, 7 months ago (2017-04-28 16:17:04 UTC) #32
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/chromium/src/+/4c4914e6e841e18cfbc6d13ebb2ba38276aaff5f
3 years, 7 months ago (2017-04-28 17:05:53 UTC) #35
Lei Zhang
https://codereview.chromium.org/2844083003/diff/100001/net/spdy/core/spdy_framer.cc File net/spdy/core/spdy_framer.cc (right): https://codereview.chromium.org/2844083003/diff/100001/net/spdy/core/spdy_framer.cc#newcode1797 net/spdy/core/spdy_framer.cc:1797: // TODO(yasong): remove all the down_casts. I don't see ...
3 years, 7 months ago (2017-05-04 21:22:47 UTC) #37
Bence
https://codereview.chromium.org/2844083003/diff/100001/net/spdy/core/spdy_framer.cc File net/spdy/core/spdy_framer.cc (right): https://codereview.chromium.org/2844083003/diff/100001/net/spdy/core/spdy_framer.cc#newcode1801 net/spdy/core/spdy_framer.cc:1801: std::unique_ptr<SpdyFrameSequence> result = nullptr; On 2017/05/04 21:22:46, Lei Zhang ...
3 years, 7 months ago (2017-05-09 18:27:52 UTC) #38
yasong
3 years, 7 months ago (2017-05-09 20:42:07 UTC) #39
Message was sent while issue was closed.
Thanks for the comments!

https://codereview.chromium.org/2844083003/diff/100001/net/spdy/core/spdy_fra...
File net/spdy/core/spdy_framer.cc (right):

https://codereview.chromium.org/2844083003/diff/100001/net/spdy/core/spdy_fra...
net/spdy/core/spdy_framer.cc:1797: // TODO(yasong): remove all the down_casts.
On 2017/05/04 21:22:46, Lei Zhang wrote:
> I don't see any down_casts?

Good catch! This code is merged from google3, and down_cast is changed to
static_cast, but this comment is missed.

https://codereview.chromium.org/2844083003/diff/100001/net/spdy/core/spdy_fra...
net/spdy/core/spdy_framer.cc:1801: std::unique_ptr<SpdyFrameSequence> result =
nullptr;
On 2017/05/09 18:27:51, Bence wrote:
> On 2017/05/04 21:22:46, Lei Zhang wrote:
> > You don't have to explicitly initialize std::unique_ptrs, but if that's the
> norm
> > in SPDY code, then ok.
> 
> Acknowledged.

Will be Fixed by cl/155545539.

https://codereview.chromium.org/2844083003/diff/100001/net/spdy/core/spdy_fra...
net/spdy/core/spdy_framer.cc:1805: result = nullptr;
On 2017/05/04 21:22:46, Lei Zhang wrote:
> Or further set them to nullptr when they already are.

Fixed by 155536594.

https://codereview.chromium.org/2844083003/diff/100001/net/spdy/core/spdy_fra...
net/spdy/core/spdy_framer.cc:1811:
base::WrapUnique(static_cast<SpdyHeadersIR*>(frame_ir.get())));
On 2017/05/09 18:27:51, Bence wrote:
> On 2017/05/04 21:22:46, Lei Zhang wrote:
> > Wait, how does this work? You can creating a new unique_ptr out of the raw
> > pointer in an existing unique_ptr? Doesn't this create double ownership?
> 
> Oops, good catch!  Thank you.

Fixed by 155536594.

Powered by Google App Engine
This is Rietveld 408576698