summaryrefslogtreecommitdiffstats
path: root/net/socket
Commit message (Collapse)AuthorAgeFilesLines
* Coverity: Remove a check for index < 0 because index is size_t and can never ↵jhawkins@chromium.org2009-09-301-2/+4
| | | | | | | | | | | be < 0. CID=5378 BUG=none TEST=none Review URL: http://codereview.chromium.org/242084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27671 0039d316-1c4b-4281-b951-d872f2087c98
* Relanding:mbelshe@google.com2009-09-301-1/+39
| | | | | | | | | | | | | | | Implement a readsize throttle within the TCP socket. Add a fieldgroup trial for testing it. BUG=none TEST=none Original Review URL: http://codereview.chromium.org/173259 Review URL: http://codereview.chromium.org/243038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27595 0039d316-1c4b-4281-b951-d872f2087c98
* Avoid potential "NULL used as int" warnings by changing ASSERT_EQ(NULL, ...) ↵pkasting@chromium.org2009-09-291-6/+3
| | | | | | | | | to ASSERT_TRUE(... == NULL). Patch by Jacob Mandelson (see http://codereview.chromium.org/202057 ), r=me. BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27511 0039d316-1c4b-4281-b951-d872f2087c98
* Roll back Markus's CL ( http://codereview.chromium.org/196053)jshin@chromium.org2009-09-252-37/+11
| | | | | | | | | BUG=none TEST=UI test and valgrind test pass TBR=markus Review URL: http://codereview.chromium.org/222031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27160 0039d316-1c4b-4281-b951-d872f2087c98
* When converting between units of time or data types of different precision,markus@chromium.org2009-09-242-11/+37
| | | | | | | | | | | | | | | | | | | we have to be careful to consistently round in the same direction. Timeout checks usually check if Now() is less or equal to a deadline in order to determine if a timeout has occurred. This correctly handles the case where actual sleep times are equal or longer than requested sleep times. But if we round down when setting the sleep delay, this can result in unnecessary and expensive looping. Make sure, we always round up when converting to a format with less precision. BUG=none TEST=none Review URL: http://codereview.chromium.org/196053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27146 0039d316-1c4b-4281-b951-d872f2087c98
* oldpath is wchar_t, so use arraysize, not sizeof.mattm@chromium.org2009-09-241-1/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/209027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27104 0039d316-1c4b-4281-b951-d872f2087c98
* Don't use NSS databases for non-essential purposes, such as rememberingwtc@chromium.org2009-09-211-9/+12
| | | | | | | | | | | | | | | the intermediate CA certificates we see, because NSS's connections to the SQLite databases go bad if the file system where the databases reside is gone, even just transiently. Add the hostname to the error log message for CERT_PKIXVerifyCert failure. R=eroman,ukai BUG=15630 TEST=existing unit tests should pass. Review URL: http://codereview.chromium.org/214028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26714 0039d316-1c4b-4281-b951-d872f2087c98
* Uncouple the cert verifier when disconnecting to avoid a callback after a ↵hawk@chromium.org2009-09-151-0/+2
| | | | | | | | | | SSLClientSocketMac object has bee freed. BUG=21832 TEST=none Review URL: http://codereview.chromium.org/206007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26236 0039d316-1c4b-4281-b951-d872f2087c98
* Non-blocking connect() attempts may fail synchronously in some cases. Whenmark@chromium.org2009-09-111-23/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this occurs, connect() should be retried with another address if possible and appropriate. On Mac OS X 10.6 ("Snow Leopard"), getaddrinfo() returns IPv6 addresses even when inappropriate due to the use of AI_ADDRCONFIG. connect() fails immediately when trying to connect to an IPv6 address from a system that only has IPv4 connectivity. The existing net::TCPClientSocketLibevent is not prepared to deal with immediate connect() failures, so it fails without trying additional addresses. Some sites, such as python.org, publish both IPv4 and IPv6 addresses. On Snow Leopard, name resolution always returns the IPv6 addresses first, rendering such sites impossible to connect to unless reachable by IPv6. This change restores the previous behavior of setting AI_ADDRCONFIG when calling getaddrinfo() on Mac OS X. AI_ADDRCONFIG was removed in a previous attempt to fix this bug. AI_ADDRCONFIG is now documented in Snow Leopard. The associated comment, written for Mac OS X 10.5 ("Leopard"), is no longer correct. In most cases, the presence or absence of this flag seems to have no impact on the system resolver's behavior, but I believe that its presence is correct per the documentation. A separate bug will be filed with Apple. BUG=12711 TEST=http://python.org/ on Snow Leopard should load on a machine where only IPv4 is available; it (and all other sites) should continue to function properly on Leopard Review URL: http://codereview.chromium.org/196094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26051 0039d316-1c4b-4281-b951-d872f2087c98
* Add methods for setting socket buffers to the Socket mbelshe@google.com2009-09-0918-10/+130
| | | | | | | | | | | | class. Also add a few stats counters for TCP read/write stats. BUG=none TEST=none Review URL: http://codereview.chromium.org/199048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25803 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 24211 - Implement a readsize throttle within the TCP socket.laforge@chromium.org2009-09-041-42/+1
| | | | | | | | | | | | | | | Add a fieldgroup trial for testing it. BUG=none TEST=none Review URL: http://codereview.chromium.org/173259 TBR=mbelshe@google.com Review URL: http://codereview.chromium.org/192027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25510 0039d316-1c4b-4281-b951-d872f2087c98
* Enable SSL session resumption for Mac OS X.hawk@chromium.org2009-09-035-37/+143
| | | | | | | | BUG=19049 TEST=https sites perform identically under Mac OS X <= 10.5.6 and Mac OS X >= 10.5.7 (in particular, https://test-ssev.verisign.com/ and the three pages linked from there) Review URL: http://codereview.chromium.org/177014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25399 0039d316-1c4b-4281-b951-d872f2087c98
* Make GetLoadState virtual in ConnectJob().willchan@chromium.org2009-09-015-13/+27
| | | | | | | | | This will be necessary for SSLClientSocketPool since the SSLConnectJob will contain a ClientSocketHandle for the TCPClientSocketPool. SSLConnectJob::GetLoadState() will forward to ClientSocketHandle::GetLoadState() if the SSLConnectJob is waiting on requesting a TCP socket. BUG=http://crbug.com/13289. Review URL: http://codereview.chromium.org/176024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25032 0039d316-1c4b-4281-b951-d872f2087c98
* Control the amount of time to leave an unused socket idle before closing it.willchan@chromium.org2009-08-294-13/+106
| | | | | | | | | | This adds constructor arguments for socket idle timeouts. This allows me to control it for testing, and also makes it possible to run experiments on how long to enable it for. Currently I've set the timeout for unused sockets to 10 seconds, since that will cover 90% of the TCP RSTs we're seeing. We can probably increase this, but I'm waiting on histogram data to decide what to change it to. BUG=http://crbug.com/18192 Review URL: http://codereview.chromium.org/176021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24847 0039d316-1c4b-4281-b951-d872f2087c98
* Don't trust server's PASV response that much in FtpNetworkTransaction.phajdan.jr@chromium.org2009-08-282-11/+21
| | | | | | | | | TEST=Covered by net_unittests. http://crbug.com/20334 Review URL: http://codereview.chromium.org/180011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24818 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Fix a ton of compiler warnings."tony@chromium.org2009-08-283-10/+10
| | | | | | | | | | | This reverts commit r24792. TBR=estade Review URL: http://codereview.chromium.org/179028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24796 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a ton of compiler warnings.estade@chromium.org2009-08-283-10/+10
| | | | | | | | | | | | | | | Most of these are classes with virtual methods lacking virtual destructors or NULL used in non-pointer context. BUG=none TEST=app_unittests && base_unittests --gtest_filter=-ConditionVariableTest.LargeFastTaskTest patch by Jacob Mandelson <jlmjlm [at] gmail> http://codereview.chromium.org/171028/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24792 0039d316-1c4b-4281-b951-d872f2087c98
* Enable SSLClientSocketTest unit tests on Mac OS X by implementing our own ↵hawk@chromium.org2009-08-274-81/+130
| | | | | | | | | | certificate validation code. This gives us proper hostname matching, multiple error codes (e.g., before a certificate could be marked as expired or untrusted, but not both), revocation checking, and EV certificate checking. BUG=19286,10910,14733 TEST=https://www.paypal.com should work without warning. https://paypal.com should get a warning about a hostname mismatch. https://test-ssev.verisign.com:1443/test-SSEV-expired-verisign.html should give a warning about an expired certificate. Review URL: http://codereview.chromium.org/174102 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24625 0039d316-1c4b-4281-b951-d872f2087c98
* Fix transaction hang when downloading certain FTP files.phajdan.jr@chromium.org2009-08-262-3/+29
| | | | | | | | | TEST=Covered by net_unittests. http://crbug.com/19855 Review URL: http://codereview.chromium.org/174428 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24492 0039d316-1c4b-4281-b951-d872f2087c98
* Implement a read-size throttle within the TCP socket.mbelshe@google.com2009-08-251-1/+42
| | | | | | | | | | | Add a field-group trial for testing it. BUG=none TEST=none Review URL: http://codereview.chromium.org/173259 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24211 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a typo IsCertStatusError. It should be IsCertificateError.wtc@chromium.org2009-08-251-3/+5
| | | | | | | | | | | | | | | | | | This typo causes us to call GetServerCert at the wrong time. We found that SSLCopyPeerCertificates may succeed (return noErr) but return a nil CFArrayRef. So we check for that to avoid a crash. Finally, errSSLIllegalParam means we received an SSL invalid_parameter error alert message, rather than an invalid function argument. It should be mapped to ERR_SSL_PROTOCOL_ERROR. R=avi BUG=http://crbug.com/19837 TEST=Visit https://stud.infostud.uniroma1.it:4445/Sest/Log/Corpo.html. Chromium should not crash. Review URL: http://codereview.chromium.org/173328 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24209 0039d316-1c4b-4281-b951-d872f2087c98
* Only retry on unused, idle sockets if the socket error is ERR_CONNECTION_RESET.willchan@chromium.org2009-08-241-1/+1
| | | | | | | | | In particular, don't do it on ERR_CONNECTION_ABORT or ERR_CONNECTION_CLOSED. Fix spelling error in ClientSocketHandle comment. Review URL: http://codereview.chromium.org/173278 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24152 0039d316-1c4b-4281-b951-d872f2087c98
* Resend on IO errors on late bound sockets that were idle.willchan@chromium.org2009-08-221-3/+3
| | | | | | | | | | | According to UMA data, late bound sockets that were idle are significantly more likely to get (reset/close/abort) errors. Currently, we don't resend on late bound sockets that were idle because they weren't reused. This changes that. TODO: determine how long a socket has to be idle before it is likely to get a TCP RST if we try to reuse it. Also document the ClientSocketHandle::ReuseSocketType values. BUG=http://crbug.com/18192. Review URL: http://codereview.chromium.org/174287 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24084 0039d316-1c4b-4281-b951-d872f2087c98
* Fix gcc warning about possible unused variable experienced with Apple gcc 4.2mark@chromium.org2009-08-201-1/+1
| | | | | | | in an -O3 experiment. Review URL: http://codereview.chromium.org/173125 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23861 0039d316-1c4b-4281-b951-d872f2087c98
* Add instrumentation to ClientSocketPool, that writes to LoadLog.eroman@chromium.org2009-08-205-54/+284
| | | | | | | | BUG=http://crbug.com/14478 Review URL: http://codereview.chromium.org/174101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23855 0039d316-1c4b-4281-b951-d872f2087c98
* Change an ASSERT_TRUE to a CHECK() to remove the gtest dependency.evan@chromium.org2009-08-201-1/+1
| | | | | | | | This fixes the shared build. Review URL: http://codereview.chromium.org/173083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23814 0039d316-1c4b-4281-b951-d872f2087c98
* Make ClientSocketHandle::Init() typesafe.willchan@chromium.org2009-08-196-102/+137
| | | | | | | | | | | Introduce a REGISTER_SOCKET_PARAMS_FOR_POOL macro to register valid SocketParams for a ClientSocketPool subtype. Update HttpNetworkSession's ClientSocketPool to return the concrete TCPClientSocketPool instead of the parent interface. Renamed the member variable&accessor. Updated tests. BUG=http://crbug.com/13289 Review URL: http://codereview.chromium.org/173018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23743 0039d316-1c4b-4281-b951-d872f2087c98
* Change ClientSocketHandle to take the pool as a parameter to Init() rather ↵willchan@chromium.org2009-08-186-142/+165
| | | | | | | | | | than the constructor. The purpose of this change is to allow ClientSocketHandle to be able to accept ClientSocketPools of different types, since we will want to pass a TCPClientSocketPool or an SSLClientSocketPool or whatever to it. BUG=http://crbug.com/13289 Review URL: http://codereview.chromium.org/171003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23629 0039d316-1c4b-4281-b951-d872f2087c98
* Add histograms for tracking the unused/unused_idle/reused socket states from ↵willchan@chromium.org2009-08-174-4/+38
| | | | | | | | | | | | TCPClientSocketPool. Tracks the number of each socket type returned by the TCPClientSocketPool. Also tracks the number of recoverable IO errors (resets, aborts, closes) per socket type. Also tracks the idle time of a socket before a recoverable IO happens. Review URL: http://codereview.chromium.org/171048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23570 0039d316-1c4b-4281-b951-d872f2087c98
* Speed up net_unittests a bit by re-using launched test server.phajdan.jr@chromium.org2009-08-142-0/+13
| | | | | | | | | | | | | | On POSIX it makes the server fork a separate process for each request for better test isolation. Starting with just few tests to limit impact of an eventual breakage. The results are promising. TEST=none BUG=none Review URL: http://codereview.chromium.org/164522 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23481 0039d316-1c4b-4281-b951-d872f2087c98
* Make ClientSocketPool/ClientSocketPoolBase/ClientSocketHandle more generic.willchan@chromium.org2009-08-148-194/+375
| | | | | | | | | | | | | | | This is in preparation for creating an SSLClientSocketPool. ClientSocketPoolBase is now templated. Most of the implementation has moved to ClientSocketPoolBaseHelper which is not templated. In order to make this possible, ClientSocketPoolBaseHelper's internal data structures do not use the full concrete Request type, but rather use a pointer to Request. ClientSocketPoolBase takes a SocketParams as a template argument, primarily to allow RequestSocket to take a templated parameter that contains all the information necessary to connect the socket (be it TCP or SSL or whatever). ClientSocketPool::RequestSocket() and ClientSocketHandle::Init() have been templated as well to handle this case. I've left adding run-time type safety checks as a TODO. TEST=net_unittests BUG=http://crbug.com/13289 Review URL: http://codereview.chromium.org/160621 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23427 0039d316-1c4b-4281-b951-d872f2087c98
* LoadLog is used as an output parameter, reorder it to the last parameter.willchan@chromium.org2009-08-1417-123/+120
| | | | | | Review URL: http://codereview.chromium.org/164531 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23419 0039d316-1c4b-4281-b951-d872f2087c98
* Implement SSL certificate error handling on the Mac. If the user giveswtc@chromium.org2009-08-134-42/+73
| | | | | | | | | | | | | | | | us bad certs to allow, we tell SecureTransport to not verify the server cert, and only allow the cert to be one of the bad certs the user allows. In the future we should figure out how to verify the server cert ourselves. R=avi,eroman BUG=http://crbug.com/11983 TEST=Visit https://www.ssl247.com/ and https://alioth.debian.org/. Clicking the "Proceed anyway" button should bring you to the site with a red "https" in the location bar. Review URL: http://codereview.chromium.org/165191 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23321 0039d316-1c4b-4281-b951-d872f2087c98
* Rebaseline block-test* tests for Mac.darin@chromium.org2009-08-121-0/+2
| | | | | | | | | | | | | | | | | | | | On Mac, when trying to connect to 255.255.255.255, we get an EACCES error. I don't think it is correct for me to map that to ERR_ADDRESS_INVALID or ERR_ADDRESS_UNREACHABLE, so I'm going to map it to ERR_ACCESS_DENIED. This means that I need to rebaseline the chromium-mac results for these tests. I think it is okay to have platform specific behavior here. I kind of prefer that the error codes we show are more closely in sync with the operating system. That way it may be easier for a sophisticated user to make sense of our error codes. R=wtc BUG=18665 TEST=none Review URL: http://codereview.chromium.org/164114 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23176 0039d316-1c4b-4281-b951-d872f2087c98
* Add a "LoadLog" parameter to transactions, hostresolver, clientsocketpool ↵ericroman@google.com2009-08-1218-95/+123
| | | | | | | | and proyxservice.This dependency comes from the parent URLRequest, and is used as a container for per-request profiling data.This change is strictly a no-op refactor -- the parameter is unused, and LoadLog does nothing.BUG=http://crbug.com/14478TEST=none -- just needs to compile and pass existing tests.DESIGN=<http://docs.google.com/Doc?id=dfhcnb2v_21gbtrcpr3&hl=en> Review URL: http://codereview.chromium.org/126303 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23127 0039d316-1c4b-4281-b951-d872f2087c98
* Add a new net::Error value: ERR_CONNECTION_TIMED_OUT.willchan@chromium.org2009-08-072-4/+22
| | | | | | | | | TEST=net_unittests BUG=none Review URL: http://codereview.chromium.org/159904 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22746 0039d316-1c4b-4281-b951-d872f2087c98
* Submitting http://codereview.chromium.org/164076 for syf1984@gmail.com (aka ↵robertshield@chromium.org2009-08-062-2/+29
| | | | | | | | | | | | miletus): Make the timeout in WaitToStart() of TestServerLauncher parametrized and expose this parameter to HTTPTestServer::CreateServer() TBR=syf1984@gmail.com, tommi@chromium.org Review URL: http://codereview.chromium.org/164090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22667 0039d316-1c4b-4281-b951-d872f2087c98
* Initialize 'processed' to 0 before passing its address to SSLRead orwtc@chromium.org2009-08-062-8/+12
| | | | | | | | | | | | | | | | | SSLWrite. Ignore errSSLClosedNoNotify for site compatibility, even though it makes us potentially vulnerable to truncation attacks. Replace the default ERR_FAILED error code with the more specific ERR_SSL_PROTOCOL_ERROR. R=avi BUG=http://crbug.com/16758 TEST=see bug 16758 for a test case. Review URL: http://codereview.chromium.org/165025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22626 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure the socket is deleted when ConnectJob times out.willchan@chromium.org2009-08-062-1/+48
| | | | | | | | | | | | It's benign since ClientSocketPoolBase has a scoped_ptr that will delete it anyway, but it hits a DCHECK since ConnectJob::ReleaseSocket() should return NULL when the ConnectJob encountered an error. Update TestConnectJobDelegate to call ConnectJob::ReleaseSocket() and EXPECT on its value. Replicate the ConnectJob tests for the late binding case (doesn't add any extra coverage since we're not executing ClientSocketPoolBase code, just ConnectJob, but this way I don't accidentally delete necessary tests when I delete all the old tests after switching over completely to late binding). BUG=none TEST=net_unittests Review URL: http://codereview.chromium.org/160664 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22580 0039d316-1c4b-4281-b951-d872f2087c98
* Fix leak in ClientSocketPoolBaseTest. Don't create ConnectJobFactory unless ↵willchan@chromium.org2009-08-041-6/+5
| | | | | | | | needed. Review URL: http://codereview.chromium.org/159831 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22349 0039d316-1c4b-4281-b951-d872f2087c98
* Add timeouts for ConnectJobs. Limit ConnectJobs per group to number of ↵willchan@chromium.org2009-08-035-18/+161
| | | | | | | | | | Requests per group + 1. In the histograms for Net.SocketRequestTime, late binding has a much longer tail. This is presumably because I didn't implement timeouts and CancelRequest() never cancelled jobs. I'm limiting TCPConnectJobs to 60 seconds and cancelling jobs if there are too many more than there are requests. Review URL: http://codereview.chromium.org/160499 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22338 0039d316-1c4b-4281-b951-d872f2087c98
* Add timeouts for ConnectJobs. Limit ConnectJobs per group to number of ↵willchan@chromium.org2009-08-035-154/+18
| | | | | | | | | | Requests per group + 1. In the histograms for Net.SocketRequestTime, late binding has a much longer tail. This is presumably because I didn't implement timeouts and CancelRequest() never cancelled jobs. I'm limiting TCPConnectJobs to 30 seconds and cancelling jobs if there are too many more than there are requests. Review URL: http://codereview.chromium.org/160499 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22330 0039d316-1c4b-4281-b951-d872f2087c98
* Add timeouts for ConnectJobs. Limit ConnectJobs per group to number of ↵willchan@chromium.org2009-08-035-18/+154
| | | | | | | | | | Requests per group + 1. In the histograms for Net.SocketRequestTime, late binding has a much longer tail. This is presumably because I didn't implement timeouts and CancelRequest() never cancelled jobs. I'm limiting TCPConnectJobs to 30 seconds and cancelling jobs if there are too many more than there are requests. Review URL: http://codereview.chromium.org/160499 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22326 0039d316-1c4b-4281-b951-d872f2087c98
* Integrate OCSP handlers in SSLClientSocketNSS.ukai@chromium.org2009-07-311-1/+6
| | | | | | | | | | | It depends on http://codereview.chromium.org/126046 BUG=none TEST=none Review URL: http://codereview.chromium.org/155912 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22147 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash in client_socket_pool_base.cc.phajdan.jr@chromium.org2009-07-293-6/+75
| | | | | | | | | | | | | | | The CHECK that was being hit showed a real problem: group's IsEmpty should take into account the pending requests queue too. I also made IsEmpty check for connecting requests queue emptiness, so we can be sure that IsEmpty really means empty. TEST=Added a regression test ClientSocketPoolBaseTest.GroupWithPendingRequestsIsNotEmpty to net_unittests. http://crbug.com/17985 Review URL: http://codereview.chromium.org/159597 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21988 0039d316-1c4b-4281-b951-d872f2087c98
* If a write is pending, just add it to the buffer. Don't trigger a second ↵avi@chromium.org2009-07-291-0/+11
| | | | | | | | | | | concurrent write. BUG=http://crbug.com/17991 TEST=as in bug Review URL: http://codereview.chromium.org/160333 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21981 0039d316-1c4b-4281-b951-d872f2087c98
* Followup after socket tests refactoring http://codereview.chromium.org/155925phajdan.jr@chromium.org2009-07-294-100/+110
| | | | | | | | | | | | | - more complete checks for data validity - private data member with getter instead of public data member, eh - replace some magic numbers with more readable constants TEST=none http://crbug.com/17445 Review URL: http://codereview.chromium.org/159514 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21957 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring in socket pool unittests:phajdan.jr@chromium.org2009-07-234-390/+376
| | | | | | | | | | | | | - share more code - improve readability - help detect cases we don't test order of all requests made TEST=Covered by net_unittests. http://crbug.com/17445 Review URL: http://codereview.chromium.org/155925 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21456 0039d316-1c4b-4281-b951-d872f2087c98
* Limit total number of sockets in the system.phajdan.jr@chromium.org2009-07-226-83/+422
| | | | | | | | | | Based on Eric Roman's patch at http://codereview.chromium.org/62181 http://crbug.com/15093 Review URL: http://codereview.chromium.org/149027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21276 0039d316-1c4b-4281-b951-d872f2087c98
* Use manually constructed IPv6 socket addresses for tests, rather than system ↵ericroman@google.com2009-07-182-13/+3
| | | | | | | | | | | | | | | created ones. The advantage is that GURL's parsing of IPv6 addresses works on all systems, whereas getaddrinfo(ipv6_literal) only succeeds on IPv6 enabled systems. This allows the tests to run consistently on all systems, including our own WinXP buildbots (which do not support IPv6). BUG=http://crbug.com/16452 TEST=[net_unittests] SOCKS5ClientSocketTest.IPv6Domain, SOCKSClientSocketTest.SOCKS4AIfDomainInIPv6 Review URL: http://codereview.chromium.org/155618 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21053 0039d316-1c4b-4281-b951-d872f2087c98