summaryrefslogtreecommitdiffstats
path: root/net/base
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Some small comment fixes for HostResolver and DnsMaster.eroman@chromium.org2009-11-231-2/+3
| | | | | | | | | | | Original patch by cbentzel@google.com (see http://codereview.chromium.org/437005) r=me BUG=NONE Review URL: http://codereview.chromium.org/437009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32816 0039d316-1c4b-4281-b951-d872f2087c98
* Work around the NSS bugs in the AIA certificate fetch code by retryingwtc@chromium.org2009-11-203-438/+622
| | | | | | | | | | | | | | | | | | | | CERT_PKIXVerifyCert without cert_pi_useAIACertFetch. Add a unit test with a certificate that gives cert_pi_useAIACertFetch trouble. Remove workarounds for old versions of NSS. Map the NSPR error PR_DIRECTORY_LOOKUP_ERROR to ERR_NAME_NOT_RESOLVED. Move the certificate data to a new header x509_certificate_unittest.h to make x509_certificate_unittest.cc less crowded. R=eroman BUG=27497 TEST=new unit test Review URL: http://codereview.chromium.org/418001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32712 0039d316-1c4b-4281-b951-d872f2087c98
* Don't wrap the Size and Date Modified columns in the directory listing view.eroman@chromium.org2009-11-201-4/+4
| | | | | | | | BUG=2795 Review URL: http://codereview.chromium.org/410008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32603 0039d316-1c4b-4281-b951-d872f2087c98
* Add compiler-specific "examine printf format" attributes to printfs.evan@chromium.org2009-11-204-14/+16
| | | | | | | | | | | | Functions that take a printf-style format get a new annotation, which produces a bunch of compiler warnings when you use printf impoperly. This change adds the annotations and fixes the warnings. We now must use PRId64 for 64-bit numbers and the PRIsz for size_t. Review URL: http://codereview.chromium.org/339059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32600 0039d316-1c4b-4281-b951-d872f2087c98
* Try to find the cause of the crash in memcpy, called from DoSendBody.vandebo@chromium.org2009-11-191-1/+2
| | | | | | | | | BUG=27870 TEST=none Review URL: http://codereview.chromium.org/404034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32544 0039d316-1c4b-4281-b951-d872f2087c98
* Display application/json files inline.thestig@chromium.org2009-11-181-0/+1
| | | | | | | | BUG=27884 TEST=see bug. Review URL: http://codereview.chromium.org/385148 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32375 0039d316-1c4b-4281-b951-d872f2087c98
* Split *AndAdjustOffset() functions into their own header, to restore ↵pkasting@chromium.org2009-11-132-2/+4
| | | | | | | | | | utf_string_conversions.h to a simple, readable state. BUG=4010 TEST=none Review URL: http://codereview.chromium.org/387012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31928 0039d316-1c4b-4281-b951-d872f2087c98
* Plumb LoadLog into SocketStreamukai@chromium.org2009-11-131-0/+14
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/385003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31881 0039d316-1c4b-4281-b951-d872f2087c98
* Condense the output of LoadLog for empty BEGIN/END blocks.eroman@chromium.org2009-11-132-6/+23
| | | | | | | | Rather then printing across two lines, just do it on one line. Review URL: http://codereview.chromium.org/387043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31870 0039d316-1c4b-4281-b951-d872f2087c98
* Add LoadLog instrumentation to HttpNetworkTransaction, to tell how much time ↵eroman@chromium.org2009-11-131-0/+17
| | | | | | | | was spent reading/writing headers and reading/writing body. Review URL: http://codereview.chromium.org/384098 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31861 0039d316-1c4b-4281-b951-d872f2087c98
* Enable FLIP POST with unittest.mbelshe@google.com2009-11-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Involved some refactoring of FlipStreamParser/FlipStream/FlipSession. I now want to merge FlipStream and FlipStreamParser. In this CL: * Update the FlipDelegate to remove unused methods and add the OnWriteCompleted() method. * Add a full state machine to the FlipStreamParser. This is the same state machine which is used by the HttpStreamParser, with only small changes. The FLIP side of this only needs the write-state right now, and as we merge the FlipStream and FlipStreamParser, I think we'll get the full state machine hashed out. * POST now works (minimally). I need more testing for large posts. But the unittests are updated (using the new delayed async mock socket work). BUG=none TEST=flip_network_transaction_unittest.cc Review URL: http://codereview.chromium.org/390016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31772 0039d316-1c4b-4281-b951-d872f2087c98
* Lands http://codereview.chromium.org/379007 for Dave:sky@chromium.org2009-11-111-0/+2
| | | | | | | | | | | | Fixes leak in BackingStore as shown by valgrind. XFree doesn't free the data of the image, where as XDestroyImage does. BUG=none TEST=none Review URL: http://codereview.chromium.org/391008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31633 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of unused function, UTF8ToFilePathString.tony@chromium.org2009-11-101-12/+0
| | | | | | | | | | | | BUG=none TEST=none Original patch by hayato@google.com via: http://codereview.chromium.org/384003 Review URL: http://codereview.chromium.org/388010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31579 0039d316-1c4b-4281-b951-d872f2087c98
* After further discussion, do not try to handle memory errors, but make ↵vandebo@chromium.org2009-11-102-12/+8
| | | | | | | | | | | assertions about allocation parameters stronger. BUG=25826 TEST=none Review URL: http://codereview.chromium.org/378037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31574 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up recent string conversion function changes, part 1: Remove ↵pkasting@chromium.org2009-11-101-4/+4
| | | | | | | | | | | | unnecessary code. Thanks to a change in escape.cc I can basically revert the ICU conversions back to what they used to be; I can also get rid of half the conversions immediately since they aren't used. This does not split out the "adjust" versions of the UTF conversions into their own header/implementation; that's coming in the next patch. BUG=4010 TEST=none Review URL: http://codereview.chromium.org/380007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31533 0039d316-1c4b-4281-b951-d872f2087c98
* Fix various problems with inline autocomplete and URLs that change length ↵pkasting@chromium.org2009-11-076-238/+550
| | | | | | | | | | | | | | | | | | | | during fixup: * URLs with http auth info, which gets stripped * URLs with IDN hosts * URLs with escaped values that get unescaped In cases like these, we'd inline autocomplete from the wrong locations, highlight the wrong portions of the URL as matches, and sometimes DCHECK() in debug mode. The fix is to track how fixup affects the offsets into the URL we care about. Plumbing this required an enormous number of additions :( There is also a fix here to the URL Fixer Upper, which was obviously modified at some point in the past to use the Parsed components, but without updating the comments or some of the functionality to match. Since this isn't supposed to "fix up" things that aren't simple typos, I removed some code to "fix" bogus ports, which was causing bizarre effects when typing HTTP auth URLs ("http://foo:bar" would be fixed to "http://foo" and then matched for inline autocompletion, which was clearly wrong). This is tested incidentally by one of the new History URL Provider tests (which is how I discovered it). BUG=4010 TEST=Covered by unittests Review URL: http://codereview.chromium.org/372017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31352 0039d316-1c4b-4281-b951-d872f2087c98
* Improve the display of LoadLogs when truncation occurs.eroman@chromium.org2009-11-067-55/+111
| | | | | | | | | | | | | | Rather than drop all subsequent entries, we now preserve the final entry that was appended to the log. This way, even if entries have been dropped, we can still infer what the total time was, and what the exit condition was. Also makes LoadLog take the bound as a required parameter. BUG=none TEST=LoadLogUtilTest.DisplayOfTruncated Review URL: http://codereview.chromium.org/363025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31274 0039d316-1c4b-4281-b951-d872f2087c98
* Add some instrumentation to SystemHostResolverProc() to capture the hostname ↵eroman@chromium.org2009-11-061-1/+20
| | | | | | | | | | | | when getaddrinfo() crashes. This may help understand why we are seeing crashes in getaddrinfo() in the field. BUG=22083 Review URL: http://codereview.chromium.org/378011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31267 0039d316-1c4b-4281-b951-d872f2087c98
* Second patch in making destructors of refcounted objects private.jam@chromium.org2009-11-0529-59/+137
| | | | | | | | BUG=26749 Review URL: http://codereview.chromium.org/368001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31165 0039d316-1c4b-4281-b951-d872f2087c98
* Enable localization of default downloaded filename.tony@chromium.org2009-11-043-59/+82
| | | | | | | | | | | | | | | Instead of localizing "download" string in net_util.cc, make a caller, download_manger, provide a localized string. BUG=25289 TEST=NetUtilTest.GetSuggestedFilename,DownloadManagerTest.TestDownloadFilename Original patch by hayato@google.com at: http://codereview.chromium.org/343014/show Review URL: http://codereview.chromium.org/367003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30971 0039d316-1c4b-4281-b951-d872f2087c98
* Allow trailing dots on hostnames.pkasting@chromium.org2009-11-033-14/+12
| | | | | | | | BUG=25962 TEST=Type in "google.com." and verify you can navigate. Review URL: http://codereview.chromium.org/340070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30828 0039d316-1c4b-4281-b951-d872f2087c98
* Add a command line flag to force all network traffic through a particular ↵mbelshe@google.com2009-11-033-5/+101
| | | | | | | | | | | | | | | | | | server. The command line is: --fixed-server=host:port When set, all traffic will be diverted through this server. This is useful for testing purposes with fixed servers. BUG=none TEST=none Review URL: http://codereview.chromium.org/345034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30798 0039d316-1c4b-4281-b951-d872f2087c98
* Add LoadLog to ClientSocket::Connect().willchan@chromium.org2009-11-022-1/+40
| | | | | | | | TODO: Use LoadLog in FLIP code. Review URL: http://codereview.chromium.org/344026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30765 0039d316-1c4b-4281-b951-d872f2087c98
* Enable the Wells Fargo WellsSecure Public Root CA for EV.wtc@chromium.org2009-10-301-0/+6
| | | | | | | | | | | R=ian BUG=22679 TEST=https://nerys.wellsfargo.com/test.html should have the EV status. Make sure "Check for server certificate revocation" is enabled in the Options menu. Review URL: http://codereview.chromium.org/342061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30595 0039d316-1c4b-4281-b951-d872f2087c98
* X509Certificate::Verify should honor thewtc@chromium.org2009-10-302-13/+28
| | | | | | | | | | | | | | | | | | | VERIFY_REV_CHECKING_ENABLED flag. This allows us to enable part of the X509CertificateTest.PaypalNullCertParsing test for Linux because the test disables revocation checking, thereby avoiding the overly strict assertion in nss_ocsp.cc. Enable cert_pi_useAIACertFetch to fetch missing intermediate CA certificates. Handle a non-certificate error reported by PKIXVerifyCert. R=ukai BUG=none TEST=none Review URL: http://codereview.chromium.org/333033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30585 0039d316-1c4b-4281-b951-d872f2087c98
* Re-apply DevTools: Support delete cookie by name.pfeldman@chromium.org2009-10-302-6/+62
| | | | | | | | TBR=yurys Review URL: http://codereview.chromium.org/348021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30583 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 30578.pfeldman@chromium.org2009-10-302-61/+6
| | | | | | | TBR=yurys Review URL: http://codereview.chromium.org/342057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30580 0039d316-1c4b-4281-b951-d872f2087c98
* DevTools: Allow deleting cookies.pfeldman@chromium.org2009-10-302-6/+61
| | | | | | Review URL: http://codereview.chromium.org/350001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30578 0039d316-1c4b-4281-b951-d872f2087c98
* Make LoadLog refcounted-thread safe.eroman@chromium.org2009-10-292-10/+8
| | | | | | | | | | | | | | | | | | This also backs out r26610 (these are the changes to host_resolver_impl.cc), since that code is no longer necessary if LoadLog is refcounted thread safe. LoadLog itself is not thread safe -- however making its refcounting threadsafe simplifies passing it across thread boundaries. Initially I had avoided doing this, and instead was trying to be very careful in when callers would AddRef/Release to avoid races. This approach however turned out to be fragile, and it was difficult to chase down all of the dependencies (they just kept popping up). So now I am changing that decision, and opting for the simpler approach which will be much more robust. The performance impact should be negligable. BUG=22272 Review URL: http://codereview.chromium.org/347021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30525 0039d316-1c4b-4281-b951-d872f2087c98
* DevTools: Implement raw cookies access for inspector.pfeldman@chromium.org2009-10-292-0/+35
| | | | | | Review URL: http://codereview.chromium.org/294025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30457 0039d316-1c4b-4281-b951-d872f2087c98
* Missed review comment. Minor change.vandebo@chromium.org2009-10-281-2/+2
| | | | | | | | BUG=24687 TEST=unit tests still pass git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30387 0039d316-1c4b-4281-b951-d872f2087c98
* Change update threshold in CookieMonster for testing from 1s to 20ms to ↵vandebo@chromium.org2009-10-282-9/+9
| | | | | | | | | | | speedup test. BUG=24687 TEST=unit tests still pass Review URL: http://codereview.chromium.org/345012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30385 0039d316-1c4b-4281-b951-d872f2087c98