summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* Rework the FlipProtocol to separate the C-like structs from thembelshe@google.com2009-11-068-360/+652
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | methods. Without this refactoring, we didn't have a clean way to allocate and deallocate FlipFrames. Now we can use the scoped_ptr cleanly. Summary of misc changes: * Merged in some small changes from the GFE side. * flip_protocol.h Changes substantially. We now have separate structs and classes. No longer can you cast from one frame type to another. All FlipFrame classes derive from FlipFrame. A FlipFrame owns a buffer which is used for the frame, and when you create the Frame, you can specify whether the FlipFrame will self-clean its buffer or not. This makes it cheap to instantiate a FlipFrame class on the stack and use it temporarily for accessing fields without having to do any copies or allocations. * You can't use sizeof(FlipFrame) anymore - that is now a class. Added a static "size()" method to each FlipFrame type for declaring its real size. * Refactored a couple of routines in flip_framer. These were previously in a huge state machine (ProcessInput), just copied the code into subroutines. * Added flip_protocol_test to the mix from the gfe side. Much of this is a refactoring from flip_framer_test. * Eliminated reinterpret_casts as much as I could and got rid of all uses of scoped_array for FlipFrames. BUG=none TEST=all flip tests reworked Review URL: http://codereview.chromium.org/366014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31252 0039d316-1c4b-4281-b951-d872f2087c98
* Change some logging for better debugging ofmbelshe@chromium.org2009-11-061-1/+2
| | | | | | | | | | abandoned streams. BUG=none TEST=none Review URL: http://codereview.chromium.org/371017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31244 0039d316-1c4b-4281-b951-d872f2087c98
* Improve Mac SSL code:avi@chromium.org2009-11-062-121/+27
| | | | | | | | | | | | - Ensure that when OnTransportWriteComplete calls back to SSLWriteCallback, SSLWriteCallback doesn't think that a write is in progress (it _was_, but now it's complete and has to be done again). - Remove all the "slop" variables; they're not needed now that we have independent IOBuffers to call back to our transport. BUG=http://crbug.com/21268 TEST=as in bug Review URL: http://codereview.chromium.org/371008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31227 0039d316-1c4b-4281-b951-d872f2087c98
* Add Websocket::DetachDelegateukai@chromium.org2009-11-063-5/+37
| | | | | | | | | | | It is required when websocket live experiment task finished with timed out and detach websocket immediately without waiting OnClose. BUG=none TEST=none Review URL: http://codereview.chromium.org/378010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31219 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the "ls -l" FTP LIST format parser to understand correctlyphajdan.jr@chromium.org2009-11-068-2/+163
| | | | | | | | | | | listings sent by VMS MultiNet servers emulating Unix. TEST=Covered by net_unittests. BUG=22193, 25520 Review URL: http://codereview.chromium.org/368006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31217 0039d316-1c4b-4281-b951-d872f2087c98
* Add error reporting in net/websocketsukai@chromium.org2009-11-063-2/+23
| | | | | | | | | | | Fix response code for websocket authentication. BUG=none TEST=none Review URL: http://codereview.chromium.org/368003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31211 0039d316-1c4b-4281-b951-d872f2087c98
* OCSPTrySendAndReceive should always set *http_response_data_len, even onwtc@chromium.org2009-11-061-5/+13
| | | | | | | | | | | | | failure. If the response data is larger than the acceptable size, we should set *http_response_data_len to the actual size because we have downloaded the entire response. R=ukai BUG=18559 TEST=none Review URL: http://codereview.chromium.org/378003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31202 0039d316-1c4b-4281-b951-d872f2087c98
* Flip: Refactor Flip stream reading and writing out of FlipNetworkTransaction ↵willchan@chromium.org2009-11-064-209/+422
| | | | | | | | | | | | | | | | | | | into FlipStreamParser. FlipNetworkTransaction still contains the TCP socket connection code, but the session setup and all the stream communication code has moved into FlipStreamParser, in anticipation of it being used by the HTTP/SSL code. It's still not quite in the shape I'll need it to be in for use by other clients, but this gets it much closer. Added a test for transaction cancellation and added a basic test for FlipStreamParser. I'll add more tests as I add more consumers. I'm not terribly happy with the name FlipStreamParser, but it mirrors the existing HttpStreamParser in functionality, so oh well. Did some random other cleanups, including deleting unused #includes. Review URL: http://codereview.chromium.org/362017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31196 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Linux build break.jam@chromium.org2009-11-061-3/+0
| | | | | | | TBR=eroman Review URL: http://codereview.chromium.org/371009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31172 0039d316-1c4b-4281-b951-d872f2087c98
* Second patch in making destructors of refcounted objects private.jam@chromium.org2009-11-0577-133/+333
| | | | | | | | BUG=26749 Review URL: http://codereview.chromium.org/368001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31165 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: New interface that enables asynchronous completionrvargas@google.com2009-11-0510-6/+274
| | | | | | | | | | | of any operation that may block. BUG=26730 TEST=none Review URL: http://codereview.chromium.org/355028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31160 0039d316-1c4b-4281-b951-d872f2087c98
* HTTP cache: Add tests to verify that we don't remove thervargas@google.com2009-11-051-5/+50
| | | | | | | | | | | | request headers for simple and externally conditionalized requests. BUG=NONE TEST=unittests Review URL: http://codereview.chromium.org/361022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31108 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Fix leaking UCharsetDetector in ftp code.mattm@chromium.org2009-11-054-0/+61
| | | | | | | | | | CID=7193 BUG=none TEST=using the additional test data, tools/valgrind/chrome_tests.sh -t net --gtest_filter="FtpDirectoryListingBufferTest.*" Review URL: http://codereview.chromium.org/355037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31099 0039d316-1c4b-4281-b951-d872f2087c98
* Fix kServerHandshakeHeaderukai@chromium.org2009-11-052-9/+9
| | | | | | | | | BUG=none TEST=net_unittests passes Review URL: http://codereview.chromium.org/355039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31085 0039d316-1c4b-4281-b951-d872f2087c98
* Map WSAEACCES (which is reported by connect if Windows Firewallwtc@chromium.org2009-11-052-14/+38
| | | | | | | | | | | | | | | | | | | | blocks the connection) to ERR_ACCESS_DENIED. We are already mapping EACCES to ERR_ACCESS_DENIED on Linux and Mac. Use ERR_CONNECTION_FAILED instead of ERR_FAILED as the default error code for Connect. Create the ShouldTryNextAddress function for Windows to match the Linux and Mac code. WSAGetLastError returns int rather than DWORD. R=eroman BUG=21548 TEST=none Review URL: http://codereview.chromium.org/361015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31064 0039d316-1c4b-4281-b951-d872f2087c98
* Improve error code mapping between our network error codes and thewtc@chromium.org2009-11-041-6/+47
| | | | | | | | | | | | | | | NSPR/NSS error codes. Add the error codes that may be reported by TCPClientSocket to the error code mapping functions. Map our network error codes to NSPR/NSS error codes in the async completion code paths of transport_->Read() and transport_->Write(). R=dank BUG=none TEST=none Review URL: http://codereview.chromium.org/357002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31012 0039d316-1c4b-4281-b951-d872f2087c98
* Implement VMS FTP directory listing parser.phajdan.jr@chromium.org2009-11-0413-79/+1006
| | | | | | | | | | | | | This may not yet correctly handle all possible variants of VMS, because there multiple TCP/IP network stacks available for that system. TEST=Covered by net_unittests. BUG=22193, 25520 Review URL: http://codereview.chromium.org/348036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30995 0039d316-1c4b-4281-b951-d872f2087c98
* Enable localization of default downloaded filename.tony@chromium.org2009-11-043-59/+82
| | | | | | | | | | | | | | | Instead of localizing "download" string in net_util.cc, make a caller, download_manger, provide a localized string. BUG=25289 TEST=NetUtilTest.GetSuggestedFilename,DownloadManagerTest.TestDownloadFilename Original patch by hayato@google.com at: http://codereview.chromium.org/343014/show Review URL: http://codereview.chromium.org/367003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30971 0039d316-1c4b-4281-b951-d872f2087c98
* Fix memory leak in WebSocketThrottle.ukai@chromium.org2009-11-041-1/+3
| | | | | | | | | | TBR=yuzo, tyoshino BUG=none TEST=net_unittests no memory leak in WebSocketThrottleTest Review URL: http://codereview.chromium.org/364001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30951 0039d316-1c4b-4281-b951-d872f2087c98
* Implement websocket throttling.ukai@chromium.org2009-11-048-25/+741
| | | | | | | | | | | | | | | | Implement the client-side requirements in the spec. 4.1 Handshake 1. If the user agent already has a Web Socket connection to the remote host (IP address) identified by /host/, even if known by another name, wait until that connection has been established or for that connection to have failed. BUG=none TEST=net_unittests passes Review URL: http://codereview.chromium.org/342052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30949 0039d316-1c4b-4281-b951-d872f2087c98
* Minor fixes in SocketStream.ukai@chromium.org2009-11-041-2/+8
| | | | | | | | | | | Commented on http://codereview.chromium.org/345025 BUG=none TEST=none Review URL: http://codereview.chromium.org/355022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30937 0039d316-1c4b-4281-b951-d872f2087c98
* Flip: FlipSessionPool changes.willchan@chromium.org2009-11-0411-90/+130
| | | | | | | | | | | (1) Move it into the HttpNetworkSession so that HttpNetworkTransaction can access it. This is in anticipation of switching HTTP/HTTPS connections over to FLIP. (2) Add some more functionality to FlipSessionPool, allowing HttpNetworkTransactions to check for the existence of other, reusable FlipSessions. Review URL: http://codereview.chromium.org/348066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30909 0039d316-1c4b-4281-b951-d872f2087c98
* Update the FLIP session to use the FlipIOBuffer.mbelshe@google.com2009-11-044-121/+49
| | | | | | | | | | | | | | | | | | | | | | Also removed some of the testing hacks for URL rewriting that are no longer needed. This change removes the 'batching' of frames written to the socket. The reason for doing this is because I'm going to need to start notifying to the upper layer as progress is made on the writes (e.g. upload notifications). When the frames are batched (potentially from different transactions), it becomes very difficult to know when each write completes. I don't think that batching is necessary, as writes will accummulate in the socket buffer, so this should be a better approach. BUG=none TEST=flip_session_unittest.cc Review URL: http://codereview.chromium.org/342088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30898 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Make sure that we handle byte range requests thatrvargas@google.com2009-11-032-3/+30
| | | | | | | | | | | | end up skipping the cache. BUG=26175 TEST=unittests Review URL: http://codereview.chromium.org/348053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30877 0039d316-1c4b-4281-b951-d872f2087c98
* Allow trailing dots on hostnames.pkasting@chromium.org2009-11-033-14/+12
| | | | | | | | BUG=25962 TEST=Type in "google.com." and verify you can navigate. Review URL: http://codereview.chromium.org/340070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30828 0039d316-1c4b-4281-b951-d872f2087c98
* Add a command line flag to force all network traffic through a particular ↵mbelshe@google.com2009-11-034-5/+103
| | | | | | | | | | | | | | | | | | server. The command line is: --fixed-server=host:port When set, all traffic will be diverted through this server. This is useful for testing purposes with fixed servers. BUG=none TEST=none Review URL: http://codereview.chromium.org/345034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30798 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Always preserve extra headers when dealing withrvargas@google.com2009-11-034-26/+48
| | | | | | | | | | | byte range requests. BUG=25755 TEST=unittests Review URL: http://codereview.chromium.org/339088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30773 0039d316-1c4b-4281-b951-d872f2087c98
* Add LoadLog to ClientSocket::Connect().willchan@chromium.org2009-11-0231-206/+543
| | | | | | | | TODO: Use LoadLog in FLIP code. Review URL: http://codereview.chromium.org/344026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30765 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Allow multiple external validation headers.rvargas@google.com2009-11-022-55/+153
| | | | | | | | | | | | If the last pair of headers match the entry that we have we allow the server response to update the entry. BUG=23222 TEST=unittests Review URL: http://codereview.chromium.org/345019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30748 0039d316-1c4b-4281-b951-d872f2087c98
* Correctly handle FTP servers which unexpectedly close the control connection.phajdan.jr@chromium.org2009-11-022-0/+35
| | | | | | | | | TEST=Covered by net_unittests. BUG=25023 Review URL: http://codereview.chromium.org/340054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30693 0039d316-1c4b-4281-b951-d872f2087c98
* Enable the Wells Fargo WellsSecure Public Root CA for EV.wtc@chromium.org2009-10-301-0/+6
| | | | | | | | | | | R=ian BUG=22679 TEST=https://nerys.wellsfargo.com/test.html should have the EV status. Make sure "Check for server certificate revocation" is enabled in the Options menu. Review URL: http://codereview.chromium.org/342061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30595 0039d316-1c4b-4281-b951-d872f2087c98
* X509Certificate::Verify should honor thewtc@chromium.org2009-10-302-13/+28
| | | | | | | | | | | | | | | | | | | VERIFY_REV_CHECKING_ENABLED flag. This allows us to enable part of the X509CertificateTest.PaypalNullCertParsing test for Linux because the test disables revocation checking, thereby avoiding the overly strict assertion in nss_ocsp.cc. Enable cert_pi_useAIACertFetch to fetch missing intermediate CA certificates. Handle a non-certificate error reported by PKIXVerifyCert. R=ukai BUG=none TEST=none Review URL: http://codereview.chromium.org/333033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30585 0039d316-1c4b-4281-b951-d872f2087c98
* Re-apply DevTools: Support delete cookie by name.pfeldman@chromium.org2009-10-302-6/+62
| | | | | | | | TBR=yurys Review URL: http://codereview.chromium.org/348021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30583 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 30578.pfeldman@chromium.org2009-10-302-61/+6
| | | | | | | TBR=yurys Review URL: http://codereview.chromium.org/342057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30580 0039d316-1c4b-4281-b951-d872f2087c98
* DevTools: Allow deleting cookies.pfeldman@chromium.org2009-10-302-6/+61
| | | | | | Review URL: http://codereview.chromium.org/350001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30578 0039d316-1c4b-4281-b951-d872f2087c98
* Set STATE_CLOSE when error occured.ukai@chromium.org2009-10-301-6/+23
| | | | | | | | | | | Finish() when entered bad state. BUG=none TEST=none Review URL: http://codereview.chromium.org/345025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30569 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor SocketStream to report error to the delegate.ukai@chromium.org2009-10-302-40/+57
| | | | | | | | | | | | error status will be reported to the delegate (e.g. websocket experiment task) Finish() should be called at most once when STATE_CLOSE to STATE_NONE. BUG=none TEST=net_unittests didn't crash. Review URL: http://codereview.chromium.org/347026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30560 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 30551.ukai@chromium.org2009-10-302-48/+35
| | | | | | Review URL: http://codereview.chromium.org/342050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30552 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor SocketStream to report error to the delegate.ukai@chromium.org2009-10-302-35/+48
| | | | | | | | | | | error status will be reported to the delegate (e.g. websocket experiment task) BUG=none TEST=none Review URL: http://codereview.chromium.org/346010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30551 0039d316-1c4b-4281-b951-d872f2087c98
* Make LoadLog refcounted-thread safe.eroman@chromium.org2009-10-292-10/+8
| | | | | | | | | | | | | | | | | | This also backs out r26610 (these are the changes to host_resolver_impl.cc), since that code is no longer necessary if LoadLog is refcounted thread safe. LoadLog itself is not thread safe -- however making its refcounting threadsafe simplifies passing it across thread boundaries. Initially I had avoided doing this, and instead was trying to be very careful in when callers would AddRef/Release to avoid races. This approach however turned out to be fragile, and it was difficult to chase down all of the dependencies (they just kept popping up). So now I am changing that decision, and opting for the simpler approach which will be much more robust. The performance impact should be negligable. BUG=22272 Review URL: http://codereview.chromium.org/347021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30525 0039d316-1c4b-4281-b951-d872f2087c98
* Rename PrioritizedIOBuffer to FlipIOBuffer, refactor it intombelshe@google.com2009-10-293-0/+74
| | | | | | | | | | | | | | | | | | | | | | 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
* FLIP: fix new[]/delete mismatch.agl@chromium.org2009-10-291-1/+1
| | | | | | http://codereview.chromium.org/340031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30467 0039d316-1c4b-4281-b951-d872f2087c98
* DevTools: Implement raw cookies access for inspector.pfeldman@chromium.org2009-10-292-0/+35
| | | | | | Review URL: http://codereview.chromium.org/294025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30457 0039d316-1c4b-4281-b951-d872f2087c98
* Also parse file size in new FTP LIST parsing code.phajdan.jr@chromium.org2009-10-296-15/+37
| | | | | | | | | TEST=Covered by net_unittests. BUG=25520 Review URL: http://codereview.chromium.org/343022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30445 0039d316-1c4b-4281-b951-d872f2087c98
* Rename FlipStreamImpl to FlipStream and separate it out intombelshe@chromium.org2009-10-295-182/+229
| | | | | | | | | | | | its own files. This is a straight refactoring with no other changes BUG=none TEST=none Review URL: http://codereview.chromium.org/348007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30428 0039d316-1c4b-4281-b951-d872f2087c98
* FLIP requests were missing the host header.mbelshe@google.com2009-10-292-18/+26
| | | | | | | | | | | Update the unit test as well. BUG=none TEST=flip_transaction_unittest.cc Review URL: http://codereview.chromium.org/340025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30420 0039d316-1c4b-4281-b951-d872f2087c98
* Document that the handshake_failure alert message is alsowtc@chromium.org2009-10-291-2/+4
| | | | | | | | | | | mapped to SEC_E_ILLEGAL_MESSAGE. R=willchan BUG=19255 TEST=none Review URL: http://codereview.chromium.org/345018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30419 0039d316-1c4b-4281-b951-d872f2087c98
* Pass the SCH_CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT flagwtc@chromium.org2009-10-291-1/+10
| | | | | | | | | | | | | | to AcquireCredentialsHandle to cause the TLS certificate status request extension (commonly known as OCSP stapling) to be sent on Windows Vista or later. I don't know if this is all we need to do to enable OCSP stapling though. R=hawk BUG=26013 TEST=none Review URL: http://codereview.chromium.org/329042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30407 0039d316-1c4b-4281-b951-d872f2087c98
* Map errSSLPeerHandshakeFail to ERR_SSL_PROTOCOL_ERROR.willchan@chromium.org2009-10-291-0/+3
| | | | | | | | | BUG=http://crbug.com/22623 TEST=Browse to https://www.bankalbilad.com.sa/retail/logon.do. It should fallback from TLS to SSL and thus properly display the page instead of showing an error. Review URL: http://codereview.chromium.org/347011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30406 0039d316-1c4b-4281-b951-d872f2087c98
* Missed review comment. Minor change.vandebo@chromium.org2009-10-281-2/+2
| | | | | | | | BUG=24687 TEST=unit tests still pass git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30387 0039d316-1c4b-4281-b951-d872f2087c98