summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* Use the USE_NSS macro to help porting to FreeBSD, OpenBSD, etc.wtc@chromium.org2010-01-282-11/+11
| | | | | | | | | | | Fix cpplint nits. R=evan,pvalchev BUG=none TEST=No compilation errors. Review URL: http://codereview.chromium.org/558008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37358 0039d316-1c4b-4281-b951-d872f2087c98
* Add a histogram to record how long fetching the system proxy settings takes:eroman@chromium.org2010-01-281-0/+11
| | | | | | | | | | | Net.ProxyPollConfigurationTime On Windows, this corresponds to the duration of WinHttpGetIEProxyConfigForCurrentUser(), which we have seen can run very slowly on some systesm. This histogram tries to gauge the extent of the problem. BUG=12189 Review URL: http://codereview.chromium.org/553122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37352 0039d316-1c4b-4281-b951-d872f2087c98
* Make Chrome tolerant of out-of-oder header block headers.mbelshe@chromium.org2010-01-272-9/+55
| | | | | | | | | | BUG=31927 TEST=flip_framer_test Review URL: http://codereview.chromium.org/549178 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37344 0039d316-1c4b-4281-b951-d872f2087c98
* Switch on socket late binding - Take 2.willchan@chromium.org2010-01-276-685/+72
| | | | | | | | | | | | | | | Re-enable socket late binding. The mac valgrind errors happened due to threading bugs in test_shell_tests. The ui thread would TearDown() the test object, which deleted the TestURLRequestContext, which eventually deletes the TCPClientSocketPool, which deletes its ConnectJobs. However, those ConnectJobs might be running simultaneously on the io thread. Therefore, we have a race condition. This change fixes that. Histograms for the 4.0.266.0 dev channel release indicate the following changes for late binding: (a) Net.TCPSocketType shows a decrease (from 41.85% to 39.29%) in used of newly connected sockets. Part of this decrease is due to using previously used sockets more often (increase from 58.15% to 58.53%), but is primarily due to being able to use sockets that were connected, but not immediately handed over to a socket request (increased from 0 [not supported without late binding] to 2.18%). (b) Net.SocketIdleTimeBeforeNextUse_ReusedSocket indicates that reused sockets are getting used more quickly than before, with a decrease of mean idle time from 11.65 seconds to 11.34 seconds. (c) Net.Transaction_Connected_Under_10 indicates shows that the mean for time until the first byte of the transaction response decreased from 1585ms to 1481ms. The code change deletes the old non socket late binding code paths, cleaning up the code significantly. It also deletes duplicated tests in ClientSocketPoolBase which covered both pathways. A TCPClientSocketPool test had to be updated as well. BUG=http://crbug.com/30354. Review URL: http://codereview.chromium.org/549093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37311 0039d316-1c4b-4281-b951-d872f2087c98
* Remove a C99-ism that Visual C++ doesn't support -- declare a variable inwtc@chromium.org2010-01-271-1/+2
| | | | | | | | | | | the middle of a block. R=agl BUG=none TEST=no compilation error on Linux. Review URL: http://codereview.chromium.org/552178 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37270 0039d316-1c4b-4281-b951-d872f2087c98
* Fix libssl.so link failures on Linux shared lib build.mmoss@google.com2010-01-271-0/+6
| | | | | | | | | | | | http://build.chromium.org/buildbot/waterfall.fyi/builders/Chromium%20Linux%20Builder%20(dbg-shlib)/builds/6369/steps/compile/logs/stdio This has been broken for a long time, I think basically since Linux switched to use_system_ssl=0. Also fix a couple unrelated shared lib failures in media. Review URL: http://codereview.chromium.org/553097 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37256 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor EnsureNSSInit. Move the NSS SSL librarywtc@chromium.org2010-01-271-3/+59
| | | | | | | | | | | | | | | initialization to SSLClientSocketNSS in src/net so that src/base does not depend on the NSS SSL library. Call PL_ArenaFinish in the NSPRInitSingleton destructor instead of the NSSInitSingleton destructor because PLArena is part of NSPR. R=agl,ukai BUG=28744 TEST=covered by existing tests. Review URL: http://codereview.chromium.org/554096 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37223 0039d316-1c4b-4281-b951-d872f2087c98
* Remove a bunch of 0 byte files. (due to git-svn misbehavior?)thestig@chromium.org2010-01-268-0/+0
| | | | | | | BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37152 0039d316-1c4b-4281-b951-d872f2087c98
* Add a unit test which checks that Negotiate is chosen over NTLM.cbentzel@chromium.org2010-01-231-4/+23
| | | | | | | | | | | | Negotiate is chosen over NTLM on Windows, but currently is not on Linux or OSX since support has nat been added yet. BUG=32824 TEST=Added new unit test and ran it. Review URL: http://codereview.chromium.org/554043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36968 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 36837 (caused XP unit_tests crashes) - Implement ↵willchan@chromium.org2010-01-223-73/+3
| | | | | | | | | | | | | | NetworkChangeNotifierWin. Uses the NotifyAddrChange() API to detect ip address changes. BUG=http://crbug.com/26156 Review URL: http://codereview.chromium.org/551077 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/543167 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36842 0039d316-1c4b-4281-b951-d872f2087c98
* Implement NetworkChangeNotifierWin.willchan@chromium.org2010-01-223-3/+73
| | | | | | | | | Uses the NotifyAddrChange() API to detect ip address changes. BUG=http://crbug.com/26156 Review URL: http://codereview.chromium.org/551077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36837 0039d316-1c4b-4281-b951-d872f2087c98
* There was a crash under certain flip protocol errors when the session is tornmbelshe@chromium.org2010-01-224-16/+131
| | | | | | | | | | | | | | | | | | | | | | down. Basically, an error occurred, and we had cleaned up all streams and removed our last reference from the FlipSessionPool, causing |this| to be destroyed. But on the stack we came through and issued another read off the now defunct FlipSession. Added two new tests for FlipSession errors - one when frame decompression fails, and one when we get a full protocol error on the session. NOTE: Had to remove DCHECK from flip_framer; I'm intentionally triggering that DCHECK, but it fires on our unit tests and windows doesn't support death tests in any reasonable way. Since the check was an arbitrary assist for early debugging, this should be okay. BUG=none TEST=flip_network_transaction_unittest.cc Review URL: http://codereview.chromium.org/549116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36820 0039d316-1c4b-4281-b951-d872f2087c98
* Add some extra request information to LoadLog:eroman@chromium.org2010-01-212-0/+17
| | | | | | | | | | | | | | * the error code that URLRequest Start() failed with. * which peer the TCP connection is being made to [Only in full logging mode] (for example, when using a proxy, this may differ from the host:port of the URL). * the type of redirect that was received, and its URL [Only in full logging mode] BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/553043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36813 0039d316-1c4b-4281-b951-d872f2087c98
* Fix unittest for Negotiate and NTLM auth.cbentzel@chromium.org2010-01-211-3/+2
| | | | | | | | | BUG=NONE TEST=Unittest fix - ran on Vista. Review URL: http://codereview.chromium.org/554040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36798 0039d316-1c4b-4281-b951-d872f2087c98
* Added WWW-Authenticate Negotate support using shared HttpAuthSspi.cbentzel@chromium.org2010-01-2111-126/+441
| | | | | | | | | BUG=29862 TEST=None Review URL: http://codereview.chromium.org/551015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36785 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: If we issue a byte range request for x bytesrvargas@google.com2010-01-212-2/+47
| | | | | | | | | | | | | | and the server replies that it is giving us x bytes but we receive less than that, forward the failure to the caller instead of asking for another range. BUG=31000 TEST=unittests Review URL: http://codereview.chromium.org/545101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36771 0039d316-1c4b-4281-b951-d872f2087c98
* Adding some more escaping method.jcampan@chromium.org2010-01-213-10/+157
| | | | | | | | | | | This will be used by the translate feature. BUG=None TEST=Run the unit-tests. Review URL: http://codereview.chromium.org/548088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36715 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent python http server used in unit tests from crashing in a hard to ↵robertshield@chromium.org2010-01-201-10/+20
| | | | | | | | | | diagnose way when a .mock-http-headers file is not perfectly formatted. Add a --never-die option that makes it more convenient to manually run some tests by preventing the server from dying when a /kill url is visited. Review URL: http://codereview.chromium.org/549110 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36642 0039d316-1c4b-4281-b951-d872f2087c98
* Linux, Mac: disable Nagle.agl@chromium.org2010-01-201-6/+24
| | | | | | | | | | | This is split off from http://codereview.chromium.org/518065 (see that CL for the review). TBR=wtc http://codereview.chromium.org/548087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36639 0039d316-1c4b-4281-b951-d872f2087c98
* Make description in FTP data connection histogram more accurate.phajdan.jr@chromium.org2010-01-201-3/+3
| | | | | | | | | | | This is a follow-up after http://codereview.chromium.org/547020 TEST=none BUG=3073 Review URL: http://codereview.chromium.org/553013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36634 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the fallback Mozilla code for parsing FTP LIST response.phajdan.jr@chromium.org2010-01-208-2578/+12
| | | | | | | | | | | | | | | | | | The new parser seems to be compatible enough to do that. The Mozilla code was very helpful in the process of developing the new parser. Also add UI encouraging users to submit bug reports when we can't parse the listings, and an option to see the raw data sent by the server. This should allow us to fix remaining compatibility problems with very rare listing types or variations. When ?raw is found at the end of an FTP url and it is a directory listing, the parsing logic is bypassed and the data is displayed as-is with text/plain MIME type. TEST=none BUG=25520 Review URL: http://codereview.chromium.org/549053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36632 0039d316-1c4b-4281-b951-d872f2087c98
* Turn GetPeerName into a pure virtual and provide local impls, this way any ↵thomasvl@chromium.org2010-01-2013-30/+26
| | | | | | | | | | future bugs like the one referenced are compile time and not runtime so they won't wide waiting to be found. BUG=32595 TEST=everything builds and tests pass Review URL: http://codereview.chromium.org/552048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36629 0039d316-1c4b-4281-b951-d872f2087c98
* Remove support for filtering by MIME-type.jochen@chromium.org2010-01-202-11/+12
| | | | | | | | | | | Also merge kDontSendCookies and kDontStoreCookies to kNoCookies. BUG=16932 TEST=unit_tests Review URL: http://codereview.chromium.org/542056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36628 0039d316-1c4b-4281-b951-d872f2087c98
* Re-revert 36595 (restoring 36548); that didn't fix anything.dpranke@chromium.org2010-01-202-4/+0
| | | | | | | | | | BUG=none TEST=none TBR=thomasvl@chromium.org Review URL: http://codereview.chromium.org/548082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36599 0039d316-1c4b-4281-b951-d872f2087c98
* Try reverting r36548 to see if this causes the webkit linux failures todpranke@chromium.org2010-01-202-0/+4
| | | | | | | | | | | | improve. BUG=none TBR=thomasvl@chromium.org TEST=none Review URL: http://codereview.chromium.org/551076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36595 0039d316-1c4b-4281-b951-d872f2087c98
* 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
* Enabled the GetPeerName on all platforms, not just Linux.thomasvl@chromium.org2010-01-192-4/+0
| | | | | | | | BUG=32595 TEST=using a SOCKS5 proxy and a debug build, you don't blow out in a NOTREACHED() any more Review URL: http://codereview.chromium.org/551069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36548 0039d316-1c4b-4281-b951-d872f2087c98
* Fix secure websocket (wss) on Mac.ukai@chromium.org2010-01-191-2/+35
| | | | | | | | | | | | | | | | When SSLClientSocket of Mac reports certificate error (e.g. ERR_CERT_AUTHORITY_INVALID), it hasn't finish the SSL handshake and doesn't report the socket is connected. So, even if we tricks the result from SSLClientSocket::Connect by HandleCertificateError, it will be handled as ERR_CONNECTION_FAILED because socket_->IsConnected() is false. So, when SSLClientSocket::Connect reported certificate error and socket_->IsConnectedAndIdle() is false, get the certificate and retry establishing connection again with the certificate in allowed bad certificates, so we could ignore the certificate verify error. Without this fix, websocket live experiment on mac always fails for secure connection. BUG=32569 TEST=try open wss: connection and got open events. Review URL: http://codereview.chromium.org/543111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36519 0039d316-1c4b-4281-b951-d872f2087c98
* Enable SSL 2.0 cipher suites. Although SSL 2.0 is disabled by default,wtc@chromium.org2010-01-151-1/+3
| | | | | | | | | | | the SSL 2.0 cipher suites must be available if SSL 2.0 is enabled. R=mark BUG=30682 TEST=none Review URL: http://codereview.chromium.org/552014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36428 0039d316-1c4b-4281-b951-d872f2087c98
* Add a context-sensitive error mapping function specific to SSLwtc@chromium.org2010-01-152-32/+26
| | | | | | | | | | | | | | handshake errors. It should never return a certificate error because we don't have the server's certificate when handshake fails. R=agl BUG=24064 TEST=Visit the test URL in issue 24064 comment 8 on Linux. Chromium should not crash. Review URL: http://codereview.chromium.org/550026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36426 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: change some |str += StringPrintf(...)| --> |StringAppendF(&str, ...)|.eroman@chromium.org2010-01-153-35/+38
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/550030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36421 0039d316-1c4b-4281-b951-d872f2087c98
* The search terms are escaped using + or %20 for space depending on whether ↵avayvod@google.com2010-01-153-18/+29
| | | | | | | | | | | | replacement is in query part of the URL or not. Removed duplicate EscapeQueryParamValue functions without |use_plus| argument. BUG=24571 TEST=Verify that space is escaped as stated in description; see bug description for example with search on Wikipedia. Review URL: http://codereview.chromium.org/543077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36398 0039d316-1c4b-4281-b951-d872f2087c98
* Decrease buffer size for the server to 2K fixed.mbelshe@chromium.org2010-01-151-2/+2
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/543079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36376 0039d316-1c4b-4281-b951-d872f2087c98
* Support the ECC cipher suites added in Mac OS X 10.6.wtc@chromium.org2010-01-151-1/+171
| | | | | | | | | | | | | | Disable weak cipher suites (< 80 bits of security), anonymous cipher suites, and FORTEZZA and IDEA cipher suites. R=mark BUG=30682,30160,31995 TEST=Visit https://sa.www4.irs.gov/modiein/individual/index.jsp. We should be able to load the page rather than getting the ERR_UNEXPECTED error. Review URL: http://codereview.chromium.org/545036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36373 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Add Certificate Info dialog (part 1)mattm@chromium.org2010-01-147-26/+8
| | | | | | | | | | | Rename base/nss_init.{h,cc} to base/nss_util.{h,cc}, move PRTimeToBaseTime there. BUG=18119 TEST=Load https://www.google.com, compare to firefox cert dialog. Review URL: http://codereview.chromium.org/500141 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36291 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 36230 - Switch on socket late binding.willchan@chromium.org2010-01-146-70/+668
| | | | | | | | | | | | | | | | | Broke mac valgrind for test_shell_tests. Various errors. I also missed fixing a bug that eroman pointed out in review. Total brainfart. Histograms for the 4.0.266.0 dev channel release indicate the following changes for late binding: (a) Net.TCPSocketType shows a decrease (from 41.85% to 39.29%) in used of newly connected sockets. Part of this decrease is due to using previously used sockets more often (increase from 58.15% to 58.53%), but is primarily due to being able to use sockets that were connected, but not immediately handed over to a socket request (increased from 0 [not supported without late binding] to 2.18%). (b) Net.SocketIdleTimeBeforeNextUse_ReusedSocket indicates that reused sockets are getting used more quickly than before, with a decrease of mean idle time from 11.65 seconds to 11.34 seconds. (c) Net.Transaction_Connected_Under_10 indicates shows that the mean for time until the first byte of the transaction response decreased from 1585ms to 1481ms. The code change deletes the old non socket late binding code paths, cleaning up the code significantly. It also deletes duplicated tests in ClientSocketPoolBase which covered both pathways. A TCPClientSocketPool test had to be updated as well. BUG=http://crbug.com/30354. Review URL: http://codereview.chromium.org/543051 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/549047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36231 0039d316-1c4b-4281-b951-d872f2087c98
* Switch on socket late binding.willchan@chromium.org2010-01-146-668/+70
| | | | | | | | | | | | | Histograms for the 4.0.266.0 dev channel release indicate the following changes for late binding: (a) Net.TCPSocketType shows a decrease (from 41.85% to 39.29%) in used of newly connected sockets. Part of this decrease is due to using previously used sockets more often (increase from 58.15% to 58.53%), but is primarily due to being able to use sockets that were connected, but not immediately handed over to a socket request (increased from 0 [not supported without late binding] to 2.18%). (b) Net.SocketIdleTimeBeforeNextUse_ReusedSocket indicates that reused sockets are getting used more quickly than before, with a decrease of mean idle time from 11.65 seconds to 11.34 seconds. (c) Net.Transaction_Connected_Under_10 indicates shows that the mean for time until the first byte of the transaction response decreased from 1585ms to 1481ms. The code change deletes the old non socket late binding code paths, cleaning up the code significantly. It also deletes duplicated tests in ClientSocketPoolBase which covered both pathways. A TCPClientSocketPool test had to be updated as well. BUG=http://crbug.com/30354. Review URL: http://codereview.chromium.org/543051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36230 0039d316-1c4b-4281-b951-d872f2087c98
* Remove destruction observer in CancelURLRequestukai@chromium.org2010-01-141-0/+4
| | | | | | | | | BUG=30410 TEST=none Review URL: http://codereview.chromium.org/541060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36228 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Fix a leak on RemovePendingCallbackFromNewEntryrvargas@google.com2010-01-141-0/+1
| | | | | | | | | | | BUG=none TEST=none TBR=eroman Review URL: http://codereview.chromium.org/548039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36222 0039d316-1c4b-4281-b951-d872f2087c98
* Http Cache: Use asynchronous Open/Create/Doom entry calls.rvargas@google.com2010-01-1411-153/+730
| | | | | | | | | | | | | | | | More changes to the state machine: now we really issue asynchronous calls when getting new cache entries. We have to add a new serialization mechanism to the http cache in order to handle races among multiple requests creating and opening the same entry. BUG=26729 TEST=unittests Review URL: http://codereview.chromium.org/523019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36211 0039d316-1c4b-4281-b951-d872f2087c98
* Rename CloseIdleConnections -> CloseCurrentConnections.mbelshe@chromium.org2010-01-144-3/+18
| | | | | | | | | | | | | | | | | This method is (and was) just for debugging; while it was closing idle connections, that was not aggressive enough; the benchmark needs to close all connections, not just the idle ones. To ensure connections are abandoned, create a new pool; leaving the old pool to languish as any pending sockets die. BUG=none TEST=none Review URL: http://codereview.chromium.org/549031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36208 0039d316-1c4b-4281-b951-d872f2087c98
* Add a histogram for SpdyConnectionLatency.mbelshe@chromium.org2010-01-131-6/+12
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/543040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36189 0039d316-1c4b-4281-b951-d872f2087c98
* More changes intended to make flip_in_mem_edsm_server.cc compile and runmbelshe@chromium.org2010-01-1323-520/+706
| | | | | | | | | | | | | in the chrome tree. Checkin for Roberto Peon (fenix@google.com) BUG=none TEST=none Review URL: http://codereview.chromium.org/543029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36187 0039d316-1c4b-4281-b951-d872f2087c98
* Add more functionality to about:net-internals:eroman@chromium.org2010-01-133-2/+69
| | | | | | | | | | | | | (1) Display the cached bad proxies, and how long until they will be retried (addresses an old TODO). (2) Add a button to clear the bad proxies cache. (3) Add a button to force refetching of the proxy configuration (this can be used to force refetch of PAC files, very convenient when testing). BUG=none TEST=none Review URL: http://codereview.chromium.org/541045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36159 0039d316-1c4b-4281-b951-d872f2087c98
* Slightly tweak socket late binding behavior to make it more deterministic ↵willchan@chromium.org2010-01-133-9/+43
| | | | | | | | | | | | which is useful for tests. When a socket has been released to ClientSocketPoolBase, it is not immediately released, but a DoReleaseSocket() task gets posted to the MessageLoop. In many of our tests, what can happen is right after ClientSocketHandle::Reset() gets called, which posts the aforementioned release task, another ClientSocketHandle requests a socket, which starts up a ConnectJob that will completely asynchronously, but AFTER the release task happens. Note that if the released socket is no longer connected, then when DoReleaseSocket() completes, it will try to process a pending request, thereby initiating an extra ConnectJob. So, even though ClientSocketHandle::Init() may only have been called twice, we can see 3 ConnectJobs, which is weird. It's mostly harmless since this race condition probably doesn't happen much in real use, and the only side effect is an extra ConnectJob which might even be faster, but this behavior introduces difficult to control behavior in tests. The solution taken here is to keep track of the number of pending released sockets for a ClientSocketPool group. If there are any pending released sockets, then don't start up a new ConnectJob yet, wait for the sockets to get released. This can introduce some delays for starting up ConnectJobs, but the delay should be very small (one MessageLoop iteration through the IO thread should not take long) and it only happens in the edge case where a new ClientSocketPool request comes in for the same group where a DoReleaseSocket() task has been posted. In these cases, we may also prevent unnecessary ConnectJobs from getting started up, especially if the socket is released and able to be reused. Existing unit tests (ClientSocketPoolBaseTest_LateBinding_RequestPendingJob*) cover this change in behavior. Review URL: http://codereview.chromium.org/550024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36144 0039d316-1c4b-4281-b951-d872f2087c98
* Another tweak to about:net-internals: do a redirect after processing the ↵eroman@chromium.org2010-01-132-33/+46
| | | | | | | | | | | query arguments. BUG=None TEST=None Review URL: http://codereview.chromium.org/546028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36111 0039d316-1c4b-4281-b951-d872f2087c98
* Miscellaneous tweaks to the about:net-internals page.eroman@chromium.org2010-01-131-59/+123
| | | | | | | | | | | | * Display the time to live of negative host cache entries (and don't make the whole line red). * Generalize the buttons, so each subsection can specify their own; to that end, adds a button to clear the hostcache, url request recent requests, socket stream recent requests. (I intend to add a button to force refetching of proxy config as well). BUG=None TEST=None Review URL: http://codereview.chromium.org/548021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36084 0039d316-1c4b-4281-b951-d872f2087c98
* Retry proxies which were cached as bad before giving up.eroman@chromium.org2010-01-128-26/+101
| | | | | | | | | | | This morphs ProxyList::RemoveBadProxies() into ProxyList::DeprioritizeBadProxies(), such that "bad proxies" are moved to the end of the fallback list rather than removed alltogether. BUG=31983 TEST=ProxyListTest.DeprioritizeBadProxies Review URL: http://codereview.chromium.org/542029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36054 0039d316-1c4b-4281-b951-d872f2087c98
* In the CookieMonster code, use the RegistryControlledDomainService only formpcomplete@chromium.org2010-01-121-5/+17
| | | | | | | | | | | http and https URLs. For other schemes (like chrome-extension), use the host itself as the effective TLD. BUG=31867 Review URL: http://codereview.chromium.org/536017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36035 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Add a histogram to see how headers relatedrvargas@google.com2010-01-122-0/+47
| | | | | | | | | | | | to automatic resuming of requests are distributed. BUG=none TEST=none Review URL: http://codereview.chromium.org/543021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36029 0039d316-1c4b-4281-b951-d872f2087c98