summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* Fix up some code not to set off coverity warnings.willchan@chromium.org2009-07-063-3/+6
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/149149 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19962 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Speed up net_unittests by ~20s by manipulating tcp_pinger timeouts."phajdan.jr@chromium.org2009-07-061-2/+2
| | | | | | | | | | | | This reverts commit e0ff42dd35e02eae62f35043072ca23676577cac. Did it break Vista tests? Let's see. TBR=nsylvain Review URL: http://codereview.chromium.org/155093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19958 0039d316-1c4b-4281-b951-d872f2087c98
* Make new FtpNetworkTransaction handle short reads correctly.phajdan.jr@chromium.org2009-07-064-160/+247
| | | | | | | | | | | | | | The problem was that some functions were parsing response lines, but without checking that they have the entire line available. This change will also make it easier to handle multi-line greeting (230 welcome messages). I plan to do that afterwards. TEST=Covered by net_unittests. http://crbug.com/15259 Review URL: http://codereview.chromium.org/149043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19954 0039d316-1c4b-4281-b951-d872f2087c98
* Speed up net_unittests by ~20s by manipulating tcp_pinger timeouts.phajdan.jr@chromium.org2009-07-061-2/+2
| | | | | | Review URL: http://codereview.chromium.org/155020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19951 0039d316-1c4b-4281-b951-d872f2087c98
* Make ConnectJob::ReleaseSocket() return NULL on connection error.willchan@chromium.org2009-07-023-1/+6
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/150205 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19819 0039d316-1c4b-4281-b951-d872f2087c98
* Fix leak on connection error.willchan@chromium.org2009-07-021-2/+2
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/150196 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19792 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor ConnectJob and TCPConnectJob.willchan@chromium.org2009-07-015-163/+291
| | | | | | | | | | | ConnectJob will only call OnConnectJobComplete() on asynchronous completion. TCPConnectJob now uses DoLoop() internally. BUG=http://crbug.com/13289 TEST=none Review URL: http://codereview.chromium.org/151118 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19789 0039d316-1c4b-4281-b951-d872f2087c98
* Fix 15 coverity complaints.rvargas@google.com2009-07-0111-27/+27
| | | | | | | | | | | | Most of the changes are cosmetic, but there is also a memory leak in CreateExpiredServer. BUG=none TEST=none Review URL: http://codereview.chromium.org/153001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19788 0039d316-1c4b-4281-b951-d872f2087c98
* Say we support mime-type audio/mpeg and video/mpeghclam@chromium.org2009-07-011-0/+4
| | | | | | | | | | Mark these two mime-types as supported: audio/mpeg video/mpeg Review URL: http://codereview.chromium.org/150047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19760 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a browser crash during cache validation.rvargas@google.com2009-06-302-0/+34
| | | | | | | | | | | | | | | It is possible for a crazy server to return 206 even though we are not making a range request. In that case, we should not allow the stored response to go through the logic for range support (which right now is disabled). We've always stored those 206s though. BUG=15617 TEST=unittest Review URL: http://codereview.chromium.org/150090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19621 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor ClientSocketPoolBase to be testable without host resolution / tcp ↵willchan@chromium.org2009-06-307-370/+340
| | | | | | | | | | | connections. BUG=http://crbug.com/13289 TEST=none Review URL: http://codereview.chromium.org/147252 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19620 0039d316-1c4b-4281-b951-d872f2087c98
* Stop leaking ConnectCallbackWrapper if Connect() does not complete before ↵willchan@chromium.org2009-06-302-40/+46
| | | | | | | | | | | the socket is deleted. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/151059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19592 0039d316-1c4b-4281-b951-d872f2087c98
* Remove some dead code -- this was moved into client_socket_pool_base.cc.ericroman@google.com2009-06-291-15/+0
| | | | | | | | | BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/150050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19525 0039d316-1c4b-4281-b951-d872f2087c98
* Remove a stale comment.ericroman@google.com2009-06-291-2/+0
| | | | | | | | | | TBR=willchan BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/150049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19519 0039d316-1c4b-4281-b951-d872f2087c98
* Use C99 standard format macros for 64-bit values.agl@chromium.org2009-06-292-5/+7
| | | | | | | | | | | | | | | | | | | Currently we have several uses of %I64d in format strings to indicate a 64-bit value. This does not work on Mac or Linux, where 'I' indicates the use of locale specific digits. Instead, we introduce base/format_macros.h which mimic the C99 standard macros for 64-bit values in a cross-platform manner. Dean pointed out that V8 is handling this themselves rather than use inttypes.h. Maybe we'll end up going down the same path but, for the moment, we'll try and do it the 'correct' way and see how it works out. http://codereview.chromium.org/147154 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19500 0039d316-1c4b-4281-b951-d872f2087c98
* Create a more fine grained histogram of SDCH payload sizesjar@chromium.org2009-06-291-2/+2
| | | | | | | r=mbelshe Review URL: http://codereview.chromium.org/149119 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19491 0039d316-1c4b-4281-b951-d872f2087c98
* Tests for socks4/4a implementation.arindam@chromium.org2009-06-286-150/+439
| | | | | | | | | | | Refactoring of void BuildHandshakeWriteBuffer() to const std::string BuildHandshakeWriteBuffer() const,and removing private members handshake_buf_len_ and buffer_len_ (since buffer_ is now std::string, buffer_.size()) is more than sufficient for buffer size. TEST=unittests BUG=469 Review URL: http://codereview.chromium.org/139009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19474 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 19466.thakis@chromium.org2009-06-276-436/+147
| | | | | | Review URL: http://codereview.chromium.org/150003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19468 0039d316-1c4b-4281-b951-d872f2087c98
* Tests for socks4/4a implementation.arindam@chromium.org2009-06-276-147/+436
| | | | | | | | | | | | Refactoring of void BuildHandshakeWriteBuffer() to const std::string BuildHandshakeWriteBuffer() const, and removing private members handshake_buf_len_ and buffer_len_ (since buffer_ is now std::string, buffer_.size()) is more than sufficient. TEST=unittests BUG=469 Review URL: http://codereview.chromium.org/139009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19466 0039d316-1c4b-4281-b951-d872f2087c98
* Ensure that even if the HostResolver outlives the IO thread, its jobs will ↵ericroman@google.com2009-06-272-1/+20
| | | | | | | | | | | | | not try to complete on the IO thread. This is an experiment for http://crbug.com/15513 BUG=15513 TBR=willchan Review URL: http://codereview.chromium.org/150001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19463 0039d316-1c4b-4281-b951-d872f2087c98
* Make net::HostResolver refcounted.ericroman@google.com2009-06-2722-121/+116
| | | | | | | | | | | This way it can be properly shared between the url request contexts, and the dns prefetcher, and dns observer. BUG=http://crbug.com/14664 TEST=existing unit tests. Review URL: http://codereview.chromium.org/149053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19451 0039d316-1c4b-4281-b951-d872f2087c98
* Add a command line switch to allow setting the max sizervargas@google.com2009-06-261-0/+4
| | | | | | | | | | | | | | of the disk cache. This switch is intended for troubleshooting, not to add another supported configuration. BUG=15117 TEST=none Review URL: http://codereview.chromium.org/146136 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19439 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 19425.ericroman@google.com2009-06-2622-116/+121
| | | | | | Review URL: http://codereview.chromium.org/147242 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19432 0039d316-1c4b-4281-b951-d872f2087c98
* Make net::HostResolver refcounted.ericroman@google.com2009-06-2622-121/+116
| | | | | | | | | | | This way it can be properly shared between the url request contexts, and the dns prefetcher, and dns observer. BUG=http://crbug.com/14664 TEST=existing unit tests. Review URL: http://codereview.chromium.org/149053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19425 0039d316-1c4b-4281-b951-d872f2087c98
* Document when the Delegate methods OnCertificateRequested andwtc@chromium.org2009-06-261-1/+9
| | | | | | | | | | | | | | OnSSLCertificateError are called for a request. Document that the string passed to SetExtraRequestHeaders should not end in \r\n. R=rvargas BUG=none TEST=none Review URL: http://codereview.chromium.org/149095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19420 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring using_proxy_, using_tunnel_, using_socks_proxy_ into a single ↵arindam@chromium.org2009-06-264-23/+145
| | | | | | | | | | | | | | enum ProxyConfig in HttpNetworkTransaction. Fixing http://crbug.com/14982 In case of SOCKS proxies we set the url to append to the group name so that the socks endpoint is at the target server and not the socks proxy server and so can be effectively reused by the socket pool. BUG=14982 TEST=unittests Review URL: http://codereview.chromium.org/146026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19404 0039d316-1c4b-4281-b951-d872f2087c98
* Add DCHECKs to the states that should be entered only when thewtc@chromium.org2009-06-261-0/+7
| | | | | | | | | | | previous state succeeded. R=ibrar,phajdan.jr BUG=http://crbug.com/4965 TEST=none Review URL: http://codereview.chromium.org/149013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19394 0039d316-1c4b-4281-b951-d872f2087c98
* Sparse IO implementation for memory-only cachehclam@chromium.org2009-06-265-73/+438
| | | | | | | | | | | | | | Implemented the following methods: MemEntryImpl::ReadSparseData MemEntryImpl::WriteSparseData MemEntryImpl::GetAvailableRange TEST=DiskCacheEntryTest.Memory* original CL: http://codereview.chromium.org/140049 Review URL: http://codereview.chromium.org/147217 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19380 0039d316-1c4b-4281-b951-d872f2087c98
* revert socks_client_socket.cc from r19005arindam@chromium.org2009-06-261-45/+47
| | | | | | | | | | | TEST=none BUG=none TBR=eroman Review URL: http://codereview.chromium.org/149077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19358 0039d316-1c4b-4281-b951-d872f2087c98
* reverting the change 19354, 19356arindam@chromium.org2009-06-265-387/+96
| | | | | | | | | | | TEST=none BUG=none TBR=eroman Review URL: http://codereview.chromium.org/149076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19357 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing compilation warnings for r19354arindam@chromium.org2009-06-262-3/+3
| | | | | | | | | | | TEST=none BUG=none TBR=eroman Review URL: http://codereview.chromium.org/149074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19356 0039d316-1c4b-4281-b951-d872f2087c98
* Tests for socks4/4a implementation.arindam@chromium.org2009-06-266-145/+434
| | | | | | | | | | | | Refactoring of void BuildHandshakeWriteBuffer() to const std::string BuildHandshakeWriteBuffer() const, and removing private members handshake_buf_len_ and buffer_len_ (since buffer_ is now std::string, buffer_.size()) is more than sufficient. TEST=unittests BUG=none Review URL: http://codereview.chromium.org/139009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19354 0039d316-1c4b-4281-b951-d872f2087c98
* Reset internal ClientSocketHandle state on Init() synchronous error (failure ↵willchan@chromium.org2009-06-265-12/+31
| | | | | | | | | | | to do so could lead to a crash). Also delete a CHECK that was asserting on possibly deleted memory. BUG=http://crbug.com/15207 TEST=See bug for repro. Review URL: http://codereview.chromium.org/147155 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19343 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Implementation for memory only sparse caching" r19270.scherkus@chromium.org2009-06-255-438/+73
| | | | | | | | | | | TBR=rvargas TEST=none BUG=none Review URL: http://codereview.chromium.org/149041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19308 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a crash in net::SSLClientSocketWin::OnIOComplete(int) whenwtc@chromium.org2009-06-256-14/+34
| | | | | | | | | | | | | | | | | | | | | an HttpNetworkTransaction is destroyed while its SSLClientSocket is verifying a certificate. Document that ClientSocket::Disconnect aborts any pending IO and prevents completion callback from running, like a cancel method. Change the verifier_ member of SSLClientSocket to a scoped_ptr so that we can destroy the CertVerifier object in the Disconnect method. (CertVerifier doesn't have a cancel method, so we cancel pending certificate verification by destroying the CertVerifier object.) R=willchan BUG=http://crbug.com/13981 TEST=none. I can only reproduce this crash by modifying the source code to create that condition. Review URL: http://codereview.chromium.org/147159 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19307 0039d316-1c4b-4281-b951-d872f2087c98
* Add some checks to make sure header_buf_body_offset_ is never used when ↵ericroman@google.com2009-06-252-6/+10
| | | | | | | | | negative. BUG=b/1483703 Review URL: http://codereview.chromium.org/132051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19284 0039d316-1c4b-4281-b951-d872f2087c98
* Implementation for memory only sparse cachinghclam@chromium.org2009-06-255-73/+438
| | | | | | | | | | | | Implemented the following methods for memory only cache: ReadSparseData WriteSparseData GetAvailableRange BUG=12258 Review URL: http://codereview.chromium.org/140049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19270 0039d316-1c4b-4281-b951-d872f2087c98
* [Second attempt]wtc@chromium.org2009-06-251-2/+2
| | | | | | | | | | | | | | Use the new portable FTP implementation on non-Windows platforms. Note: the new FTP is still work in progress. Original review URL: http://codereview.chromium.org/119342 R=dank BUG=http://crbug.com/4965 TEST=none Review URL: http://codereview.chromium.org/146044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19258 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Split some time histograms in groups basedrvargas@google.com2009-06-255-35/+75
| | | | | | | | | | | on the cache size. BUG=10727 TEST=none Review URL: http://codereview.chromium.org/146129 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19256 0039d316-1c4b-4281-b951-d872f2087c98
* If we get a connect error in DoCtrlConnectComplete, do not advance towtc@chromium.org2009-06-251-1/+2
| | | | | | | | | | | the STATE_CTRL_READ state. R=ibrar,phajdan.jr BUG=http://crbug.com/4965 TEST=none Review URL: http://codereview.chromium.org/146065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19253 0039d316-1c4b-4281-b951-d872f2087c98
* Make more things possible with mock sockets:phajdan.jr@chromium.org2009-06-252-25/+41
| | | | | | | | | | | | - check connection state in mock read and write - make possible simulating short reads in DynamicMockSocket TEST=none http://crbug.com/15259 Review URL: http://codereview.chromium.org/147117 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19222 0039d316-1c4b-4281-b951-d872f2087c98
* Return potentially more specific error code in FtpNetworkTransaction.phajdan.jr@chromium.org2009-06-241-2/+2
| | | | | | Review URL: http://codereview.chromium.org/147111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19180 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent infinite loop in new FtpNetworkTransaction.phajdan.jr@chromium.org2009-06-241-1/+4
| | | | | | | | | | It tried to send a QUIT command when sending QUIT command failed. BUG=none TEST=none Review URL: http://codereview.chromium.org/146103 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19177 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Add more clients to the current experiment.rvargas@google.com2009-06-241-5/+21
| | | | | | | | | | | | | For some reason, I have less than 1% of clients taking part of the eviction algorithm experiment, so I'm adding clients again. BUG=none TEST=none Review URL: http://codereview.chromium.org/147066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19175 0039d316-1c4b-4281-b951-d872f2087c98
* Start to disable bzip2 support. First step: Stop advertising support.jar@chromium.org2009-06-242-9/+12
| | | | | | | | | | | | | | | | | | | Although it would be nice to just yank it all, it is good to do so slowly so that any cached data that might required bzip2 decoding will still decode and render. Maybe I'm being paranoid... but this seems like a nice first small step. I also disabled the tests that depend on this modified code, and linted the unittest file a bit. BUG=14801 TEST= Be sure you can still view http://ukcp09.defra.gov.uk/content/view/16/6/index.html which is (currently) bzip encoded. r=hunar Review URL: http://codereview.chromium.org/147058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19173 0039d316-1c4b-4281-b951-d872f2087c98
* svn cp net/socket/tcp_client_socket_pool_unittest.cc ↵willchan@chromium.org2009-06-241-0/+621
| | | | | | | | | | net/socket/client_socket_pool_base_unittest.cc In preparation for moving tests from tcp_client_socket_pool_unittest.cc to client_socket_pool_base_unittest.cc. Review URL: http://codereview.chromium.org/147101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19163 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Add support for ranges with an unknown start or end.rvargas@google.com2009-06-244-23/+112
| | | | | | | | | BUG=12258 TEST=unittest Review URL: http://codereview.chromium.org/147042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19142 0039d316-1c4b-4281-b951-d872f2087c98
* Merge WebKit r42737, which added port 3659wtc@chromium.org2009-06-241-6/+8
| | | | | | | | | | | | | | (apple-sasl / PasswordServer) to the list of blocked ports and to LayoutTests/security/block-test.html. Fix cpplint.py nits. R=eroman BUG=http://crbug.com/10861 TEST=LayoutTests/security/block-test.html should pass on Windows Review URL: http://codereview.chromium.org/147069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19136 0039d316-1c4b-4281-b951-d872f2087c98
* Break out classes from tcp_client_socket_pool.h into their own files.willchan@chromium.org2009-06-245-590/+650
| | | | | | | | | | This is just shuffling code around to new files and adjusting header dependencies accordingly. BUG=http://crbug.com/13289 TEST=none Review URL: http://codereview.chromium.org/132060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19123 0039d316-1c4b-4281-b951-d872f2087c98
* Original patch by pmarks@google.com (see http://codereview.chromium.org/113944)ericroman@google.com2009-06-235-49/+47
| | | | | | | | | | | | | | | | | | | | | | | - Pull in googleurl r107, which includes the new CanonicalizeHostVerbose() function: http://code.google.com/p/google-url/source/detail?r=107 - Atomically update Chromium to make use of this new function. This allows us to extract better information about IP addresses using fewer, and cleaner, calls to googleurl. - Also, change a call to CanonicalizeIPAddress() to stay compatible with r107. The upshot of all this is, Chrome will no longer try to connect to IPv4 addresses with overflow "http://192.168.0.257", or hostnames surrounded by square brackets "http://[google.com]" BUG=none TEST={unit_tests,googleurl_unittests,net_unittests} Review URL: http://codereview.chromium.org/146053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19076 0039d316-1c4b-4281-b951-d872f2087c98