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

Issue 1320933003: Writeup summary of common netstack coding patterns. (Closed)

Created:
5 years, 3 months ago by Randy Smith (Not in Mondays)
Modified:
5 years, 3 months ago
CC:
cbentzel+watch_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Writeup summary of common netstack coding patterns. BUG= Committed: https://crrev.com/6c8f81939621e202bb3b4d8806382e9987bc7392 Cr-Commit-Position: refs/heads/master@{#350173}

Patch Set 1 #

Total comments: 20

Patch Set 2 : Incorporated Matt's comments. #

Total comments: 41

Patch Set 3 : Incorporated many comments. #

Total comments: 15

Patch Set 4 : Incorporate comments, discuss single threading in various forms. #

Total comments: 9

Patch Set 5 : Fixed typos, double spaces after periods, and clarified single/multiple events. #

Patch Set 6 : Cleanup pass. #

Total comments: 20

Patch Set 7 : Incorporated all comments, reflowed, and added examples. #

Total comments: 38

Patch Set 8 : Incorporated comments. #

Total comments: 2

Patch Set 9 : Resolve "resetting state machine" wording. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+241 lines, -0 lines) Patch
A net/docs/code-patterns.md View 1 2 3 4 5 6 7 8 1 chunk +240 lines, -0 lines 0 comments Download
M net/net.gypi View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 49 (10 generated)
Randy Smith (Not in Mondays)
Matt: Could you give me a reality check as to whether you think this is ...
5 years, 3 months ago (2015-08-27 20:47:42 UTC) #2
mmenke
On 2015/08/27 20:47:42, rdsmith wrote: > Matt: Could you give me a reality check as ...
5 years, 3 months ago (2015-08-28 15:09:21 UTC) #3
Randy Smith (Not in Mondays)
Fair enough. Charles, do you have an opinion? I'll note that I don't personally feel ...
5 years, 3 months ago (2015-08-28 15:48:26 UTC) #5
Charlie Harrison
On 2015/08/28 15:48:26, rdsmith wrote: > Fair enough. Charles, do you have an opinion? > ...
5 years, 3 months ago (2015-08-28 16:05:10 UTC) #6
mmenke
Some suggestions https://codereview.chromium.org/1320933003/diff/1/net/docs/code-patterns.md File net/docs/code-patterns.md (right): https://codereview.chromium.org/1320933003/diff/1/net/docs/code-patterns.md#newcode23 net/docs/code-patterns.md:23: successful return, with a zero return value ...
5 years, 3 months ago (2015-08-28 16:24:57 UTC) #7
Randy Smith (Not in Mondays)
Incorporated comments; PTAL? Charles, since you're already involved, would you be willing to do a ...
5 years, 3 months ago (2015-08-31 18:23:22 UTC) #8
Randy Smith (Not in Mondays)
On 2015/08/31 18:23:22, rdsmith wrote: > Incorporated comments; PTAL? > > Charles, since you're already ...
5 years, 3 months ago (2015-08-31 18:58:29 UTC) #9
Charlie Harrison
Nice explanations, just a few nitpicks. https://codereview.chromium.org/1320933003/diff/20001/net/docs/code-patterns.md File net/docs/code-patterns.md (right): https://codereview.chromium.org/1320933003/diff/20001/net/docs/code-patterns.md#newcode10 net/docs/code-patterns.md:10: depending on the ...
5 years, 3 months ago (2015-08-31 19:10:11 UTC) #10
asanka
https://codereview.chromium.org/1320933003/diff/20001/net/docs/code-patterns.md File net/docs/code-patterns.md (right): https://codereview.chromium.org/1320933003/diff/20001/net/docs/code-patterns.md#newcode8 net/docs/code-patterns.md:8: [net_error_list.h](https://chromium.googlesource.com/chromium/src/+blame/master/net/base/net_error_list.h#1)). Why is this a link to Git blame ...
5 years, 3 months ago (2015-08-31 19:20:02 UTC) #12
xunjieli
driving by https://codereview.chromium.org/1320933003/diff/1/net/docs/code-patterns.md File net/docs/code-patterns.md (right): https://codereview.chromium.org/1320933003/diff/1/net/docs/code-patterns.md#newcode8 net/docs/code-patterns.md:8: [net_error_list.h](https://chromium.googlesource.com/chromium/src/+blame/master/net/base/net_error_list.h#1)). I find it easier to read ...
5 years, 3 months ago (2015-08-31 19:29:32 UTC) #14
Ryan Sleevi
https://codereview.chromium.org/1320933003/diff/20001/net/docs/code-patterns.md File net/docs/code-patterns.md (right): https://codereview.chromium.org/1320933003/diff/20001/net/docs/code-patterns.md#newcode10 net/docs/code-patterns.md:10: depending on the context. This data union is generally ...
5 years, 3 months ago (2015-08-31 19:38:47 UTC) #16
mmenke
https://codereview.chromium.org/1320933003/diff/20001/net/docs/code-patterns.md File net/docs/code-patterns.md (right): https://codereview.chromium.org/1320933003/diff/20001/net/docs/code-patterns.md#newcode10 net/docs/code-patterns.md:10: depending on the context. This data union is generally ...
5 years, 3 months ago (2015-08-31 19:52:01 UTC) #17
davidben
https://codereview.chromium.org/1320933003/diff/20001/net/docs/code-patterns.md File net/docs/code-patterns.md (right): https://codereview.chromium.org/1320933003/diff/20001/net/docs/code-patterns.md#newcode86 net/docs/code-patterns.md:86: do the appropriate state transition. I think I might ...
5 years, 3 months ago (2015-08-31 19:59:14 UTC) #19
davidben
(Oh, it seems a lot of people said stuff while I was typing. It's possible ...
5 years, 3 months ago (2015-08-31 19:59:59 UTC) #20
Randy Smith (Not in Mondays)
Comments incorporated. Specific thanks to David and Ryan, who've taught me things I didn't know ...
5 years, 3 months ago (2015-08-31 21:55:06 UTC) #21
mmenke
https://codereview.chromium.org/1320933003/diff/20001/net/docs/code-patterns.md File net/docs/code-patterns.md (right): https://codereview.chromium.org/1320933003/diff/20001/net/docs/code-patterns.md#newcode10 net/docs/code-patterns.md:10: depending on the context. This data union is generally ...
5 years, 3 months ago (2015-08-31 21:59:20 UTC) #22
Ryan Sleevi
https://codereview.chromium.org/1320933003/diff/20001/net/docs/code-patterns.md File net/docs/code-patterns.md (right): https://codereview.chromium.org/1320933003/diff/20001/net/docs/code-patterns.md#newcode28 net/docs/code-patterns.md:28: * If the return value is the special value ...
5 years, 3 months ago (2015-08-31 22:17:43 UTC) #23
davidben
https://codereview.chromium.org/1320933003/diff/20001/net/docs/code-patterns.md File net/docs/code-patterns.md (right): https://codereview.chromium.org/1320933003/diff/20001/net/docs/code-patterns.md#newcode86 net/docs/code-patterns.md:86: do the appropriate state transition. On 2015/08/31 21:55:06, rdsmith ...
5 years, 3 months ago (2015-08-31 22:19:35 UTC) #24
Randy Smith (Not in Mondays)
Another round of comments incorporated; PTAL? Matt, Ryan: Based on an extended conversation with David, ...
5 years, 3 months ago (2015-09-02 02:32:29 UTC) #25
mmenke
https://codereview.chromium.org/1320933003/diff/60001/net/docs/code-patterns.md File net/docs/code-patterns.md (right): https://codereview.chromium.org/1320933003/diff/60001/net/docs/code-patterns.md#newcode47 net/docs/code-patterns.md:47: is reset of completed and the consumer notified. reset ...
5 years, 3 months ago (2015-09-02 16:41:17 UTC) #27
mmenke
https://codereview.chromium.org/1320933003/diff/60001/net/docs/code-patterns.md File net/docs/code-patterns.md (right): https://codereview.chromium.org/1320933003/diff/60001/net/docs/code-patterns.md#newcode98 net/docs/code-patterns.md:98: calling one of its methods. While the operation that ...
5 years, 3 months ago (2015-09-02 16:43:05 UTC) #28
Ryan Sleevi
After re-reading all of this, mod the two space issues/trailing whitespace, it LGTM :) https://codereview.chromium.org/1320933003/diff/40001/net/docs/code-patterns.md ...
5 years, 3 months ago (2015-09-02 19:14:56 UTC) #29
Randy Smith (Not in Mondays)
Thanks, Ryan! And yes, coffee at the next all-hands. Or maybe alcohol; coffee may be ...
5 years, 3 months ago (2015-09-02 20:25:54 UTC) #31
mmenke
https://codereview.chromium.org/1320933003/diff/60001/net/docs/code-patterns.md File net/docs/code-patterns.md (right): https://codereview.chromium.org/1320933003/diff/60001/net/docs/code-patterns.md#newcode143 net/docs/code-patterns.md:143: * The DoLoop pattern has no concept of events; ...
5 years, 3 months ago (2015-09-02 20:31:29 UTC) #32
Randy Smith (Not in Mondays)
On 2015/09/02 20:31:29, mmenke wrote: > https://codereview.chromium.org/1320933003/diff/60001/net/docs/code-patterns.md > File net/docs/code-patterns.md (right): > > https://codereview.chromium.org/1320933003/diff/60001/net/docs/code-patterns.md#newcode143 > ...
5 years, 3 months ago (2015-09-02 21:08:16 UTC) #33
davidben
(Just another quick drive-by comment; I mostly just skimmed the new version, not looked at ...
5 years, 3 months ago (2015-09-02 21:37:03 UTC) #34
mmenke
On 2015/09/02 21:08:16, rdsmith wrote: > On 2015/09/02 20:31:29, mmenke wrote: > > > https://codereview.chromium.org/1320933003/diff/60001/net/docs/code-patterns.md ...
5 years, 3 months ago (2015-09-02 21:53:13 UTC) #35
mmenke
On 2015/09/02 21:53:13, mmenke wrote: > On 2015/09/02 21:08:16, rdsmith wrote: > > On 2015/09/02 ...
5 years, 3 months ago (2015-09-02 21:53:54 UTC) #36
asanka
https://codereview.chromium.org/1320933003/diff/120001/net/docs/code-patterns.md File net/docs/code-patterns.md (right): https://codereview.chromium.org/1320933003/diff/120001/net/docs/code-patterns.md#newcode8 net/docs/code-patterns.md:8: [net_error_list.h](https://chromium.googlesource.com/chromium/src/+/master/net/base/net_error_list.h#1)). Minor nit: I'd +1 Helen's suggestion to break ...
5 years, 3 months ago (2015-09-04 14:51:04 UTC) #37
Charlie Harrison
On 2015/09/04 14:51:04, asanka (On leave) wrote: > https://codereview.chromium.org/1320933003/diff/120001/net/docs/code-patterns.md > File net/docs/code-patterns.md (right): > > ...
5 years, 3 months ago (2015-09-04 18:59:15 UTC) #38
Randy Smith (Not in Mondays)
Helen: Sorry, I'm not sure how I missed your comments until Asanka pointed them out. ...
5 years, 3 months ago (2015-09-18 22:06:33 UTC) #39
mmenke
LGTM https://codereview.chromium.org/1320933003/diff/140001/net/docs/code-patterns.md File net/docs/code-patterns.md (right): https://codereview.chromium.org/1320933003/diff/140001/net/docs/code-patterns.md#newcode13 net/docs/code-patterns.md:13: Many functions also have variables (often named `result`) ...
5 years, 3 months ago (2015-09-21 19:46:28 UTC) #40
asanka
lgtm https://codereview.chromium.org/1320933003/diff/140001/net/docs/code-patterns.md File net/docs/code-patterns.md (right): https://codereview.chromium.org/1320933003/diff/140001/net/docs/code-patterns.md#newcode8 net/docs/code-patterns.md:8: [net_error_list.h] [net_error_list.h]). You can shorten this to [net_error_list.h][] ...
5 years, 3 months ago (2015-09-21 20:31:01 UTC) #41
Randy Smith (Not in Mondays)
Thanks, Matt and Asanka! Holding off landing for one final go-round with Matt on the ...
5 years, 3 months ago (2015-09-22 01:38:22 UTC) #42
mmenke
https://codereview.chromium.org/1320933003/diff/160001/net/docs/code-patterns.md File net/docs/code-patterns.md (right): https://codereview.chromium.org/1320933003/diff/160001/net/docs/code-patterns.md#newcode49 net/docs/code-patterns.md:49: next consumer operation, or the legality of that operation. ...
5 years, 3 months ago (2015-09-22 14:44:49 UTC) #43
Randy Smith (Not in Mondays)
Thanks for the feedback! Accepted, and landing. https://codereview.chromium.org/1320933003/diff/160001/net/docs/code-patterns.md File net/docs/code-patterns.md (right): https://codereview.chromium.org/1320933003/diff/160001/net/docs/code-patterns.md#newcode49 net/docs/code-patterns.md:49: next consumer ...
5 years, 3 months ago (2015-09-22 15:22:48 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1320933003/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1320933003/180001
5 years, 3 months ago (2015-09-22 15:23:08 UTC) #47
commit-bot: I haz the power
Committed patchset #9 (id:180001)
5 years, 3 months ago (2015-09-22 16:52:13 UTC) #48
commit-bot: I haz the power
5 years, 3 months ago (2015-09-22 16:53:05 UTC) #49
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/6c8f81939621e202bb3b4d8806382e9987bc7392
Cr-Commit-Position: refs/heads/master@{#350173}

Powered by Google App Engine
This is Rietveld 408576698