summaryrefslogtreecommitdiffstats
path: root/net/flip/flip_io_buffer.h
Commit message (Collapse)AuthorAgeFilesLines
* Reland: Fix the FlipSession to support partial writes.mbelshe@google.com2009-11-291-3/+4
| | | | | | | | | | | | | | | | | Modified the FlipIOBuffer to use a DrainableIOBuffer instead of a IOBufferWithSize. When a write completes, we drain the bytes, and only fetch the next FlipFrame from the queue after we have fully drained the buffer. I will update the tests to be much more thorough in my next CL. BUG=none TEST=FlipNetworkTransactionTest.PartialWrites Review URL: http://codereview.chromium.org/451002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33250 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 33073 - Reland 33018:mbelshe@google.com2009-11-251-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Fix the FlipSession to support partial writes. Modified the FlipIOBuffer to use a DrainableIOBuffer instead of a IOBufferWithSize. When a write completes, we drain the bytes, and only fetch the next FlipFrame from the queue after we have fully drained the buffer. I will update the tests to be much more thorough in my next CL. BUG=none TEST=FlipNetworkTransactionTest.PartialWrites Review URL: http://codereview.chromium.org/436019 Review URL: http://codereview.chromium.org/434065 TBR=mbelshe@google.com Review URL: http://codereview.chromium.org/443003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33076 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 33018:mbelshe@google.com2009-11-251-3/+4
| | | | | | | | | | | | | | | | | | | | | | Fix the FlipSession to support partial writes. Modified the FlipIOBuffer to use a DrainableIOBuffer instead of a IOBufferWithSize. When a write completes, we drain the bytes, and only fetch the next FlipFrame from the queue after we have fully drained the buffer. I will update the tests to be much more thorough in my next CL. BUG=none TEST=FlipNetworkTransactionTest.PartialWrites Review URL: http://codereview.chromium.org/436019 Review URL: http://codereview.chromium.org/434065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33073 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 33018 - Fix the FlipSession to support partial writes.laforge@chromium.org2009-11-251-4/+3
| | | | | | | | | | | | | | | | | | | | Modified the FlipIOBuffer to use a DrainableIOBuffer instead of a IOBufferWithSize. When a write completes, we drain the bytes, and only fetch the next FlipFrame from the queue after we have fully drained the buffer. I will update the tests to be much more thorough in my next CL. BUG=none TEST=FlipNetworkTransactionTest.PartialWrites Review URL: http://codereview.chromium.org/436019 TBR=mbelshe@google.com Review URL: http://codereview.chromium.org/440011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33020 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the FlipSession to support partial writes.mbelshe@google.com2009-11-251-3/+4
| | | | | | | | | | | | | | | | | Modified the FlipIOBuffer to use a DrainableIOBuffer instead of a IOBufferWithSize. When a write completes, we drain the bytes, and only fetch the next FlipFrame from the queue after we have fully drained the buffer. I will update the tests to be much more thorough in my next CL. BUG=none TEST=FlipNetworkTransactionTest.PartialWrites Review URL: http://codereview.chromium.org/436019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33018 0039d316-1c4b-4281-b951-d872f2087c98
* Flip: Fix a bunch of leaks.willchan@chromium.org2009-11-241-4/+1
| | | | | | | | | | | | FlipIOBuffer::release() was broken. It called release() on scoped_refptrs which does not decrease refcount, hence it leaked IOBuffers and FlipStreams. Redo the memory management for FlipSession. Stop using raw pointers in FlipSessionPool to hold onto FlipSession. FlipSessionPool uses scoped_refptr now to track Fli pSessions. Instead of having FlipSession call Release() on itself, it now calls FlipSessionPool to remove itself from the pool when the tcp connection is closed. In FlipStreamTest, manually call FlipSessionPool::Remove() since there is no tcp connection event to trigger FlipSession to remove itself. BUG=http://crbug.com/28493 Review URL: http://codereview.chromium.org/438014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32945 0039d316-1c4b-4281-b951-d872f2087c98
* Flip: Merge FlipStreamParser and FlipStream. Eliminate FlipDelegate.willchan@chromium.org2009-11-221-11/+9
| | | | | | | | | | | | | | FlipStream now conceptually contains everything associated with a single Flip stream. This primarily consists of 2 things: (1) FlipStream as a consumer of network events from FlipSession (2) FlipStream as a network provider to consumers (such as FlipNetworkTransaction). Conceptually, FlipStream also should be agnostic of wire level protocol framing details, only dealing with HTTP style headers and responses. Anything wire level has been moved out of FlipStream into FlipSession. FlipStream is now reference counted since it is referenced by both the FlipSession and the consumer (only FlipNetworkTransaction currently). FlipNetworkTransaction can be cancelled prior to all network events finishing up, therefore the code needs to handle this gracefully. FlipStream supports a Cancel() function for this reason. FlipStream now communicates with consumers via CompletionCallbacks rather than using FlipDelegates. Review URL: http://codereview.chromium.org/410006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32765 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Coverity defects in the FLIP code.wtc@chromium.org2009-11-121-1/+1
| | | | | | | | | | | | | CID=6816 PASS_BY_VALUE CID=6817 PASS_BY_VALUE CID=7523 UNINIT_CTOR R=mbelshe BUG=none TEST=none Review URL: http://codereview.chromium.org/392012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31828 0039d316-1c4b-4281-b951-d872f2087c98
* Rename PrioritizedIOBuffer to FlipIOBuffer, refactor it intombelshe@google.com2009-10-291-0/+59
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 Review URL: http://codereview.chromium.org/341032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30514 0039d316-1c4b-4281-b951-d872f2087c98