summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* Turn NULL used as int to 0.phajdan.jr@chromium.org2009-10-132-7/+8
| | | | | | | | | | | | | (Excluding chrome/browser/...) Landing patch for Jacob Mandelson. Original review: http://codereview.chromium.org/195067 BUG=none TEST=base_unittests & app_unittests Review URL: http://codereview.chromium.org/267076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28810 0039d316-1c4b-4281-b951-d872f2087c98
* Do not run FlipNetworkTransactionTest.Connect under ThreadSanitizer on Mac OStimurrrr@chromium.org2009-10-131-0/+1
| | | | | | | | | | | | | | The pre-3.5 version of ThreadSanitizer reports "aspacem" warnings on this test, the latest Tsan hangs silently. This test case was enabled in http://src.chromium.org/viewvc/chrome?view=rev&revision=28793, so we haven't seen the complaints before. This patch was prepared by Alexander Potapenko (cc'ed) TBR=dank Review URL: http://codereview.chromium.org/270083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28803 0039d316-1c4b-4281-b951-d872f2087c98
* This is a second attempt at submitting this changelist. The original one wasmarkus@chromium.org2009-10-133-13/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://codereview.chromium.org/196053 It turns out, since none of our tests abstract time correctly, unittests are very sensitive to subtle changes in timing. This made some of the valgrind tests on Linux fail, and unfortunately, neither my desktop nor the trybots could reproduce the problem reliably. As far as I can tell, all the (design) bugs are in the unittests. The browser is actually fine. Tweaked the code a little more. Will resubmit and carefully monitor the buildbots. Original change description follows: When converting between units of time or data types of different precision, we have to be careful to consistently round in the same direction. Timeout checks usually check if Now() is less or equal to a deadline in order to determine if a timeout has occurred. This correctly handles the case where actual sleep times are equal or longer than requested sleep times. But if we round down when setting the sleep delay, this can result in unnecessary and expensive looping. Make sure, we always round up when converting to a format with less precision. BUG=none TEST=none Review URL: http://codereview.chromium.org/257044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28801 0039d316-1c4b-4281-b951-d872f2087c98
* Mix mismatched new[] with delete. (should be delete[]).mbelshe@google.com2009-10-132-8/+8
| | | | | | | | | | BUG=none TEST=none TBR=jar@chromium.org Review URL: http://codereview.chromium.org/267071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28799 0039d316-1c4b-4281-b951-d872f2087c98
* Make SSLClientSocketNSS full-duplexukai@chromium.org2009-10-132-99/+238
| | | | | | | | | BUG=13289,12497 TEST=visit https site and works as before. Review URL: http://codereview.chromium.org/255074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28794 0039d316-1c4b-4281-b951-d872f2087c98
* Add a command line switch to enable flip sockets.mbelshe@google.com2009-10-133-1/+31
| | | | | | | | | | | | With this change, flip code is now compiled and the limited unit tests actually run. BUG=none TEST=none Review URL: http://codereview.chromium.org/259064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28793 0039d316-1c4b-4281-b951-d872f2087c98
* Use ASCII strings for switch names.evan@chromium.org2009-10-133-8/+8
| | | | | | Review URL: http://codereview.chromium.org/270062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28779 0039d316-1c4b-4281-b951-d872f2087c98
* Add the ability to purge memory to the ProxyResolver.pkasting@chromium.org2009-10-139-3/+79
| | | | | | | | BUG=23400 TEST=none Review URL: http://codereview.chromium.org/272018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28769 0039d316-1c4b-4281-b951-d872f2087c98
* Use size_t rather than uint32 in a few more placesmbelshe@chromium.org2009-10-122-4/+4
| | | | | | | | | | | to fixup some warnings. BUG=none TEST=none Review URL: http://codereview.chromium.org/274009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28747 0039d316-1c4b-4281-b951-d872f2087c98
* Step 2 in porting disk cache to using FilePath.tony@chromium.org2009-10-127-9/+16
| | | | | | | | BUG=24444 Review URL: http://codereview.chromium.org/270066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28742 0039d316-1c4b-4281-b951-d872f2087c98
* Start migrating the disk cache to using FilePath.tony@chromium.org2009-10-1213-74/+104
| | | | | | | | | | This converts BackendImpl to using FilePath. BUG=24444 Review URL: http://codereview.chromium.org/261045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28711 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the dependency on i18n/icu_string_conversions from base/string_util.h.brettw@chromium.org2009-10-104-14/+21
| | | | | | | | | | | | Fix up all files requireing this header to include it directly. Split out the ICU-dependent string util unit tests into a new file base/i18n/icu_string_util_unittest.cc TEST=none BUG=none Review URL: http://codereview.chromium.org/269034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28674 0039d316-1c4b-4281-b951-d872f2087c98
* Change the SSL Socket to be capable of having reads andmbelshe@google.com2009-10-102-235/+335
| | | | | | | | | | | writes active concurrently. BUG=none TEST=none Review URL: http://codereview.chromium.org/225005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28664 0039d316-1c4b-4281-b951-d872f2087c98
* Fix one more size_t/uint32 casting issue for the mac.mbelshe@chromium.org2009-10-102-2/+2
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/269040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28637 0039d316-1c4b-4281-b951-d872f2087c98
* Make our Mock Sockets capable of running full duplex.mbelshe@google.com2009-10-092-18/+6
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/273013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28622 0039d316-1c4b-4281-b951-d872f2087c98
* Move more ICU-dependent stuff from base into base/i18n. Some test stuff alsobrettw@chromium.org2009-10-094-4/+4
| | | | | | | | | | | | depended on this, so to make the DEPS work out, I made a new base/test directory where I moved the testing-related files into a new directory base/test. TEST=none BUG=none Review URL: http://codereview.chromium.org/266038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28569 0039d316-1c4b-4281-b951-d872f2087c98
* A few more misc fixes for the linux port.mbelshe@chromium.org2009-10-094-24/+18
| | | | | | | | | | | Temporarily turn off SSL until the SSL full duplex patch can land. BUG=none TEST=none Review URL: http://codereview.chromium.org/272004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28550 0039d316-1c4b-4281-b951-d872f2087c98
* Add net/socket_stream.ukai@chromium.org2009-10-093-0/+879
| | | | | | | | | | | This is used for WebSocket protocol. BUG=12497 TEST=none Review URL: http://codereview.chromium.org/243077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28526 0039d316-1c4b-4281-b951-d872f2087c98
* One more try to get the FilePath usage right.mbelshe@google.com2009-10-091-3/+4
| | | | | | | | | | | | | | | | | | | I was using: FilePath("/") This only works on linux/mac because it is an ascii string and can't be coerced to a wide string. Reworked the code to put the hack into the string portion. BUG=none TEST=none Review URL: http://codereview.chromium.org/270035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28497 0039d316-1c4b-4281-b951-d872f2087c98
* Disable CancelSparseIO unit test while I see what's going on.rvargas@google.com2009-10-081-1/+1
| | | | | | | | | | BUG=none TEST=none TBR=nsylvain Review URL: http://codereview.chromium.org/265051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28481 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Add a method to cancel pending sparse operations.rvargas@google.com2009-10-0810-9/+285
| | | | | | | | | | | | | | | | | | | The sparse IO methods require exclusive use of the cache entry and they complain when that requirement is violated. When the user cancels a request and reissues another one to the same entry, we may be waiting for the previous operation to finish when we receive a new IO request, so we fail. This CL add a way for the HTTP cache to cancel IO operations and get a notification when the disk cache is able to operate on that entry again. BUG=23862 TEST=unittests Review URL: http://codereview.chromium.org/256090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28475 0039d316-1c4b-4281-b951-d872f2087c98
* Detect NULL characters in certificate Subject commonwtc@chromium.org2009-10-081-17/+87
| | | | | | | | | | | names. R=hawk BUG=24190 TEST=the X509CertificateTest.PaypalNullCertParsing test Review URL: http://codereview.chromium.org/261016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28434 0039d316-1c4b-4281-b951-d872f2087c98
* Separate out some more ICU from base and into base/i18n.brettw@chromium.org2009-10-083-14/+43
| | | | | | | | | | | | | | | | | | | | This moves string_util_icu. I moved the number formatting function into base/i18n/number_formatting and just removed the other function in string_util_icu which was TrimWhitespaceUTF8. It is only used in a few places and isn't actually helpful (and the fact that it round-trips through UTF-16 is better for the caller to see). This takes out the sorting from the FileEnumerator. The comment says the sorting is not guaranteed. I moved it into file_util_icu as a standalone function for callers of FileEnumerator to call manually if they need sorted results. I modified the directory lister to use this sorting instead, and filed a bug on doing more optimal JS-based sorting. TEST=none BUG=none Review URL: http://codereview.chromium.org/267001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28405 0039d316-1c4b-4281-b951-d872f2087c98
* Make HttpResponseInfo pickle'able, just moves some code from HttpCache to ↵michaeln@google.com2009-10-083-124/+150
| | | | | | | | | | | HttpResponseInfo. TEST=none BUG=none Review URL: http://codereview.chromium.org/269012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28363 0039d316-1c4b-4281-b951-d872f2087c98
* Linux port for flip_session.mbelshe@chromium.org2009-10-072-18/+25
| | | | | | | | | | | | Several minor cleanups. BUG=none TEST=none Review URL: http://codereview.chromium.org/265004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28320 0039d316-1c4b-4281-b951-d872f2087c98
* Fix signed/unsigned mismatch for linuxmbelshe@chromium.org2009-10-071-1/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/261004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28319 0039d316-1c4b-4281-b951-d872f2087c98
* Change many of the int and uint32 uses to size_t.mbelshe@chromium.org2009-10-072-24/+24
| | | | | | | | | | | | | | | | | I think we should avoid using uint32 except where we're defining protocol elements which specifically are intended to be 32 bits. Using size_t for lengths is a good way to avoid any accidental signed/unsigned comparisons. This cleanup is a result of the linux port, which gets lots of unsigned/signed warnings (which we treat as errors). BUG=none TEST=none Review URL: http://codereview.chromium.org/263004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28318 0039d316-1c4b-4281-b951-d872f2087c98
* Turn off the X509Certificate::Verify call for non-Windows platformswtc@chromium.org2009-10-071-3/+5
| | | | | | | | | | | | because it hits a DCHECK failure in nss_ocsp.cc on Linux. TBR=abarth,ukai BUG=24038 TEST=Debug build of net_unittests should not hit a DCHECK failure in nss_ocsp.cc during the X509CertificateTest.PaypalNullCertParsing test. Review URL: http://codereview.chromium.org/270005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28270 0039d316-1c4b-4281-b951-d872f2087c98
* Add a certificate blacklist for Windows and put thewtc@chromium.org2009-10-072-0/+191
| | | | | | | | | | | | faux www.paypal.com certificate with a NULL byte on the blacklist. R=abarth BUG=24038 TEST=new unit test Review URL: http://codereview.chromium.org/261002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28265 0039d316-1c4b-4281-b951-d872f2087c98
* Linux port fixup.mbelshe@chromium.org2009-10-071-4/+4
| | | | | | | | | | | Remove unused local variables. BUG=none TEST=none Review URL: http://codereview.chromium.org/265005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28254 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the UrlToFilenameEncoder to be more cross platform.mbelshe@chromium.org2009-10-071-29/+30
| | | | | | | | | | | | | | | | | FilePath::StringType on linux is a std::string, while on Windows it is a std::wstring. The old implementation assumed wstrings. Rework the class to deal entirely with narrow strings (since wide-strings are not relevant for this utility). Note: This file is only used in some tools. BUG=none TEST=none Review URL: http://codereview.chromium.org/261001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28224 0039d316-1c4b-4281-b951-d872f2087c98
* Remove VLOG statements which aren't needed and don't work well in chrome.mbelshe@chromium.org2009-10-074-46/+10
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/257074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28212 0039d316-1c4b-4281-b951-d872f2087c98
* Add comments setting emacs and vim tab width and expansion variables.sgk@google.com2009-10-062-0/+12
| | | | | | | | BUG=none TEST=successful builds Review URL: http://codereview.chromium.org/256059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28089 0039d316-1c4b-4281-b951-d872f2087c98
* Increase the timeout for TcpConnectJob from 60 seconds to 240 seconds.eroman@chromium.org2009-10-061-1/+8
| | | | | | | | BUG=23364 Review URL: http://codereview.chromium.org/255085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28087 0039d316-1c4b-4281-b951-d872f2087c98
* Initial CL for fixing some of the proxy auth issues.chron@chromium.org2009-10-066-3/+18
| | | | | | | | | | | | | | Auth_cache is contained in the http session. We need to share the http session with the parent profile request context in order to retain http authentication. Weirdly enough, Profile::GetDefaultRequestContext() is not the same as profile_->GetRequestContext(), It does NOT yet pop up a dialog if the user hasn't done so already. BUG=19581 TEST=Included. Review URL: http://codereview.chromium.org/241001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28086 0039d316-1c4b-4281-b951-d872f2087c98
* Increase the maximum headers size from 32Kb to 256Kb.eroman@chromium.org2009-10-062-3/+3
| | | | | | | | BUG=22928 Review URL: http://codereview.chromium.org/242152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28079 0039d316-1c4b-4281-b951-d872f2087c98
* Add a response_info() accessor to URLRequest to get a reference to the ↵michaeln@google.com2009-10-052-0/+7
| | | | | | | | | | | net::HttpResponseInfo struct in it entirety. BUG=none TEST=URLRequestTestHTTP.ResponseHeadersTest Review URL: http://codereview.chromium.org/251082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28067 0039d316-1c4b-4281-b951-d872f2087c98
* Make the font sizes on about:net-internals consistent.evan@chromium.org2009-10-051-3/+4
| | | | | | | | Use the HTML5 doctype + 0.8em fonts + WebKit monospace workaround. Review URL: http://codereview.chromium.org/257050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28065 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Assert that socket() returns a successful value.jhawkins@chromium.org2009-10-051-3/+4
| | | | | | | | | CID=6383 BUG=none TEST=none Review URL: http://codereview.chromium.org/256055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28011 0039d316-1c4b-4281-b951-d872f2087c98
* Move the clipboard stuff out of base and into app/clipboard. I renamedbrettw@chromium.org2009-10-032-26/+2
| | | | | | | | | | | clipboard_util to clipboard_util_win since it's Windows-only. This patch makes test_shell depend on app as well. There should be no logic change. TEST=none BUG=none Review URL: http://codereview.chromium.org/260003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27937 0039d316-1c4b-4281-b951-d872f2087c98
* Second try. r27819 was missing a null pointer check forwtc@chromium.org2009-10-021-38/+22
| | | | | | | | | | | | | | | | | | | | | the return value of CERT_GetCommonName, etc. Map SEC_ERROR_OCSP_BAD_HTTP_RESPONSE (-8073) to CERT_STATUS_UNABLE_TO_CHECK_REVOCATION. Change ParsePrincipal to take the decoded CERTName as argument. Use the NSS functions for getting the common name, locality name, state or province name, and country name because they escape the strings properly. R=dank BUG=none TEST=none (covered by existing unit tests) Review URL: http://codereview.chromium.org/255055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27903 0039d316-1c4b-4281-b951-d872f2087c98
* The Python test server now ignores querystrings params when serving local files.finnur@chromium.org2009-10-021-2/+8
| | | | | | | | | | | | | | | | I'm having no luck getting the try bots to recognize this change to the python file, so I am separating my already LG'ed changelist (http://codereview.chromium.org/246066) into two (this part and a followup patch) in the hopes that my tests (next CL) will succeed. I fixed our python test server to serve files even though there is a querystring in the url (the server basically just ignores the querystring). This is needed in my next cl because the html we serve has js that acts on data in the querystring. Also made it have the right content-header when serving xml files (text/html). TBR=aa BUG=None TEST=None Review URL: http://codereview.chromium.org/242120 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27862 0039d316-1c4b-4281-b951-d872f2087c98
* Handle range request on a truncated entryhclam@chromium.org2009-10-023-3/+48
| | | | | | | | | | This change will doom the truncated entry and creates a new sparse entry. TEST=unit tests Review URL: http://codereview.chromium.org/251067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27859 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r27819 because it causes net_unittests to crash in thewtc@chromium.org2009-10-021-20/+38
| | | | | | HTTPSRequestTest.HTTPSGetTest test. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27821 0039d316-1c4b-4281-b951-d872f2087c98
* Map SEC_ERROR_OCSP_BAD_HTTP_RESPONSE (-8073) towtc@chromium.org2009-10-021-38/+20
| | | | | | | | | | | | | | | | | | CERT_STATUS_UNABLE_TO_CHECK_REVOCATION. Change ParsePrincipal to take the decoded CERTName as argument. Use the NSS functions for getting the common name, locality name, state or province name, and country name because they escape the strings properly. R=dank BUG=none TEST=none (covered by existing unit tests) Review URL: http://codereview.chromium.org/248028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27819 0039d316-1c4b-4281-b951-d872f2087c98
* Rename EscapeUrl and expand the code comment.brg@chromium.com2009-10-013-5/+5
| | | | | | | | BUG=none TEST=Escape.EscapeUrlEncodedData Review URL: http://codereview.chromium.org/257021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27782 0039d316-1c4b-4281-b951-d872f2087c98
* Handle reading to the end of a sparse entryhclam@chromium.org2009-10-013-1/+7
| | | | | | | | | | | | TEST=run chrome with --enable-byte-range-support --incognito and watch a video in http://tinyvid.tv/, seeking should be fine. http_cache::PartialData used to read a length of zero when reading has reached the end. The zero parameter will cause MemEntryImpl to complain about invalid argument, so early return for the case that we know we have nothing to read. Review URL: http://codereview.chromium.org/255034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27776 0039d316-1c4b-4281-b951-d872f2087c98
* The "Copy URL" link is always greyed out in the Chrome menu on popups ↵ericu@google.com2009-10-012-0/+24
| | | | | | | | | | | | | | [crbug.com/13488]. This turns out to be because it was never implemented. Tested manually on Windows; I'll test on Linux before submitting. BUG=13488 TEST=Tested manually on Windows and added a unit test for the new Clipboard function. Review URL: http://codereview.chromium.org/210042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27772 0039d316-1c4b-4281-b951-d872f2087c98
* Two features:mbelshe@google.com2009-10-014-14/+116
| | | | | | | | | | | | | | | | | | | | | | - Enable FLIP over SSL. - Rework the X-Associated-Content. The server can send us a list of subresources that it plans to push. The client will keep track of these in a pending list. If the client tries to request the resource before the server pushes it, the client will not issue the request, and will wait until the push stream arrives. Conversely, if the pushed stream arrives before the client makes a request for the resource, the stream is added to the pushed_streams list and waits for a FlipNetworkTransaction to arrive that wants it (this part of the logic was already in place). BUG=none TEST=none Review URL: http://codereview.chromium.org/249046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27746 0039d316-1c4b-4281-b951-d872f2087c98
* Add EscapeURL to the ASCII escape methods.EscapeURL escapes all forbidden ↵brg@chromium.com2009-10-013-1/+31
| | | | | | | | | | ascii characters in an URL and repalces spaces with '+'. Test=Escape.EscapeUrl BUG=23029 Review URL: http://codereview.chromium.org/244056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27713 0039d316-1c4b-4281-b951-d872f2087c98