summaryrefslogtreecommitdiffstats
path: root/net/base
Commit message (Collapse)AuthorAgeFilesLines
* Fix build break from my last checkin. I accidently removed -T from the ↵jam@chromium.org2009-12-232-8/+3
| | | | | | | | | parameters to gperf, which supresses adding the struct to the generated file for the second unit test hash. TBR=brettw Review URL: http://codereview.chromium.org/518002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35198 0039d316-1c4b-4281-b951-d872f2087c98
* Use a perfect hash map for the registry controlled domain service.jam@chromium.org2009-12-239-3872/+18488
| | | | | | | | On my very fast machine, building the std::set in release mode on startup and blocks the UI thread for 15ms (there are > 3300 entries). It also uses 275KB of memory, not including 50KB of data in the dll. Using a perfect hash map, there's no startup cost. The dll's size increases by 135KB but there's no extra memory consumption, leading to a memory reduction of 140KB. Review URL: http://codereview.chromium.org/515001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35196 0039d316-1c4b-4281-b951-d872f2087c98
* Add LoadLogging to SOCKS5ClientSocket. Logs the state transitions, and more ↵eroman@chromium.org2009-12-221-0/+16
| | | | | | | | verbose information on errors. Review URL: http://codereview.chromium.org/503078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35128 0039d316-1c4b-4281-b951-d872f2087c98
* Move some logging from LOG(INFO) to the LoadLog. These particular ones are ↵eroman@chromium.org2009-12-221-0/+5
| | | | | | | | for proxy initialization, and are enabled in passive mode since the data will be little. Review URL: http://codereview.chromium.org/501162 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35123 0039d316-1c4b-4281-b951-d872f2087c98
* Fix benign race on NetworkChangeNotifierThread's vtable pointer.willchan@chromium.org2009-12-211-0/+1
| | | | | | | | See bug 25385 and http://code.google.com/p/data-race-test/wiki/PopularDataRaces for details. Review URL: http://codereview.chromium.org/509017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35116 0039d316-1c4b-4281-b951-d872f2087c98
* Detects network changes. Only for Mac OS X so far. Hooks up ↵willchan@chromium.org2009-12-2111-0/+596
| | | | | | | | | | | TCPClientSocketPool to flush idle sockets on IP address change. BUG=http://crbug.com/26156 TEST=Run chrome with both network cable and wireless on. Go to www.google.com, twice. Verify second time via chrome://net-internals that the second request did not need a TCP_CONNECT_JOB, since we reused idle sockets. Unplug network cable. This should flush idle sockets. Go back to www.google.com. Check chrome://net-internals. Verify that there is a TCP_CONNECT_JOB for that request, because there was no idle socket to reuse. Review URL: http://codereview.chromium.org/460149 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35107 0039d316-1c4b-4281-b951-d872f2087c98
* Extend LoadLog to support logging of arbitrary strings, and of network error ↵eroman@chromium.org2009-12-217-141/+331
| | | | | | | | | | | | | | codes. - The logging of error codes is intended to be used in passive mode. - The logging of string messages is intended to be used when in full-logging mode. - The logging of string literal messages is intended to be used in passive mode. BUG=27552 Review URL: http://codereview.chromium.org/503066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35103 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Use asynchronous IO to read an write thervargas@google.com2009-12-211-0/+21
| | | | | | | | | | | | response headers from the disk cache. BUG=26729 TEST=current unit tests. Review URL: http://codereview.chromium.org/506081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35094 0039d316-1c4b-4281-b951-d872f2087c98
* net: Make a few test server connection values constants. Also do a little ↵thestig@chromium.org2009-12-181-0/+18
| | | | | | | | | | FilePath cleanup while we're at it. BUG=none TEST=Net unittests do not time out on the fyi wine/valgrind test bot. Review URL: http://codereview.chromium.org/501100 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34933 0039d316-1c4b-4281-b951-d872f2087c98
* Pass the LoadLog through the FlipStream.mbelshe@google.com2009-12-182-0/+36
| | | | | | | | | BUG=none TEST=FlipNetworkTransactionTest.LoadLog Review URL: http://codereview.chromium.org/500083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34920 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Add a test to make sure that the cachervargas@google.com2009-12-181-0/+7
| | | | | | | | | | | | | | | | works as expected with synchronous responses. As an added bonus, now changing the default test mode of kRangeGET_TransactionOK doesn't end up with some tests hanging, so it is easy to manually verify that all tests work as expected. BUG=26729 TEST=unittests Review URL: http://codereview.chromium.org/501099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34914 0039d316-1c4b-4281-b951-d872f2087c98
* Add more load log points near HttpNetworkTransaction::ReadHeadersvandebo@chromium.org2009-12-171-0/+7
| | | | | | | | | TEST=none BUG=27324 Review URL: http://codereview.chromium.org/501034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34853 0039d316-1c4b-4281-b951-d872f2087c98
* Give classes with virtual methods virtual protected destructors instead of ↵jamesr@chromium.org2009-12-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | implicit non-virtual public destructors. Was originally: Replace public nonvirtual destructors in classes with virtual members with protected nonvirtual destructors where possible, and with public virtual destructors where destruction of a derived class occurs. (Excluding chrome/browser/...) (Part 4 of http://www.gotw.ca/publications/mill18.htm has a rationale for why public nonvirtual destructors in classes with virtual members is dangerous.) Patch by: Jacob Mandelson (jlmjln@gmail.com) BUG=none TEST=base_unittests & app_unittests Review URL: http://codereview.chromium.org/200106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34633 0039d316-1c4b-4281-b951-d872f2087c98
* Flip: Comma delimit the various flip options. Redo the fixed testing server ↵willchan@chromium.org2009-12-152-17/+10
| | | | | | | | | | flags. Renames --testing-fixed-server to --testing-fixed-host. Adds --testing-fixed-http-port and --testing-fixed-https-port. Review URL: http://codereview.chromium.org/501032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34624 0039d316-1c4b-4281-b951-d872f2087c98
* Get the new certificate for https://www.unosoft.hu/ and re-enable thewtc@chromium.org2009-12-152-61/+64
| | | | | | | | | | | | | | | | | X509CertificateTest.UnoSoftCertParsing unit test. Add the https://www.unosoft.hu/ certificate as net/data/ssl/certificates/unosoft_hu_cert.der in preparation of changing the X509CertificateTest tests to read from external certificate data files. R=rvargas BUG=30345 TEST=X509CertificateTest.UnoSoftCertParsing should run and pass when running net_unittests. Review URL: http://codereview.chromium.org/495018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34612 0039d316-1c4b-4281-b951-d872f2087c98
* Add tests for SocketStreamMetrics.satorux@chromium.org2009-12-151-0/+3
| | | | | | | | | | | | | | Tests for SocketStreamMetrics were missing, which is not great. Note that the tests became a bit more complex than I originally thought as the global histograms are shared by other tests in other files. TEST=net_unittests BUG=none Review URL: http://codereview.chromium.org/491045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34536 0039d316-1c4b-4281-b951-d872f2087c98
* Minor cleanup: add a sys_addrinfo.h header that hides the platform-specific ↵eroman@chromium.org2009-12-126-36/+28
| | | | | | | | | | includes needed for struct addrinfo / struct sockaddr, since we were duplicating that #if #else logic in a growing number of places. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/491038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34399 0039d316-1c4b-4281-b951-d872f2087c98
* Improve unit tests to verify that directories are listed before files in ↵vandebo@chromium.org2009-12-112-0/+31
| | | | | | | | | | | | | file:/// urls. And fix current regression. BUG=28420 TEST=improved unit tests Review URL: http://codereview.chromium.org/492015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34382 0039d316-1c4b-4281-b951-d872f2087c98
* SPDY: augment Strict Transport Security with the beginnings of SPDY upgrade.agl@chromium.org2009-12-117-336/+565
| | | | | | | | | | | | | | | | | | | | | | | This adds an opportunistic flag to the information that we store in the Strict Transport Security State. Given this, STSS might be misnamed now, but renaming it in this patch would add huge amounts of noise. We process the 'X-Bodge-Transport-Security' header which has the same format as the STS header. When we see this on an HTTP connection, we'll probe for a clean HTTPS path to the host and then remember it. This header should be considered mutually exclusive with STS, although this isn't enforced in the code. The remembered flag is currently ignored by the rest of the code. This will be addressed in a future patch. The header should be called 'Opportunistic-Transport-Security' in the future, but we have some issues to work out before we take that name. http://codereview.chromium.org/456011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34380 0039d316-1c4b-4281-b951-d872f2087c98
* landing the issue 482008 for dmuiroshima@chromium.org2009-12-101-1/+1
| | | | | | | | | | | original cl: http://codereview.chromium.org/482008 BUG=29578 TEST=Run valgrind test Review URL: http://codereview.chromium.org/491028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34306 0039d316-1c4b-4281-b951-d872f2087c98
* Add GetNextProtocol method to SSLClientSocket.agl@chromium.org2009-12-101-17/+1
| | | | | | http://codereview.chromium.org/484005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34288 0039d316-1c4b-4281-b951-d872f2087c98
* Cache failed DNS resolutions for 1 second.eroman@chromium.org2009-12-107-65/+159
| | | | | | | | | | | | | | | | | | This is a very small time to live, since we want to be able to respond quickly when formerly unresolvable names become resolvable. Even such a small time is still useful, since cache misses for unresolvable names can be extremely costly (order of several seconds). For example, in our corp PAC script, the URL's host is resolved 3 times, so: Without caching, total runtime is (2.5 seconds) * 3 --> 7.5 seconds. Whereas with caching it would be: (2.5 seconds) * 1 --> 2.5 seconds This time to live will need to be tuned as part of bug 25472. BUG=11079 Review URL: http://codereview.chromium.org/464084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34238 0039d316-1c4b-4281-b951-d872f2087c98
* Adjust our sniffing hueristics to better match Firefox.abarth@chromium.org2009-12-102-6/+14
| | | | | | | | | | | | | | | We used to be willing to sniff "safe" mime types from application/octet-stream, but we ran into compatibility problems with sites that wanted to use application/octet-stream to trigger a download. To have better compatibility with these sites, we've changed our sniffing algorith to be slightly less agressive. BUG=29354 Review URL: http://codereview.chromium.org/467035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34237 0039d316-1c4b-4281-b951-d872f2087c98
* Define X509Certificate::intermediate_ca_certs_ as a std::vector ofwtc@chromium.org2009-12-093-42/+22
| | | | | | | | | | | | | | | | OSCertHandle so that we can also use it on Windows. Remove the unused SSLClientSocketMac::intermediate_certs_ member. R=hawk BUG=28744 TEST=Can visit good HTTPS sites with no certificate errors. Clicking the "Certificate information" button in the page security information window should show a complete certificate chain (as opposed to just the server certificate). Review URL: http://codereview.chromium.org/452042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34175 0039d316-1c4b-4281-b951-d872f2087c98
* Sanitize index because it comes from the untrusted renderer.cevans@chromium.org2009-12-091-0/+4
| | | | | | | | | BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/471005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34127 0039d316-1c4b-4281-b951-d872f2087c98
* Remove bzip2 decoding support completely.thestig@chromium.org2009-12-087-618/+0
| | | | | | | | BUG=14801,26577 TEST=see bug. Review URL: http://codereview.chromium.org/466038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34047 0039d316-1c4b-4281-b951-d872f2087c98
* Don't assert what the certificate's subjectAltName extensionwtc@chromium.org2009-12-072-10/+16
| | | | | | | | | | | | contains, which can be anything. Assert the type of subjectAltName we're trying to find. R=avi BUG=none TEST=none Review URL: http://codereview.chromium.org/464026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33995 0039d316-1c4b-4281-b951-d872f2087c98
* Use factory to create histograms, and refcounts to track lifetimesjar@chromium.org2009-12-063-55/+62
| | | | | | | | | | | | | | | This is CL patch 377028 by Raman Tenneti, with minor changes to make the try-bots happier. It is cleanup that better ensures lifetimes of histograms (making it harder for users to abuse them). bug=16495 (repairs leak induced by the first landing) bug=18840 (should make leaks less possible) tbr=raman.tenneti Review URL: http://codereview.chromium.org/462027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33933 0039d316-1c4b-4281-b951-d872f2087c98
* Enable LoadLog for Flip. Improve some LOG messages.willchan@chromium.org2009-12-041-0/+16
| | | | | | Review URL: http://codereview.chromium.org/465061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33884 0039d316-1c4b-4281-b951-d872f2087c98
* Temporarily disable enforcing test isolation for net_unittests.phajdan.jr@chromium.org2009-12-041-1/+1
| | | | | | | | | | | | It exposed problems with some tests which manifest as flakiness. Will debug offline. BUG=12710 TBR=wtc Review URL: http://codereview.chromium.org/465066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33852 0039d316-1c4b-4281-b951-d872f2087c98
* Disable the X509CertificateTest.UnoSoftCertParsing unit test becausewtc@chromium.org2009-12-041-1/+2
| | | | | | | | | | | the certificate just expired. TBR=cpu BUG=none TEST=none Review URL: http://codereview.chromium.org/464040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33833 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a couple of data races on booleanstimurrrr@chromium.org2009-12-042-9/+9
| | | | | | | | | BUG=21468,22520 For the explanation why these are data races, see http://code.google.com/p/data-race-test/wiki/PopularDataRaces Review URL: http://codereview.chromium.org/251027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33825 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes to the string MatchPattern functions:tony@chromium.org2009-12-031-1/+1
| | | | | | | | | | | | | | | 1) Make it explicit that it only supports ASCII (since it iterates character by character). 2) Limit the recursion to 16 levels. We could allow more, but in the case of a ?, it has exponential complexity, so I figured 16 was a good stopping point. It seems rare that someone would have more than 16 '?' and '*'s. BUG=28645 Review URL: http://codereview.chromium.org/460047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33748 0039d316-1c4b-4281-b951-d872f2087c98
* Implement "Email Link To Page" menu command.snej@chromium.org2009-12-032-0/+6
| | | | | | | | | | | | | | | | | | | This menu item only exists in the Mac build, but the code is cross-platform so it could be hooked up on other platforms as well, if desired. It works by generating a URL of the form mailto:?subject=Fwd:%20PAGETITLE&body=%0A%0APAGEURL and telling platform_utils to open it. This is my first patch involving command handling; I've tried to follow the way similar menu commands like Print are implemented, but feel free to tell me if there are better ways. I didn't find any place for unit tests for TabContents; if this needs tests, let me know where they should go. BUG=29232 TEST=none Review URL: http://codereview.chromium.org/466019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33746 0039d316-1c4b-4281-b951-d872f2087c98
* Add mpeg audio mime type allowing mp3 to play with chrome on more websites.fbarchard@chromium.org2009-12-031-0/+1
| | | | | | | | | BUG=29288 TEST=play this file: http://www.louderproductions.com/mp3/Killshot.mp3 and make sure controls work. Review URL: http://codereview.chromium.org/455044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33710 0039d316-1c4b-4281-b951-d872f2087c98
* [GTTF] Apply test isolation goodness to net_unittests.phajdan.jr@chromium.org2009-12-022-7/+15
| | | | | | | | | TEST=Covered by net_unittests and test_shell_tests. BUG=12710 Review URL: http://codereview.chromium.org/460014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33594 0039d316-1c4b-4281-b951-d872f2087c98
* Update network priorities to support better granularitymbelshe@google.com2009-12-021-0/+22
| | | | | | | | | | | | | | of resource loading from WebKit into the network stack. In order to fully make these work, webkit changes are needed as well. BUG=none TEST=none Review URL: http://codereview.chromium.org/452033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33546 0039d316-1c4b-4281-b951-d872f2087c98
* Add a new event to LoadLog:eroman@chromium.org2009-12-011-0/+3
| | | | | | | | | | | | | | | | | PROXY_SERVICE_POLL_CONFIG_SERVICE_FOR_CHANGES which measures how much time was spent per request retrieving the system proxy settings. On Windows this corresponds with the function: WinHttpGetIEProxyConfigForCurrentUser(). Which seems to be very slow on some systems. BUG=12189 Review URL: http://codereview.chromium.org/452034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33508 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the unnecessary workaround for NSS bug 455424, now that we requirewtc@chromium.org2009-12-013-12/+0
| | | | | | | | | | | NSS 3.12.3 or later. R=ukai BUG=none TEST=No compilation errors. Review URL: http://codereview.chromium.org/452014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33464 0039d316-1c4b-4281-b951-d872f2087c98
* Add -profile command line switchdavemoore@chromium.org2009-11-301-1/+2
| | | | | | Review URL: http://codereview.chromium.org/384062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33335 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: add next-protocol-negotiation to libssl.agl@chromium.org2009-11-302-2/+29
| | | | | | | | | | | | This is an experimental, client only implementation of next-protocol-negotiation: http://www.imperialviolet.org/binary/draft-agl-tls-nextprotoneg-00.html This only affects the internal copy of libssl and is only active when built with use_system_ssl=0, which is not currently the default. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33327 0039d316-1c4b-4281-b951-d872f2087c98
* Remove std::wstring from most of net/base/escape.h.darin@chromium.org2009-11-304-34/+38
| | | | | | | | | | | | | | | | | | | I left the one API because based on the comment, it should eventually be removed. Updated the callers to use UTF16ToWideHack until more work can be done to remove std::wstring. I also updated net/base/escape_unittest.cc to use the same hack until a proper solution can be coded. Original patch submission here: http://codereview.chromium.org/402085 Patch by Patrick Scott (phanna@android.com) R=darin BUG=23581 TEST=escape_unittest Review URL: http://codereview.chromium.org/452015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33326 0039d316-1c4b-4281-b951-d872f2087c98
* Define the GetPeerName method of the ClientSocket interface for allwtc@chromium.org2009-11-301-1/+0
| | | | | | | | | | | | | | | platforms, in preparation for using SSLClientSocketNSS on Windows. nss_memio.c does not need to include <unistd.h> Fix style nits. R=eroman BUG=28744 TEST=none Review URL: http://codereview.chromium.org/440031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33319 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Apply test isolation goodness to net_unittests."phajdan.jr@chromium.org2009-11-262-14/+7
| | | | | | | | | | | | | Revert "Fix a memory leak in DnsReloadTimer" Valgrind test_shell_tests still fails, will investigate offline. :( TBR=wtc BUG=12710 Review URL: http://codereview.chromium.org/434115 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33205 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a memory leak in DnsReloadTimerphajdan.jr@chromium.org2009-11-261-0/+1
| | | | | | | | | TBR=wtc BUG=12710 Review URL: http://codereview.chromium.org/443019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33204 0039d316-1c4b-4281-b951-d872f2087c98
* Apply test isolation goodness to net_unittests.phajdan.jr@chromium.org2009-11-262-7/+13
| | | | | | | | | | | | We're going to have it enabled for all tests, but I'm enabling it one-by-one to limit damage from possible problems. TEST=none BUG=12710 Review URL: http://codereview.chromium.org/439007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33202 0039d316-1c4b-4281-b951-d872f2087c98
* Many changes to DictionaryValues:pkasting@chromium.org2009-11-251-3/+3
| | | | | | | | | | | | | | | | | * Add support for keys with "." in them via new XXXWithoutPathExpansion() APIs. * Use these APIs with all key iterator usage. * SetXXX() calls cannot fail, so change them from bool to void. * Change GetSize() to size() since it's cheap, and add empty(). Other: * Use standard for loop format in more places (e.g. instead of while loops when they're really doing a for loop). * Shorten a few bits of code. BUG=567 TEST=none Review URL: http://codereview.chromium.org/441008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33109 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the temporary instrumentation to getaddrinfo().eroman@chromium.org2009-11-251-20/+1
| | | | | | | | | | This is a revert of r31267. BUG=22083 Review URL: http://codereview.chromium.org/434048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33009 0039d316-1c4b-4281-b951-d872f2087c98
* Move base64 from 'net/base' into 'base'.hayato@chromium.org2009-11-247-101/+9
| | | | | | | | | BUG=13572 TEST=none Review URL: http://codereview.chromium.org/399068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32918 0039d316-1c4b-4281-b951-d872f2087c98
* A large Content-Length header followed by a connection close could trigger ↵vandebo@chromium.org2009-11-231-3/+1
| | | | | | | | | | | | an out of memory condition. Fixed problem, added unit test, and clarified the API. This is probably the real problem in issue 25826. BUG=28346, 25826 TEST=HttpNetworkTransactionTest.LargeContentLengthThenReset Review URL: http://codereview.chromium.org/418035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32856 0039d316-1c4b-4281-b951-d872f2087c98