Chromium Code Reviews

Issue 341032: Rename PrioritizedIOBuffer to FlipIOBuffer, refactor it into... (Closed)

Created:
11 years, 1 month ago by Mike Belshe
Modified:
9 years, 5 months ago
Reviewers:
wtc
CC:
chromium-reviews_googlegroups.com, darin (slow to review)
Visibility:
Public.

Description

Rename PrioritizedIOBuffer to FlipIOBuffer, refactor it into its own file, and have it carry a FlipStream pointer. The PrioritizedIOBuffer was more generic, but after we queued IO, we couldn't track which stream should be notified about the IO completion. Having it carry the FlipStream pointer will enable IO tracking, but with a FlipStream pointer, it is really specific to Flip, so I renamed to FlipIOBuffer. I could have kept a generic (void*) pointer (or used a template), but that seemed unnecessary in this case. This CL just changes the refactoring. Will remove the PrioritizedIOBuffer next. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=30514

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 16

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Stats (+74 lines, -0 lines)
A net/flip/flip_io_buffer.h View 1 chunk +59 lines, -0 lines 0 comments
A net/flip/flip_io_buffer.cc View 1 chunk +13 lines, -0 lines 0 comments
M net/net.gyp View 1 chunk +2 lines, -0 lines 0 comments

Messages

Total messages: 4 (0 generated)
Mike Belshe
11 years, 1 month ago (2009-10-29 09:06:49 UTC) #1
wtc
LGTM. Note in particular the potential overflow/wraparound issue with the static int order_ member below. ...
11 years, 1 month ago (2009-10-29 16:51:38 UTC) #2
Mike Belshe
http://codereview.chromium.org/341032/diff/2002/2005 File net/flip/flip_io_buffer.h (right): http://codereview.chromium.org/341032/diff/2002/2005#newcode8 Line 8: #include "base/scoped_ptr.h" On 2009/10/29 16:51:39, wtc wrote: > ...
11 years, 1 month ago (2009-10-29 19:35:36 UTC) #3
wtc
11 years, 1 month ago (2009-10-30 01:00:53 UTC) #4
LGTM.

http://codereview.chromium.org/341032/diff/2002/2005
File net/flip/flip_io_buffer.h (right):

http://codereview.chromium.org/341032/diff/2002/2005#newcode45
Line 45: return position_ >= other.position_;
On 2009/10/29 19:35:36, Mike Belshe wrote:
> It doesn't matter.  Changed because it reads more clearly.

I'm worried that the original code will cause
  buffer_a < buffer_a
(i.e., comparing a buffer with itself) to return true,
which would be wrong.  The new code eliminates this
concern.

Powered by Google App Engine