summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Http cache: dump the transaction and active entry keyrvargas@google.com2009-07-291-2/+11
| | | | | | | | | | | to check that they are not the same. BUG=9952 TEST=none Review URL: http://codereview.chromium.org/159594 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21974 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: revert dumping the transaction key.rvargas@google.com2009-07-291-9/+2
| | | | | | | | | | TBR=darin TEST=none BUG=9952 Review URL: http://codereview.chromium.org/159591 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21967 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: dump the transaction and active entry keyrvargas@google.com2009-07-291-2/+9
| | | | | | | | | | | | to check that they are not the same. BUG=9952 TEST=none Review URL: http://codereview.chromium.org/159563 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21964 0039d316-1c4b-4281-b951-d872f2087c98
* Make IsIDNComponentSafe in net/base/net_util.cc thread-safe with a lock. jshin@chromium.org2009-07-291-36/+41
| | | | | | | | | | | | | | | DCHECK is fired in the IDN safety check-code (IsIDNCOmponentSafe). It turned out that FormatURL (that leads to IsIDNComponentSafe) is called from both the UI thread and the history thread. BUG=NONE TEST=Build a debug build. Put multiple langauges to the Accept-Language list (Options | Advanced | Fonts&Language button | Languages tab). Browse to a few IDN sites and try to type a website url in the omnibox. Review URL: http://codereview.chromium.org/159213 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21963 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
* Store the url into a stack variable for the CHECK when connection_group.empty().willchan@chromium.org2009-07-291-3/+11
| | | | | | | | BUG=http://crbug.com/15374. Review URL: http://codereview.chromium.org/160315 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21942 0039d316-1c4b-4281-b951-d872f2087c98
* Assorted fixes for 64-bit.deanm@chromium.org2009-07-282-4/+4
| | | | | | | Review URL: http://codereview.chromium.org/160288 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21891 0039d316-1c4b-4281-b951-d872f2087c98
* Rework FTP control response parsing code and fix socket Write misuse.phajdan.jr@chromium.org2009-07-287-217/+524
| | | | | | | | | | | It also fixes other minor issues in the code, and makes ftp.vim.org work! TEST=Visit ftp.vim.org on Linux with Chromium compiled in Debug mode. You should see directory listing after a short while. BUG=http://crbug.com/15792 Review URL: http://codereview.chromium.org/149368 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21881 0039d316-1c4b-4281-b951-d872f2087c98
* Consider "127.0.0.1" and "[::1]" local addresses for the purposes of proxy ↵ericroman@google.com2009-07-283-203/+255
| | | | | | | | | | | bypass. BUG=http://crbug.com/17903 TEST=ProxyServiceTest.IsLocalName Review URL: http://codereview.chromium.org/159526 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21876 0039d316-1c4b-4281-b951-d872f2087c98
* Moved the logical dependency on Blacklist from URLRequestContextidanan@chromium.org2009-07-281-7/+1
| | | | | | | | | | | to ChromeURLRequestContext. BUG=16932 TEST=none Review URL: http://codereview.chromium.org/159519 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21874 0039d316-1c4b-4281-b951-d872f2087c98
* Remove *.vsprops files that are no longer referenced (or only havesgk@google.com2009-07-281-8/+0
| | | | | | | | | references to each other) anywhere in the Chromium code base. BUG=none TEST=rebuild Review URL: http://codereview.chromium.org/159523 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21873 0039d316-1c4b-4281-b951-d872f2087c98
* Make CookieStore dtor virtualamit@chromium.org2009-07-281-0/+2
| | | | | | | | | | | CookieMonster is deleted using the CookieStore ptr. Make the dtor virtual so that the correct dtor is called. TBR=darin Review URL: http://codereview.chromium.org/160271 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21838 0039d316-1c4b-4281-b951-d872f2087c98
* Navigation and cookies for Automationamit@chromium.org2009-07-289-57/+139
| | | | | | | | | | | | | Give Automation better visibility and control over navigations. Also, make it possible for automation to implement a dummy cookie store to go with dummy request serving over automation. BUG=none TEST=none Review URL: http://codereview.chromium.org/159189 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21836 0039d316-1c4b-4281-b951-d872f2087c98
* Clean-up proxy_service_unittest.cc, to remove dependency on ↵ericroman@google.com2009-07-281-744/+607
| | | | | | | | | | | | | | SingleThreadedProxyResolver. This was a TODO generated in <http://codereview.chromium.org/149525> This simplifies the test code since everything is running on one thread. BUG=http://crbug.com/11746, http://crbug.com/11079 Review URL: http://codereview.chromium.org/160155 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21829 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Delete chained block files when they become empty.rvargas@google.com2009-07-284-22/+121
| | | | | | | | | | | | | | | We were leaving empty block files in the chain, and worst of all, not reusing them because we were thinking that these files were "almost full". Now we also check for empty files when the cache starts. BUG=16740 TEST=unittest. Review URL: http://codereview.chromium.org/159451 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21762 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup in url_request_new_ftp_job.phajdan.jr@chromium.org2009-07-272-3/+1
| | | | | | | | | | | The header tried overriding a non-virtual method, changing its visibility. By the way, there was no implementation provided for this "overriden" method. I just hit that while fixing other things. Review URL: http://codereview.chromium.org/160173 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21730 0039d316-1c4b-4281-b951-d872f2087c98
* Fix LogTCPConnectedMetrics. Add FieldTrials for late binding (enable for ↵willchan@chromium.org2009-07-272-13/+48
| | | | | | | | 50% of dev channel). Review URL: http://codereview.chromium.org/159038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21727 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the concept of threading from ProxyService, and move it into the ↵ericroman@google.com2009-07-2616-316/+1079
| | | | | | | | | | | | | | | | | | | | | | | | ProxyResolver dependency. ProxyResolver may now complete requests asynchronously, and is defined to handle multiple requests. The code from ProxyService that queued requests onto the single PAC thread has moved into SingleThreadedProxyResolver. This refactor lays the groundwork for: (1) http://crbug.com/11746 -- Run PAC proxy resolving out of process. (Can inject an IPC bridge implementation of ProxyResolver) (2) http://crbug.com/11079 -- Run PAC proxy resolving on multiple threads. (Can implement a MultithreadedProxyResolver type class; still complications around v8 threadsafety though). BUG=http://crbug.com/11746, http://crbug.com/11079 TEST=existing unit-tests. Review URL: http://codereview.chromium.org/149525 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21631 0039d316-1c4b-4281-b951-d872f2087c98
* Implement mimetype sniffing for extensions.aa@chromium.org2009-07-252-1/+107
| | | | | | | | | | | abarth: can you review the changes to mime_sniffer.cc? paul: everything else? BUG=13296 TEST=Added unit tests Review URL: http://codereview.chromium.org/159345 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21612 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented rest of webkit api/glue code needed for HTML5 media canPlayType().scherkus@chromium.org2009-07-252-0/+36
| | | | | | | | | | BUG=16636 TEST=we should respect the codecs= parameter when provided as a media mime type Review URL: http://codereview.chromium.org/160073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21607 0039d316-1c4b-4281-b951-d872f2087c98
* Updated media MIME type handling for Chrome and Chromium.scherkus@chromium.org2009-07-251-9/+2
| | | | | | | | | | | | This might break some layout tests, but that's ok -- we'll disable them for now. BUG=16636,16779 TEST=none Review URL: http://codereview.chromium.org/160125 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21596 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Avoid restarting the cache while it may be in use.rvargas@google.com2009-07-243-5/+19
| | | | | | | | | | | | | | Now the code that releases resources runs from the message loop so that methods can cause the cache to disable itself while still being able to touch internal state. BUG=17604 TEST=unittests. Review URL: http://codereview.chromium.org/159327 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21550 0039d316-1c4b-4281-b951-d872f2087c98
* Return Error Status Upon Blocking Requestsidanan@chromium.org2009-07-242-5/+5
| | | | | | | | | | | | | | | Blocked requests now return an error status so that the Chrome throbber does not spin indefinitely when blocking URL requests. This code shall be replaced with resource substitution next but gives a better experience until then. Same goes for the added type-based interception. TEST=none BUG=16932 Review URL: http://codereview.chromium.org/159214 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21536 0039d316-1c4b-4281-b951-d872f2087c98
* Implement OCSP handler for NSS.ukai@chromium.org2009-07-243-0/+626
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/126046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21508 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
* linux: generalize desktop environment guessing to encompass KDEevan@chromium.org2009-07-233-49/+53
| | | | | | | | BUG=17363 Review URL: http://codereview.chromium.org/159297 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21455 0039d316-1c4b-4281-b951-d872f2087c98
* Add support to URLRequest for deferring redirects.darin@chromium.org2009-07-238-44/+158
| | | | | | | | | | | | | | | | | | | | I chose to add an out parameter to OnReceivedRedirect because it allows for the default behavior to remain the same. I considered adding a ContinueAfterRedirect method that all OnReceivedRedirect implementations would need to call, but this caused one annoying problem: In the case of a ChromePlugin, it is possible for the URLRequest to get deleted inside the handler for the redirect. This would make it hard to subsequently call a method on the URLRequest since I would need to have a way to determine if the URLRequest had been deleted. TEST=covered by unit tests BUG=16413,6442 R=eroman,wtc Review URL: http://codereview.chromium.org/155897 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21417 0039d316-1c4b-4281-b951-d872f2087c98
* Strip embedded "#" in URLs when constructing HTTP cache key.ericroman@google.com2009-07-232-5/+28
| | | | | | | | | BUG=http://crbug.com/17493 TEST=HttpCache.UrlContainingHash Review URL: http://codereview.chromium.org/155972 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21408 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Fix handling of invalid entries that are detectedrvargas@google.com2009-07-2310-80/+200
| | | | | | | | | | | | | | | | | | | | when doing evictions or enumerations. This cl fixes an issue with dirty entries being deleted twice from disk, and improves the whole thing so that different flavors or corrupt entries are removed gracefully. We started deleting things twice when we created the map of currently-open entries, because we don't want to have dirty entries on that map, so it is possible to have multiple EntryImpl objects that refer to the same entry (for corrupt entries). BUG=17474 TEST=Unittests, stress_cache.exe Review URL: http://codereview.chromium.org/155951 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21360 0039d316-1c4b-4281-b951-d872f2087c98
* Add unit-test for 16199, to check caching behavior of conditonalized cache ↵ericroman@google.com2009-07-231-3/+132
| | | | | | | | | | | | requests (if-modified-since). This test does not pass, and is currently disabled -- it will be enabled once 16199 is fixed. BUG=http://crbug.com/16199 Review URL: http://codereview.chromium.org/159220 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21359 0039d316-1c4b-4281-b951-d872f2087c98
* Limit total number of sockets in the system.phajdan.jr@chromium.org2009-07-228-91/+441
| | | | | | | | | | 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
* mp4 types in omnibox only for chrome, not chromiumfbarchard@chromium.org2009-07-221-0/+3
| | | | | | | | | | | | The types are still claimed as supported because layout tests require them, but the extensions will not map to mimetypes, so typing them into the omnibox will download instead of trying to play the video. The fixes for canPlayType that kyle is doing will fix some of this, and we'll also need to update the media in the layouttests. So that portion of mimetype will be deferred BUG=17323 TEST=in the omni box type in the name of an mp4 and it should work in chrome, but not in chromium. Review URL: http://codereview.chromium.org/155835 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21261 0039d316-1c4b-4281-b951-d872f2087c98
* Try again: Add proxy config (using gnome-network-preferences)mattm@chromium.org2009-07-223-54/+9
| | | | | | | | | BUG=11507 TEST=Open options, click change proxy, gnome-network-preferences should launch.  If gnome isn't installed or running, LinuxProxyConfig wiki page should load. Review URL: http://codereview.chromium.org/155792 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21246 0039d316-1c4b-4281-b951-d872f2087c98
* Change URLRequest to return net::ERR_INVALID_URL on redirects to invalid urls.willchan@chromium.org2009-07-214-0/+21
| | | | | | | | | BUG=http://crbug.com/17126 TEST=net_unittests Review URL: http://codereview.chromium.org/159034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21234 0039d316-1c4b-4281-b951-d872f2087c98
* Use new char[] to match the delete[]. To fix a valgrind error.ericroman@google.com2009-07-181-4/+5
| | | | | | | | | | BUG=http://crbug.com/17169 TBR=willchan TEST=SOCKS5 unit test under valgrind. Review URL: http://codereview.chromium.org/159052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21055 0039d316-1c4b-4281-b951-d872f2087c98
* Use manually constructed IPv6 socket addresses for tests, rather than system ↵ericroman@google.com2009-07-187-42/+125
| | | | | | | | | | | | | | | 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
* Add synchronous-mode operation to MockHostResolver; this helps clarify some ↵ericroman@google.com2009-07-185-44/+85
| | | | | | | | tests, which were using caching to get synchronous resolutions.TEST=existingBUG=NONE (addresses a TODO however). Review URL: http://codereview.chromium.org/155620 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21052 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Add proxy config (using gnome-network-preferences)"mattm@chromium.org2009-07-181-2/+7
| | | | | | | | This reverts commit d06bc0c855b1e81e36c7bfc9bef342eb358d99a5. TBR=estade git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21033 0039d316-1c4b-4281-b951-d872f2087c98
* Add proxy config (using gnome-network-preferences)mattm@chromium.org2009-07-171-7/+2
| | | | | | | | | BUG=11507 TEST=Open options, click change proxy, gnome-network-preferences should launch. If gnome isn't installed, LinuxProxyConfig wiki page should load. Review URL: http://codereview.chromium.org/149785 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21023 0039d316-1c4b-4281-b951-d872f2087c98
* Add codec parsing capability to MimeUtilkylep@chromium.org2009-07-173-0/+61
| | | | | | | | BUG=16636 TEST=mime_util_unittest.cc Review URL: http://codereview.chromium.org/149761 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21021 0039d316-1c4b-4281-b951-d872f2087c98
* Use base::Time::Exploded instead of struct tm inwtc@chromium.org2009-07-173-159/+120
| | | | | | | | | | | | | | | ftp_directory_parser.{h,cc}. The patch is contributed by Ibrar Ahmed <ibrar.ahmad@gmail.com>. Original review URL: http://codereview.chromium.org/126096 R=wtc BUG=http://crbug.com/4965 TEST=none Review URL: http://codereview.chromium.org/149772 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21003 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Add support for having a sparse entry block thatrvargas@google.com2009-07-176-49/+277
| | | | | | | | | | | | | | | | | | is not totally filled. This is required to allow two consecutive writes to fill a given range without caring about the actual start offset of the second one (as long as it is right where the first one ended). This CL also takes care of all pending TODOs of the sparse disk cache. Sparse disk cache support is now feature complete. BUG=12258 TEST=unittests Review URL: http://codereview.chromium.org/155590 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20988 0039d316-1c4b-4281-b951-d872f2087c98
* 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