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

Issue 10244001: Creation of ByteStream class. (Closed)

Created:
8 years, 8 months ago by Randy Smith (Not in Mondays)
Modified:
8 years, 7 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, rdsmith+dwatch_chromium.org, satorux1, zel
Visibility:
Public.

Description

Creation of ByteStream class. ByteStream is an abstraction of a zero copy transfer of bytes between threads, along with an error indicator upon completion. Data is explicitly pushed into or pulled out of the stream, and source and destination may register for callbacks to be called when there is room/data in the pipe. A ByteStream object is owned in common by the source and destination of the stream, and is destroyed when both source and destination drop references to it. BUG=125250 R=willchan@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=138504

Patch Set 1 #

Patch Set 2 : Cleaned up header comments. #

Total comments: 2

Patch Set 3 : #

Patch Set 4 : Rewrite using message passing and not exposing RefCount. #

Patch Set 5 : Added stats, tweaked names, and made buffer owned in transfer. #

Patch Set 6 : Finished and polished rewrite. #

Total comments: 7

Patch Set 7 : Incorporated (some) comments. #

Total comments: 4

Patch Set 8 : Incorporated comments and fixed a few callback problems. #

Total comments: 48

Patch Set 9 : Incorporated comments. #

Total comments: 6

Patch Set 10 : Incorporated comments. #

Patch Set 11 : Fixed bug with zero length writes. #

Total comments: 6

Patch Set 12 : Incorporated non-template suggestions. #

