summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* Properly let the SSL engine know when the underlying stream is closed.avi@chromium.org2009-07-161-2/+4
| | | | | | | | | BUG=http://crbug.com/14196 TEST=NONE (this fix is related to the bug but does not fix it) Review URL: http://codereview.chromium.org/155595 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20864 0039d316-1c4b-4281-b951-d872f2087c98
* Delete an un-used file.ericroman@google.com2009-07-161-170/+0
| | | | | | | | | | | | This was supposed to be part of r20795 but somehow wasn't added to the CL. TBR=willchan BUG=none TEST=none Review URL: http://codereview.chromium.org/155616 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20846 0039d316-1c4b-4281-b951-d872f2087c98
* Disable LoadState net unittest: it's flakeyagl@chromium.org2009-07-161-1/+1
| | | | | | | BUG=16881 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20820 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a typo pointed out by wtc after I checked in.jshin@chromium.org2009-07-161-1/+1
| | | | | | | | | | | BUG=NONE TEST=NONE TBR=wtc Review URL: http://codereview.chromium.org/149726 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20818 0039d316-1c4b-4281-b951-d872f2087c98
* Refactorings surrounding HostResolver:ericroman@google.com2009-07-1530-982/+1415
| | | | | | | | | | | | | | | | | | | | | | (1) Extract HostResolver to an interface. The existing concrete implementation is now named HostResolverImpl. This makes it possible to create mocks with more complex behavior (i.e. choose via rules if response will be sync vs async). (2) Transform HostMapper into HostResolverProc. Conceptually HostResolverProc maps a hostname to a socket address, whereas HostMapper mapped a hostname to another hostname (so you were still at the mercy of the system's host resolver). With HostResolverProc you can specify the exact AddressList, making it possible to run tests requiring IPv6 socketaddrs on systems (like WinXP) that don't actually support it. (3) Add a MockHostResolver implementation of HostResolver. This replaces the [ScopedHostMapper + RuleBasedHostMapper + HostResolver] combo. It is less clunky and a bit more expressive. BUG=http://crbug.com/16452 R=willchan TEST=existing Review URL: http://codereview.chromium.org/149511 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20795 0039d316-1c4b-4281-b951-d872f2087c98
* Changing to match reality.avi@chromium.org2009-07-151-2/+2
| | | | | | Review URL: http://codereview.chromium.org/149686 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20760 0039d316-1c4b-4281-b951-d872f2087c98
* Add a few more cases to NetUtilTest.IDN* tests. Because IDN*Slow test is ↵jshin@chromium.org2009-07-152-16/+42
| | | | | | | | | | | much faster ( > 20 times) than before (on my linux box - single core p4, it takes 5700 ms now.), enable the test under Linux valgrind. BUG=None TEST=Pass NetUtil*.IDN* and NetUtil*.IDN*Slow runs fast enough under valgrind on Linux. Review URL: http://codereview.chromium.org/149640 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20747 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for late binding of sockets.willchan@chromium.org2009-07-153-44/+694
| | | | | | | | | | There are tests for this, but the code is not activated yet. The old behavior is maintained. I will follow up this patch with a change to enable an A/B test for this optimization. Credit to jar&mbelshe for the optimization idea. BUG=13289 TEST=Covered by new unit tests. Not activatable yet. Review URL: http://codereview.chromium.org/151190 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20735 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the log error message about proxy authentication insdoyon@chromium.org2009-07-151-4/+10
| | | | | | | | | | | | | ProxyConfigServiceLinux: the proxy auth parameters are still not supported, but proxy auth is supported. Also see http://crbug.com/16709 BUG=13530 TEST=none Review URL: http://codereview.chromium.org/149614 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20725 0039d316-1c4b-4281-b951-d872f2087c98
* SOCKS v5 implementationarindam@chromium.org2009-07-156-9/+1027
| | | | | | | | | | | The implementation is incomplete as it does not support any authentication methods and does not have a UDP layer. BUG=469 TEST=unittests (included) Review URL: http://codereview.chromium.org/150187 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20724 0039d316-1c4b-4281-b951-d872f2087c98
* Make IDN check faster by caching the exemplar setsjshin@chromium.org2009-07-141-24/+68
| | | | | | | | | BUG=NONE TEST=Pass NetUti*.IDN* (net_unittest) and NetUtil*.IDN*Slow runs much faster than before (~ 20 times). Review URL: http://codereview.chromium.org/149577 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20666 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 20626.arindam@chromium.org2009-07-146-1028/+9
| | | | | | | | TBR=eroman Review URL: http://codereview.chromium.org/155505 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20628 0039d316-1c4b-4281-b951-d872f2087c98
* SOCKS v5 implementationarindam@chromium.org2009-07-146-9/+1028
| | | | | | | | | | | The implementation is incomplete as it does not support any authentication methods and does not have a UDP layer. BUG=469 TEST=unittests (included) Review URL: http://codereview.chromium.org/150187 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20626 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring needed before adding good unit tests for limiting total socket ↵phajdan.jr@chromium.org2009-07-142-119/+162
| | | | | | | | | | | count. TEST=Covered by net_unittests. http://crbug.com/15093 Review URL: http://codereview.chromium.org/149545 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20623 0039d316-1c4b-4281-b951-d872f2087c98
* Whenever proxy configurations contain socks and http/https/ftp proxies, ↵arindam@chromium.org2009-07-1413-55/+211
| | | | | | | | | | | | socks configuration over rid the other proxies. Fixes the issue. Attached test cases. BUG=15738 TEST=unittest (ProxyConfigTest.ParseProxyRules, ProxyServiceTest.DefaultProxyFallbackToSOCKS) Review URL: http://codereview.chromium.org/149191 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20605 0039d316-1c4b-4281-b951-d872f2087c98
* This provides a simpler js template engine than JsTemplate. It has beenarv@google.com2009-07-141-6/+7
| | | | | | | | | | | | | | | | | | optimized for the way we do internationalization with JST before and is about 4 times faster (average 4.8ms vs 22.8ms) for the history page. The syntax for this is very similar to JsTemplates. It uses the attributes i18n-values and i18n-content which worls like jsvalues and jscontent except that it does not allow arbitrary expressions. BUG=None TEST=All UI pages should work as before Review URL: http://codereview.chromium.org/149420 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20590 0039d316-1c4b-4281-b951-d872f2087c98
* Relax assertion in ProxyConfigServiceLinux gconf cleanup.sdoyon@chromium.org2009-07-131-2/+18
| | | | | | | | | | | | | | | To wind down gconf, a cleanup task is posted to the UI thread. Don't assert if that task is destroyed without being run (as may happen on program exit). BUG=16076 TEST=Run "sh tools/valgrind/chrome_tests.sh -t ui", look af the first couple tests and check we don't get this assertion: "proxy/proxy_config_service_linux.cc(211)] Check failed: !client_." Review URL: http://codereview.chromium.org/155363 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20487 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Generate total-load-time histograms from thervargas@google.com2009-07-111-0/+26
| | | | | | | | | | | disk cache experiment. BUG=none TEST=none Review URL: http://codereview.chromium.org/155380 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20452 0039d316-1c4b-4281-b951-d872f2087c98
* Add some CHECKs to track down the source of a NULL deref in the ↵willchan@chromium.org2009-07-102-0/+13
| | | | | | | | | | | SSLClientSocketWin code. BUG=http://crbug.com/16371 TEST=none Review URL: http://codereview.chromium.org/155359 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20415 0039d316-1c4b-4281-b951-d872f2087c98
* Remove svn:executable property from some more files that don't need it.thestig@chromium.org2009-07-102-0/+0
| | | | | | | TBR=evmar Review URL: http://codereview.chromium.org/149471 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20406 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some coverity warnings in src/net.willchan@chromium.org2009-07-103-9/+9
| | | | | | Review URL: http://codereview.chromium.org/155315 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20352 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the local directory listing, FTP directory listing and the local file ↵jshin@chromium.org2009-07-098-74/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | handling (drag'n'drop and opening from the file list). For the local file listing, use the OS file system encoding. For the FTP directory listing, use ICU's encoding detector.GetDirectoryListingEntry and GetDirectoryLisingHeader were changed to accept string16 for file/directory names. To the former, a new parameter (|raw_bytes|) was added. It can be used to make a FTP request to a file with a non-ASCII name encoded in a legacy encoding. For the local file handling on Windows, get rid of the code for 'doubly converted' UTF-8 in FileURLToFilePath, which led to issue 4619 and add a few cases to NetUtil*.FileURLConversion* test. In addition, add CodepageToUTF16 and UTF16ToCodepage along with a new unittest (ConvertBetweenCodepageAndUTF16) that shares the same set of case as ConvertBetweenCodepageAndWide. The test cases were expanded and revised a bit. BUG=2939,13229,4619 http://crbug.com/2939 http://crbug.com/13229 http://crbug.com/4619 TEST=1. Pass URLRequest*.FTP* (net_unittests) 2. Pass StringUtiltTest.ConvertBetweenCode* 3. Pass NetUtil*.GetDirectoryLis* (net_unittests) 4. Open a local directory containing files with non-ASCII names and they're displayed correctly in the directory list. On Windows and Mac OS X, it should always work. On Linux, your locale encoding (as returned by nl_langinfo(CODESET)) should match the actual encoding used in your filename. 5a. Pass NetUtil*.FileURL* (net_unittests) with the default codepage set to 1252 and 932. 5b. Make a file named 'caf챕.txt' on Windows and see if it can be opened both by clicking in the directory listing page of Chrome and by drag'n'drop. Test this with the default OS code pages set to Windows-1252, Windows-1251 (Russian) and Windows-932 (Japanese). Review URL: http://codereview.chromium.org/151065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20331 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Don't evict entries if we are busy doing other stuff.rvargas@google.com2009-07-094-20/+58
| | | | | | | | | BUG=10727 TEST=none Review URL: http://codereview.chromium.org/155314 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20330 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Add explicit support for eviction / deletionrvargas@google.com2009-07-097-13/+279
| | | | | | | | | | | | | | | | | | | | | | | of sparse entries. I started to add code to modify the children_map of the parent entry when a child is evicted but that ended up being too much trouble for too little gain. We have to be prepared to handle the case of not finding a child entry because there is no way to make sure that the process doesn't go away at any time, so adding a lot of complexity just to avoid an extra entry lookup is just not worth it. On the other hand, potentially freeing up a lot of space when a sparse entry is deleted (insetad of just waiting for the eviction code to do the cleanup) seems like a good thing. BUG=12258 TEST=unittest Review URL: http://codereview.chromium.org/149306 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20325 0039d316-1c4b-4281-b951-d872f2087c98
* Validate offset / length of extra field in the message. Note these fields arecevans@chromium.org2009-07-091-2/+9
| | | | | | | | | | | | | decoded and set in a structure but unsused, so this is not a current security issue. This change just future-proofs the area in case these fields are used one day. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/155311 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20315 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Additional code cleanup after CL 20067.rvargas@google.com2009-07-081-20/+10
| | | | | | | | | BUG=15596 TEST=none Review URL: http://codereview.chromium.org/155231 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20190 0039d316-1c4b-4281-b951-d872f2087c98
* Correctly implementing GetPeerName() to point to ↵arindam@chromium.org2009-07-082-9/+5
| | | | | | | | | | | TCPClientSocket::GetPeerName(). This is used by the SSL layer in Linux to resolve Peer Names, which caused a trap to be generated ( http://crbug/16166 ) BUG=16166 TEST=fix of the above BUG Review URL: http://codereview.chromium.org/149242 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20170 0039d316-1c4b-4281-b951-d872f2087c98
* Correctly handle multiple control response lines in new FTP transactionphajdan.jr@chromium.org2009-07-084-20/+85
| | | | | | | | | | | After this change it should correctly handle all cases of multiple 230 welcome responses. It also fixes some other related bugs. TEST=Covered by net_unittests. BUG=none Review URL: http://codereview.chromium.org/149211 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20148 0039d316-1c4b-4281-b951-d872f2087c98
* CHECK to make sure connection_group is never empty.willchan@chromium.org2009-07-072-1/+6
| | | | | | | | | | Testing to see if this is the reason we hit the CHECK(!group_name_.empty()) in ClientSocketHandle::GetLoadState(). BUG=http://crbug.com/15374 TEST=none Review URL: http://codereview.chromium.org/155150 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20076 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Keep a map of all open entries.rvargas@google.com2009-07-0713-40/+162
| | | | | | | | | | | | | | | | | We still have a few crashes when for some reason we believe an entry is not dirty and we follow the pointer stored by its rankings node only to crash while accessing the memory. I have no explanation to why the dirty id matches the current one (a page boundary issue maybe?), but having a map with all open entries solves the issue of having to follow pointers from disk. BUG=15596, b/1120346 TEST=unittests Review URL: http://codereview.chromium.org/149218 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20067 0039d316-1c4b-4281-b951-d872f2087c98
* Add mpeg for layouttests to pass. The following media layout tests fail if ↵fbarchard@chromium.org2009-07-071-0/+5
| | | | | | | | | | | | | mpeg (ie mpg) is not supported. LayoutTests/media/video-source-add-src.html = FAIL LayoutTests/media/video-source-error.html = FAIL LayoutTests/media/video-source-type-params.html = FAIL LayoutTests/media/video-source-type.html = FAIL Review URL: http://codereview.chromium.org/149241 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20011 0039d316-1c4b-4281-b951-d872f2087c98
* OGG and OGV added to supported media types for omnibox, href and command line.fbarchard@chromium.org2009-07-071-14/+12
| | | | | | Review URL: http://codereview.chromium.org/149228 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20008 0039d316-1c4b-4281-b951-d872f2087c98
* Add more code to debug a crash inside HttpCache::DeactivateEntryrvargas@google.com2009-07-062-5/+34
| | | | | | | | | BUG=9952 TEST=none Review URL: http://codereview.chromium.org/155018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19981 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring in client_socket_pool_base_unittest.cc.phajdan.jr@chromium.org2009-07-061-113/+84
| | | | | | | | | | | | This is a preparation to add tests for limiting total number of sockets. TEST=Covered by net_unittests. http://crbug.com/15093 Review URL: http://codereview.chromium.org/149159 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19975 0039d316-1c4b-4281-b951-d872f2087c98
* Fix few trivial Coverity issues, mainly PASS_BY_VALUE.phajdan.jr@chromium.org2009-07-061-1/+1
| | | | | | Review URL: http://codereview.chromium.org/155022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19974 0039d316-1c4b-4281-b951-d872f2087c98
* 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