summaryrefslogtreecommitdiffstats
path: root/net/flip
Commit message (Collapse)AuthorAgeFilesLines
* Currently the code will recursively call betweenmbelshe@chromium.org2010-01-191-5/+6
| | | | | | | | | | | | | | | | | | | ReadSocket() OnReadComplete() ReadSocket() ... as long as the reads are completing synchronously. This is not a huge problem, but avoiding recursion offsers some robustness and avoids stack blowouts. BUG=none TEST=none Review URL: http://codereview.chromium.org/546071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36553 0039d316-1c4b-4281-b951-d872f2087c98
* Remove accidental checkin which was in flip_session.cc.mbelshe@google.com2010-01-111-4/+1
| | | | | | | | | | | BUG=none TEST=none TBR=jar@chromium.org Review URL: http://codereview.chromium.org/542015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35945 0039d316-1c4b-4281-b951-d872f2087c98
* Enable JS detection of whether SPDY was used to load a web page.mbelshe@google.com2010-01-112-5/+13
| | | | | | | | | | | | Augments the loadTimes() API with a new field, "wasFetchedViaSpdy". BUG=31615 TEST=flip_network_transaction_unittest Review URL: http://codereview.chromium.org/518039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35943 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup the FlipSession GetLoadState to be more specific.mbelshe@google.com2010-01-071-2/+12
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/515039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35715 0039d316-1c4b-4281-b951-d872f2087c98
* Add histograms for measuring stream performance.mbelshe@google.com2009-12-282-1/+53
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/519005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35293 0039d316-1c4b-4281-b951-d872f2087c98
* Add histograms for tracking session utilization.mbelshe@google.com2009-12-272-4/+38
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/523004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35292 0039d316-1c4b-4281-b951-d872f2087c98
* Several fixes to the Net.ConnectionTypeCount histogram.mbelshe@google.com2009-12-242-0/+10
| | | | | | | | | | | | | | | | | | * Previously, the "CONNECTION_ANY" was incorrectly recorded. It was recording every Http *transaction*, not every Http connection. * The histogram was vague about whether it was tracking successful or unsuccessful connections. In fact, it was recording all SSL connections (fail or success), and yet only successful HTTP connections. Modified to only apply to successful connections. * Added a Net.ConnectionTypeFailCount histogram which counts the number of failed connections by type. BUG=none TEST=none Review URL: http://codereview.chromium.org/519002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35264 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash with CancelStream. The stream didn't informmbelshe@chromium.org2009-12-213-16/+26
| | | | | | | | | | | | | | | the FlipSession, and the FlipSession continued to try to notify the stream of new data. Also re-enable the CancelTransaction test, which did catch the crash. BUG=none TEST=FlipNetworkTransactionTest.CancelTransaction Review URL: http://codereview.chromium.org/506062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35106 0039d316-1c4b-4281-b951-d872f2087c98
* Extend LoadLog to support logging of arbitrary strings, and of network error ↵eroman@chromium.org2009-12-211-1/+1
| | | | | | | | | | | | | | codes. - The logging of error codes is intended to be used in passive mode. - The logging of string messages is intended to be used when in full-logging mode. - The logging of string literal messages is intended to be used in passive mode. BUG=27552 Review URL: http://codereview.chromium.org/503066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35103 0039d316-1c4b-4281-b951-d872f2087c98
* SPDY: Enable SPDY via NPN.willchan@chromium.org2009-12-216-30/+61
| | | | | | | | | | Add a new flip option: "npn". --use-flip=npn to activate. Allows for negotiation of SPDY via SSL for https urls. Checks for the existence of existing SPDY sessions and reuses them where possible. Review URL: http://codereview.chromium.org/500088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35099 0039d316-1c4b-4281-b951-d872f2087c98
* Pass the LoadLog through the FlipStream.mbelshe@google.com2009-12-187-24/+113
| | | | | | | | | BUG=none TEST=FlipNetworkTransactionTest.LoadLog Review URL: http://codereview.chromium.org/500083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34920 0039d316-1c4b-4281-b951-d872f2087c98
* Increase read buffer size to 32KB for the flip session.mbelshe@chromium.org2009-12-171-1/+1
| | | | | | | | | | | This was artificially low for no real reason. BUG=none TEST=none Review URL: http://codereview.chromium.org/505028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34873 0039d316-1c4b-4281-b951-d872f2087c98
* Make the transactions own the HttpResponseInfo.willchan@chromium.org2009-12-165-12/+21
| | | | | | | | Necessary since we need the SSLInfo to handle certificate errors, but it lives within the HttpResponseInfo. SSL is before we choose http or spdy, so we don't have an http stream or a spdy stream yet, so they cannot own the HttpResponseInfo. Review URL: http://codereview.chromium.org/500039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34773 0039d316-1c4b-4281-b951-d872f2087c98
* Flip: Comma delimit the various flip options. Redo the fixed testing server ↵willchan@chromium.org2009-12-152-0/+10
| | | | | | | | | | flags. Renames --testing-fixed-server to --testing-fixed-host. Adds --testing-fixed-http-port and --testing-fixed-https-port. Review URL: http://codereview.chromium.org/501032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34624 0039d316-1c4b-4281-b951-d872f2087c98
* If the server closes the connection and we're aborting streams,mbelshe@google.com2009-12-102-9/+16
| | | | | | | | | | | | we need to inform the stream of the error so that we don't continue processing through the loop. BUG=none TEST=none Review URL: http://codereview.chromium.org/479013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34260 0039d316-1c4b-4281-b951-d872f2087c98
* FlipSession should save the SSLInfo in the HttpResponseInfo beforewtc@chromium.org2009-12-092-1/+19
| | | | | | | | | | | | | passing the HttpResponseInfo (containing the response headers) to FlipStream. R=mbelshe BUG=none TEST=The DCHECK in GetCertID() in resource_dispatcher_host.cc should not fail when you visit an HTTPS site using SPDY. Review URL: http://codereview.chromium.org/471007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34169 0039d316-1c4b-4281-b951-d872f2087c98
* Fix build with use_system_zlib=1agl@chromium.org2009-12-081-0/+4
| | | | | | http://codereview.chromium.org/469018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34067 0039d316-1c4b-4281-b951-d872f2087c98
* Flip: Add LoadLog for TCP connect().willchan@chromium.org2009-12-073-4/+9
| | | | | | Review URL: http://codereview.chromium.org/460113 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34000 0039d316-1c4b-4281-b951-d872f2087c98
* Disabled ConnectFailure test due to flaky valgrind failures.willchan@chromium.org2009-12-051-1/+3
| | | | | | | | BUG=29471 Review URL: http://codereview.chromium.org/467031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33909 0039d316-1c4b-4281-b951-d872f2087c98
* Enable LoadLog for Flip. Improve some LOG messages.willchan@chromium.org2009-12-043-1/+24
| | | | | | Review URL: http://codereview.chromium.org/465061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33884 0039d316-1c4b-4281-b951-d872f2087c98
* Fix two connection error cases:mbelshe@google.com2009-12-042-6/+6
| | | | | | | | | | | | | | a) When the SSL handshake completes, pass the error through and close the session. b) When the Connect returns error, we were returning OK anyway. BUG=none TEST=none Review URL: http://codereview.chromium.org/463032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33868 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bug where FLIP sessions can crash if the connect fails.mbelshe@google.com2009-12-042-2/+57
| | | | | | | | | | | | | | Update the mocksocket so that we can test connection statuses. Verified that the test case crashes without the flip_session.cc fix. BUG=none TEST=FlipNetworkTransaction.ConnectFailure Review URL: http://codereview.chromium.org/462023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33792 0039d316-1c4b-4281-b951-d872f2087c98
* Update network priorities to support better granularitymbelshe@google.com2009-12-022-21/+9
| | | | | | | | | | | | | | of resource loading from WebKit into the network stack. In order to fully make these work, webkit changes are needed as well. BUG=none TEST=none Review URL: http://codereview.chromium.org/452033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33546 0039d316-1c4b-4281-b951-d872f2087c98
* Enable the FlipProtocolTests.mbelshe@google.com2009-12-011-14/+10
| | | | | | | | | BUG=none TEST=FlipProtocolTest Review URL: http://codereview.chromium.org/449065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33512 0039d316-1c4b-4281-b951-d872f2087c98
* Fix FlipSession cleanup to be unified through CloseSession. Because Flip ismbelshe@google.com2009-12-012-25/+45
| | | | | | | | | | | | | | | full duplex, a closed socket will cause both read and write completions. Unifying the cleanup code allows both codepaths to safely cleanup the socket. In the process, consolidated several flags on the session into a single State variable. BUG=29004 TEST=WriteError Review URL: http://codereview.chromium.org/450025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33404 0039d316-1c4b-4281-b951-d872f2087c98
* When force-closing sessions we need to close them as abortedmbelshe@google.com2009-11-301-1/+1
| | | | | | | | | | | rather than as OK. BUG=none TEST=none Review URL: http://codereview.chromium.org/457014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33374 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: add next-protocol-negotiation to libssl.agl@chromium.org2009-11-301-0/+11
| | | | | | | | | | | | This is an experimental, client only implementation of next-protocol-negotiation: http://www.imperialviolet.org/binary/draft-agl-tls-nextprotoneg-00.html This only affects the internal copy of libssl and is only active when built with use_system_ssl=0, which is not currently the default. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33327 0039d316-1c4b-4281-b951-d872f2087c98
* Small header cleanup.mbelshe@google.com2009-11-301-3/+4
| | | | | | | | | | | | | Accidentally already checked in the flip_session.cc reordering of member variables in the constructor. So checking this in now. BUG=none TEST=none TBR=wtc@chromium.org Review URL: http://codereview.chromium.org/449017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33313 0039d316-1c4b-4281-b951-d872f2087c98
* Fix case where SynReply messages which were missingmbelshe@google.com2009-11-302-16/+110
| | | | | | | | | | | status or version headers would crash. BUG=none TEST=FlipNetworkTransactionTest.InvalidSynReply Review URL: http://codereview.chromium.org/455003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33311 0039d316-1c4b-4281-b951-d872f2087c98
* Ressurrect the WriteError test by making a scopedmbelshe@google.com2009-11-301-7/+14
| | | | | | | | | | | | | | | method factory for the DelayedSocketDataProvider. The problem which crashed was that the lifecycle of the socket and the data provider are not coupled; and the posted message for a delayed ReadCompletion could be left hanging. BUG=none TEST=WriteError Review URL: http://codereview.chromium.org/452010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33300 0039d316-1c4b-4281-b951-d872f2087c98
* Fix leak when we get an error during a write. Wembelshe@chromium.org2009-11-301-0/+1
| | | | | | | | | | | | were forgetting to release the in_flight_write, which holds a reference to the FlipStream. BUG=none TEST=WriteError (coming) Review URL: http://codereview.chromium.org/453005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33299 0039d316-1c4b-4281-b951-d872f2087c98
* Backout test change.mbelshe@google.com2009-11-301-17/+7
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/455001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33284 0039d316-1c4b-4281-b951-d872f2087c98
* Ressurrect the WriteError test by making a scopedmbelshe@google.com2009-11-301-7/+17
| | | | | | | | | | | | | | | | | | method factory for the DelayedSocketDataProvider. The problem which crashed was that the lifecycle of the socket and the data provider are not coupled; and the posted message for a delayed ReadCompletion could be left hanging. Running test on bots at night. BUG=none TEST=WriteError TBR=eroman@chromium.org Review URL: http://codereview.chromium.org/453001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33283 0039d316-1c4b-4281-b951-d872f2087c98
* Reland: Fix the FlipSession to support partial writes.mbelshe@google.com2009-11-295-342/+316
| | | | | | | | | | | | | | | | | 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-255-313/+342
| | | | | | | | | | | | | | | | | | | | | | | | | 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-255-342/+313
| | | | | | | | | | | | | | | | | | | | | | 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-255-313/+342
| | | | | | | | | | | | | | | | | | | | 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-255-342/+313
| | | | | | | | | | | | | | | | | 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 leak of UploadDataStream if it's empty.willchan@chromium.org2009-11-241-2/+6
| | | | | | Review URL: http://codereview.chromium.org/434043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32959 0039d316-1c4b-4281-b951-d872f2087c98
* Flip: Handle empty post.willchan@chromium.org2009-11-242-2/+76
| | | | | | Review URL: http://codereview.chromium.org/437039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32947 0039d316-1c4b-4281-b951-d872f2087c98
* Flip: Fix a bunch of leaks.willchan@chromium.org2009-11-246-33/+61
| | | | | | | | | | | | 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: Fix cancellation code path.willchan@chromium.org2009-11-231-8/+8
| | | | | | | | The current fix is suboptimal, since we're doing unnecessary work in the FlipStream (still handling reads and writes for a cancelled stream), but just don't ever hand the data over to a user since they've already cancelled the stream. We should fix this, but don't bother for now. Not calling any user_callback_ is good enough for now. Review URL: http://codereview.chromium.org/439002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32881 0039d316-1c4b-4281-b951-d872f2087c98
* Disable FlipStreamTest::SendRequest as it causes leaks.tim@chromium.org2009-11-231-1/+2
| | | | | | | | | | | | I'm sorry for reverting your change earlier, looks like it wasn't the cause :( TBR=mbelshe BUG=28622 TEST=FlipStreamTest Review URL: http://codereview.chromium.org/436009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32858 0039d316-1c4b-4281-b951-d872f2087c98
* Flip: Merge FlipStreamParser and FlipStream. Eliminate FlipDelegate.willchan@chromium.org2009-11-2211-834/+825
| | | | | | | | | | | | | | 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
* Add some diagnostics for dumping the headers that the clientmbelshe@google.com2009-11-211-0/+30
| | | | | | | | | | | sends to the server so that others can more easily debug. BUG=none TEST=none Review URL: http://codereview.chromium.org/414078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32764 0039d316-1c4b-4281-b951-d872f2087c98
* Implement a test case for a basic server-push operation.mbelshe@google.com2009-11-211-0/+180
| | | | | | | | | BUG=none TEST=flip_network_transaction_unittest.cc Review URL: http://codereview.chromium.org/414032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32763 0039d316-1c4b-4281-b951-d872f2087c98
* When we had upload data, but it was a zero-length uploadmbelshe@chromium.org2009-11-211-1/+1
| | | | | | | | | | | | | | data, we would not set the FIN flag, which would stall the request upload. This fixes gmail. TEST=none BUG=none Review URL: http://codereview.chromium.org/414077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32762 0039d316-1c4b-4281-b951-d872f2087c98
* Add a sanity check into the framer; this tripsmbelshe@google.com2009-11-201-0/+1
| | | | | | | | | | | | often if you send bad data into the framer and helps debug early. BUG=none TEST=none Review URL: http://codereview.chromium.org/418008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32630 0039d316-1c4b-4281-b951-d872f2087c98
* Robustness improvements on the X-Associated-Content header.mbelshe@google.com2009-11-201-2/+7
| | | | | | | | | | | | | If we get a header which doesn't look like it contains a parseable URL, log an error and drop it (instead of inserting it into the pending_streams_ list). BUG=none TEST=none Review URL: http://codereview.chromium.org/420002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32629 0039d316-1c4b-4281-b951-d872f2087c98
* Fix memory leak.mbelshe@google.com2009-11-191-1/+1
| | | | | | | | | | BUG=none TEST=none TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/408019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32482 0039d316-1c4b-4281-b951-d872f2087c98