Patch Set 13 : Rebased to LKGR. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1171 lines, -0 lines) Patch
A content/browser/download/byte_stream.h View 1 2 3 4 5 6 7 8 1 chunk +124 lines, -0 lines 0 comments Download
A content/browser/download/byte_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +440 lines, -0 lines 0 comments Download
A content/browser/download/byte_stream_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +604 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 51 (0 generated)
Randy Smith (Not in Mondays)
Will, would you be willing to take a look at this? I'm asking you primarily ...
8 years, 8 months ago (2012-04-26 22:36:40 UTC) #1
willchan no longer on Chromium
I think I see why you are using refcounting. You are sharing the same object ...
8 years, 8 months ago (2012-04-27 21:22:29 UTC) #2
Randy Smith (Not in Mondays)
On 2012/04/27 21:22:29, willchan wrote: > I think I see why you are using refcounting. ...
8 years, 8 months ago (2012-04-27 21:57:20 UTC) #3
willchan no longer on Chromium
On Fri, Apr 27, 2012 at 2:57 PM, <rdsmith@chromium.org> wrote: > On 2012/04/27 21:22:29, willchan ...
8 years, 8 months ago (2012-04-27 22:54:21 UTC) #4
Randy Smith (Not in Mondays)
On 2012/04/27 22:54:21, willchan wrote: > On Fri, Apr 27, 2012 at 2:57 PM, <mailto:rdsmith@chromium.org> ...
8 years, 8 months ago (2012-04-27 23:42:33 UTC) #5
Randy Smith (Not in Mondays)
Will: Willing to take a scan through this and tell me what you think? This ...
8 years, 7 months ago (2012-05-03 21:30:00 UTC) #6
Randy Smith (Not in Mondays)
Will: I've finished the rewrite and am ready for a real review. WDYT? (Side question, ...
8 years, 7 months ago (2012-05-04 18:52:50 UTC) #7
willchan no longer on Chromium
Totally would satisfy readability. Sorry, I'm getting DDoS'd by code reviews. On Fri, May 4, ...
8 years, 7 months ago (2012-05-04 18:53:44 UTC) #8
Randy Smith (Not in Mondays)
On 2012/05/04 18:53:44, willchan wrote: > Totally would satisfy readability. Sorry, I'm getting DDoS'd by ...
8 years, 7 months ago (2012-05-04 20:21:34 UTC) #9
willchan no longer on Chromium
I'm won't be in SFO this week. http://codereview.chromium.org/10244001/diff/17002/content/browser/download/byte_stream.h File content/browser/download/byte_stream.h (right): http://codereview.chromium.org/10244001/diff/17002/content/browser/download/byte_stream.h#newcode61 content/browser/download/byte_stream.h:61: public: I'm ...
8 years, 7 months ago (2012-05-07 23:08:51 UTC) #10
Randy Smith (Not in Mondays)
> I'm won't be in SFO this week. And you're not even taking advantage of ...
8 years, 7 months ago (2012-05-07 23:26:00 UTC) #11
Randy Smith (Not in Mondays)
http://codereview.chromium.org/10244001/diff/17002/content/browser/download/byte_stream.h File content/browser/download/byte_stream.h (right): http://codereview.chromium.org/10244001/diff/17002/content/browser/download/byte_stream.h#newcode61 content/browser/download/byte_stream.h:61: public: On 2012/05/07 23:26:01, rdsmith wrote: > My instinct ...
8 years, 7 months ago (2012-05-08 05:27:04 UTC) #12
Randy Smith (Not in Mondays)
Will: Not having heard back from you, I suited myself as to which of your ...
8 years, 7 months ago (2012-05-09 21:47:53 UTC) #13
willchan no longer on Chromium
Remember that what you have doesn't really have any specific reason to be tied to ...
8 years, 7 months ago (2012-05-10 20:31:39 UTC) #14
Randy Smith (Not in Mondays)
[CCing Satoru-san for his perspective on the abstraction, as the obvious other possible consumer. ] ...
8 years, 7 months ago (2012-05-11 14:51:05 UTC) #15
Randy Smith (Not in Mondays)
Sorry, one followup which my response was based on but that I didn't say explicitly: ...
8 years, 7 months ago (2012-05-11 15:14:21 UTC) #16
satorux1
Randy, thank you for adding me. I'll take a look. +achuith and +zelidrag who would ...
8 years, 7 months ago (2012-05-11 16:47:56 UTC) #17
Randy Smith (Not in Mondays)
Quick summary for Satoru-san and anyone else who's tracking: Will and I had a long ...
8 years, 7 months ago (2012-05-15 18:21:39 UTC) #18
willchan no longer on Chromium
I'm fine with this interface given the caveats that rdsmith already listed. I'm curious to ...
8 years, 7 months ago (2012-05-15 19:41:32 UTC) #19
Randy Smith (Not in Mondays)
Will's comments incorporated; Will you're welcome to re-review or not as you wish. Satoru-san: You're ...
8 years, 7 months ago (2012-05-15 22:53:25 UTC) #20
Randy Smith (Not in Mondays)
Arggh. Really truly adding Ben as reviewer this time.
8 years, 7 months ago (2012-05-15 22:53:54 UTC) #21
achuithb
My concern about this approach for handling drive download+upload is with respect to flow control. ...
8 years, 7 months ago (2012-05-15 23:05:42 UTC) #22
satorux1
I'm swapmed by random m20 issues now, so please don't want for my comments. achuith, ...
8 years, 7 months ago (2012-05-15 23:05:43 UTC) #23
achuithb
On 2012/05/15 23:05:43, satorux1 wrote: > I'm swapmed by random m20 issues now, so please ...
8 years, 7 months ago (2012-05-15 23:06:06 UTC) #24
Randy Smith (Not in Mondays)
On 2012/05/15 23:05:42, achuith.bhandarkar wrote: > My concern about this approach for handling drive download+upload ...
8 years, 7 months ago (2012-05-15 23:50:03 UTC) #25
benjhayden
nits. I probably won't have any comments about the architecture. http://codereview.chromium.org/10244001/diff/17008/content/browser/download/byte_stream.cc File content/browser/download/byte_stream.cc (right): http://codereview.chromium.org/10244001/diff/17008/content/browser/download/byte_stream.cc#newcode15 ...
8 years, 7 months ago (2012-05-16 14:26:24 UTC) #26
benjhayden
more nits http://codereview.chromium.org/10244001/diff/17008/content/browser/download/byte_stream.cc File content/browser/download/byte_stream.cc (right): http://codereview.chromium.org/10244001/diff/17008/content/browser/download/byte_stream.cc#newcode230 content/browser/download/byte_stream.cc:230: No blank lines at beginning/ends of blocks. ...
8 years, 7 months ago (2012-05-16 15:41:13 UTC) #27
benjhayden
two more ideas http://codereview.chromium.org/10244001/diff/17008/content/browser/download/byte_stream_unittest.cc File content/browser/download/byte_stream_unittest.cc (right): http://codereview.chromium.org/10244001/diff/17008/content/browser/download/byte_stream_unittest.cc#newcode61 content/browser/download/byte_stream_unittest.cc:61: void NullCallback() { Would something like ...
8 years, 7 months ago (2012-05-16 15:55:56 UTC) #28
benjhayden
Implementation architecture looks good. Are you planning on just changing all IOBuffers to scoped_ptr_array<char>s or ...
8 years, 7 months ago (2012-05-16 19:17:21 UTC) #29
Randy Smith (Not in Mondays)
> Are you planning on just changing all IOBuffers to scoped_ptr_array<char>s or > something more ...
8 years, 7 months ago (2012-05-16 20:30:15 UTC) #30
benjhayden
http://codereview.chromium.org/10244001/diff/26009/content/browser/download/byte_stream.cc File content/browser/download/byte_stream.cc (right): http://codereview.chromium.org/10244001/diff/26009/content/browser/download/byte_stream.cc#newcode142 content/browser/download/byte_stream.cc:142: void TransferDataMethod( Sounds like you're transferring something called a ...
8 years, 7 months ago (2012-05-16 21:11:02 UTC) #31
Randy Smith (Not in Mondays)
http://codereview.chromium.org/10244001/diff/26009/content/browser/download/byte_stream.cc File content/browser/download/byte_stream.cc (right): http://codereview.chromium.org/10244001/diff/26009/content/browser/download/byte_stream.cc#newcode142 content/browser/download/byte_stream.cc:142: void TransferDataMethod( On 2012/05/16 21:11:04, benjhayden_chromium wrote: > Sounds ...
8 years, 7 months ago (2012-05-17 18:24:32 UTC) #32
Randy Smith (Not in Mondays)
Uploaded a bug fix.
8 years, 7 months ago (2012-05-17 19:12:46 UTC) #33
Randy Smith (Not in Mondays)
Avi: Can I have a rubberstamp for the .gypi files? (I don't yet have the ...
8 years, 7 months ago (2012-05-18 13:58:24 UTC) #34
Randy Smith (Not in Mondays)
[Apologies for the duplication. ] Avi, may I have a rubberstamp content OWNER ok for ...
8 years, 7 months ago (2012-05-18 13:59:14 UTC) #35
benjhayden
Probably last round. http://codereview.chromium.org/10244001/diff/34003/content/browser/download/byte_stream.cc File content/browser/download/byte_stream.cc (right): http://codereview.chromium.org/10244001/diff/34003/content/browser/download/byte_stream.cc#newcode49 content/browser/download/byte_stream.cc:49: // happen in the context of ...
8 years, 7 months ago (2012-05-18 14:21:06 UTC) #36
Avi (use Gerrit)
lgtm for gypi
8 years, 7 months ago (2012-05-18 15:05:54 UTC) #37
Randy Smith (Not in Mondays)
http://codereview.chromium.org/10244001/diff/34003/content/browser/download/byte_stream.cc File content/browser/download/byte_stream.cc (right): http://codereview.chromium.org/10244001/diff/34003/content/browser/download/byte_stream.cc#newcode49 content/browser/download/byte_stream.cc:49: // happen in the context of their SequencedTaskRunner. On ...
8 years, 7 months ago (2012-05-18 21:55:12 UTC) #38
benjhayden
lgtm
8 years, 7 months ago (2012-05-19 19:47:13 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rdsmith@chromium.org/10244001/39002
8 years, 7 months ago (2012-05-21 17:01:30 UTC) #40
commit-bot: I haz the power
Try job failure for 10244001-39002 (retry) on win for step "update" (clobber build). It's a ...
8 years, 7 months ago (2012-05-21 17:37:53 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rdsmith@chromium.org/10244001/40004
8 years, 7 months ago (2012-05-21 18:46:53 UTC) #42
commit-bot: I haz the power
Try job failure for 10244001-40004 (retry) on win for step "compile" (clobber build). It's a ...
8 years, 7 months ago (2012-05-21 19:14:12 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rdsmith@chromium.org/10244001/40004
8 years, 7 months ago (2012-05-21 19:50:08 UTC) #44
commit-bot: I haz the power
Try job failure for 10244001-40004 on win for step "update". http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win&number=12439 Step "update" is always ...
8 years, 7 months ago (2012-05-21 20:17:49 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rdsmith@chromium.org/10244001/40004
8 years, 7 months ago (2012-05-22 14:34:32 UTC) #46
commit-bot: I haz the power
Try job failure for 10244001-40004 (retry) on win_rel for steps "base_unittests, unit_tests, sync_unit_tests" (clobber build). ...
8 years, 7 months ago (2012-05-22 18:46:41 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rdsmith@chromium.org/10244001/40004
8 years, 7 months ago (2012-05-22 18:51:59 UTC) #48
commit-bot: I haz the power
The commit queue went berserk retrying too often for a seemingly flaky test. Builder is ...
8 years, 7 months ago (2012-05-23 01:30:36 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rdsmith@chromium.org/10244001/40004
8 years, 7 months ago (2012-05-23 15:04:13 UTC) #50
commit-bot: I haz the power
8 years, 7 months ago (2012-05-23 17:11:52 UTC) #51
Change committed as 138504

Powered by Google App Engine
This is Rietveld 408576698