summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* Move certificate verification off the IO thread.wtc@chromium.org2009-02-0314-364/+499
| | | | | | | | | | | | | | | | Move the MapNetErrorToCertStatus and MapCertStatusToNetError functions to cert_status_flags.h so they can be shared with Mac and Linux code. Move the certificate verification function to the X509Certificate class. Right now X509Certificate::Verify is only implemented on Windows. R=eroman BUG=3592 Review URL: http://codereview.chromium.org/14915 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9084 0039d316-1c4b-4281-b951-d872f2087c98
* On posix platforms make sure the test server has shutdown and wait for it sothomasvl@chromium.org2009-02-031-0/+5
| | | | | | | | we don't leave around zombies that can then cause other problems by hosing the box. (the python server doesn't always spin down, hence the kill also) Review URL: http://codereview.chromium.org/20007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9067 0039d316-1c4b-4281-b951-d872f2087c98
* Add one more histogram to SDCH decoderjar@chromium.org2009-02-021-2/+12
| | | | | | | r=mbelshe Review URL: http://codereview.chromium.org/19542 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9044 0039d316-1c4b-4281-b951-d872f2087c98
* Add to SDCH histogrammingjar@chromium.org2009-02-023-26/+51
| | | | | | | | | | | | | | | | Define a histogram macro that is customizable, and precise, for detailed examination of performance when needed. Provide graceful degradation when entire SDCH window is not received. We now blacklist the site with an exponential back-off. This allows teh user to hit reload, and get not-SDCH content. bug=1609306 r=huanr,mbelshe Review URL: http://codereview.chromium.org/19718 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9035 0039d316-1c4b-4281-b951-d872f2087c98
* Correct line ending in unit test.jar@chromium.org2009-01-311-7/+7
| | | | | | | | | | My checkin earlier today included mixture of line endings by mistake. TBR=huanr Review URL: http://codereview.chromium.org/19527 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9016 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of synchronous ResolveProxy API.ericroman@google.com2009-01-313-150/+130
| | | | | | | Also remove the ProxyInfo::Apply method. Review URL: http://codereview.chromium.org/19502 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9015 0039d316-1c4b-4281-b951-d872f2087c98
* Move proxy resolve requests out of plugin/renderer process, and into the ↵ericroman@google.com2009-01-312-2/+89
| | | | | | | | browser. Review URL: http://codereview.chromium.org/14142 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9006 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a minor style nit. Make a comment clearer.wtc@chromium.org2009-01-302-6/+5
| | | | | | | R=eroman Review URL: http://codereview.chromium.org/19731 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8996 0039d316-1c4b-4281-b951-d872f2087c98
* Measure how often our users see MD2 intermediate CAwtc@chromium.org2009-01-302-0/+7
| | | | | | | | | | | certificates. Our UMA results contain a small number of MD2 certificates. We'd like to know if they are end entity or intermediate CA certificates. R=jar Review URL: http://codereview.chromium.org/19522 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8990 0039d316-1c4b-4281-b951-d872f2087c98
* In rare cases (when running inside QEMU), the eventwtc@chromium.org2009-01-302-24/+21
| | | | | | | | | | | | object is not yet in the signaled state after a Winsock function succeeds synchronously, so it is necessary to wait for it to become signaled. R=eroman BUG=6500 Review URL: http://codereview.chromium.org/19515 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8989 0039d316-1c4b-4281-b951-d872f2087c98
* Make test server to store files by sending POST /writefile/<filename> HTTP ↵stoyan@chromium.org2009-01-301-1/+39
| | | | | | | | request. Review URL: http://codereview.chromium.org/19476 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8965 0039d316-1c4b-4281-b951-d872f2087c98
* Correct handling of filter chaining of SDCH and gzip compressionjar@chromium.org2009-01-303-31/+89
| | | | | | | | | | | | | | | | | | | | | | When a first filter (gzip) has buffered internal data to process, and has already pushed a full 32K buffer to a second filter (such as sdch), but the second filter declined to output anything (and instead asserted it needed more data), then the filter chain was returning FILTER_OK. That status usually meant that the filter should be called again, but the calling code decided that a return of no bytes without a FILTER_NEED_MORE_DATA status must mean the filter was done. Rather than trying to change the calling infrastructure (which could impact existing filters than are not part of a chain), this patch ensures that the chained sequence never returns FILTER_OK without providing some output data. This matches semantics of individual filters, which only return FILTER_OK when they have pushed some data into the output buffer. bug=1609306 r=huanr,openvcdiff Review URL: http://codereview.chromium.org/19459 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8944 0039d316-1c4b-4281-b951-d872f2087c98
* Provide the option for HTTPServer to be created with a specificsky@google.com2009-01-293-33/+48
| | | | | | | | | | | | | | | MessageLoop. I'm going to need this when running ui tests in process. In this case I'll pass in the IO thread. I'll change all callers to use the new method, but before doing that wanted to make sure you're ok with it. BUG=none TEST=none Review URL: http://codereview.chromium.org/19039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8915 0039d316-1c4b-4281-b951-d872f2087c98
* Add more unit tests for net/base/host_resolver.phajdan.jr@chromium.org2009-01-299-116/+315
| | | | | | | | BUG=6661 Review URL: http://codereview.chromium.org/18775 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8872 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 8868.ericroman@google.com2009-01-299-256/+301
| | | | | | | This relands wtc's original CL for working around not caching the intermediate CA certificates. We believe the original commit failed on buildbot because of a bad incremental build, and will be resolved by doing a clobber Review URL: http://codereview.chromium.org/19463 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8870 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 8864.wtc@chromium.org2009-01-299-301/+256
| | | | | | | Revert r8864. It broke the build url_request_intercept_job.cc. Review URL: http://codereview.chromium.org/19462 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8868 0039d316-1c4b-4281-b951-d872f2087c98
* Work around our not caching the intermediate CAwtc@chromium.org2009-01-299-256/+301
| | | | | | | | | | | | | | | | | | | | | | certificates by passing the source of each OSCertHandle to CreateFromHandle and the X509Certificate constructor. If the OSCertHandle comes from the network layer, we know it has a complete certificate chain and therefore prefer it to an OSCertHandle that comes from the HTTP cache, which doesn't have the intermediate CA certificates. A certificate from the network layer can kick out a certificate from the HTTP cache in our certificate cache. This workaround seems good enough to fix all the known symptoms of not caching the intermediate CA certificates. Move the common code in x509_certificate_<os>.cc to x509_certificate.cc. R=eroman BUG=3154,7065 Review URL: http://codereview.chromium.org/18836 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8864 0039d316-1c4b-4281-b951-d872f2087c98
* Change URLRequest to use a ref-counted buffer for actual IO.rvargas@google.com2009-01-2936-98/+187
| | | | | | | | | | This will re-land http://codereview.chromium.org/18390 BUG=5325 Review URL: http://codereview.chromium.org/19004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8847 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for UA spoofing, and spoof Safari's UA string when loading URLsdarin@chromium.org2009-01-273-16/+18
| | | | | | | | | | | from *.mail.live.com (to fix hotmail). BUG=4111 R=wtc Review URL: http://codereview.chromium.org/19025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8764 0039d316-1c4b-4281-b951-d872f2087c98
* Bring in googleurl changes which fix URL parsing layout test.mmoss@chromium.org2009-01-271-1/+1
| | | | | | | | | Also update net_unittest to match new 'file:' parsing logic. Review URL: http://codereview.chromium.org/18789 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8725 0039d316-1c4b-4281-b951-d872f2087c98
* Add a dummy function CrashBug6500 so that the returnwtc@chromium.org2009-01-271-17/+11
| | | | | | | | | | | value and error code of the WaitForSingleObject call are captured as function arguments in the crash dumps. R=eroman BUG=6500 Review URL: http://codereview.chromium.org/18788 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8701 0039d316-1c4b-4281-b951-d872f2087c98
* Adjust SDCH problem code histogram.jar@chromium.org2009-01-273-5/+9
| | | | | | | | | | | | Tentative SDCH was not properly noted, and this caused some confusion in the SDCH problem codes. I corrected the assertion of a tentative sdch, and renumbered (to new numbers) all problem codes that might have been varied. r=huanr Review URL: http://codereview.chromium.org/18780 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8698 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unused invalid_cert.pem.dkegel@google.com2009-01-271-41/+0
| | | | | | | | | | | | | (wtc says: Jay Campan created the three certificates. He said he created invalid_cert.pem by changing one byte in the certificate's signature. The reason we aren't using invalid_cert.pem is that our test server won't start up with an invalid certificate.) Review URL: http://codereview.chromium.org/18793 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8687 0039d316-1c4b-4281-b951-d872f2087c98
* Fix compile error in dump_files (didn't catch the error since dump_cache ↵erikkay@google.com2009-01-261-1/+2
| | | | | | | | | | isn't in chrome.sln). TBR=rvargas Review URL: http://codereview.chromium.org/18782 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8666 0039d316-1c4b-4281-b951-d872f2087c98
* Change FileStream to use FilePath instead of wstring.erikkay@google.com2009-01-266-10/+13
| | | | | | Review URL: http://codereview.chromium.org/18764 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8663 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 8627,8625.maruel@chromium.org2009-01-262-26/+8
| | | | | | Review URL: http://codereview.chromium.org/18598 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8628 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up dns prefetch code, and also port it.phajdan.jr@chromium.org2009-01-262-8/+26
| | | | | | | | BUG=5687, 6683 Review URL: http://codereview.chromium.org/15076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8625 0039d316-1c4b-4281-b951-d872f2087c98
* revert r8603rvargas@google.com2009-01-2436-187/+98
| | | | | | Review URL: http://codereview.chromium.org/18576 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8605 0039d316-1c4b-4281-b951-d872f2087c98
* Change URLRequest to use a ref-counted buffer for actual IO.The ref-counting ↵rvargas@google.com2009-01-2436-98/+187
| | | | | | | | will prevent the deletion / reuse of memorywhile the buffer is actually being used by pending IO.This seems a very intrusive change, but at least we will be ableto make sure that it works without having to chase every singledestruction of an URLRequest to make sure that any pending IOwas cancelled, and also allows us to avoid blocking onthe object destruction.BUG=5325 Review URL: http://codereview.chromium.org/18390 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8603 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Adjust the current experiment so that the cachervargas@google.com2009-01-231-15/+18
| | | | | | | | | | size is not limited by 1% of the disk space. Also, group four was limited by the mask so it was effectively the same as group 3. Review URL: http://codereview.chromium.org/18727 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8589 0039d316-1c4b-4281-b951-d872f2087c98
* Prep for generated .vcproj files:sgk@google.com2009-01-233-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix minor stylistic inconsistencies in some .vcproj files: * /> tag termination: net\net_resources.vcproj * Add empty <ToolFiles>, <References> and <Globals> sections: net\net_resources.vcproj third_party\zlib\zlib.vcproj third_party\libpng\libpng.vcproj chrome\tools\test\image_diff\image_diff.vcproj * Remove .\ on file names where its use is inconsistent with the rest of the file names in the .vcproj: net\build\net.vcproj net\build\net_unittests.vcproj chrome\installer\util\util.vcproj * Add explicit RootNamespace attribute: chrome\test\automation\automation.vcproj testing\gtest.vcproj * Fix file order in four locales that don't match other locale .vcproj files: chrome\app\locales\da.vcproj chrome\app\locales\he.vcproj chrome\app\locales\zh-TW.vcproj chrome\app\locales\en-US.vcproj * Remove duplicate files from the list: chrome\browser\views\browser_views.vcproj (event_utils.[ch]) Review URL: http://codereview.chromium.org/18555 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8577 0039d316-1c4b-4281-b951-d872f2087c98
* Support domain=IPADDR if it matches the url ip address exactly.deanm@chromium.org2009-01-232-2/+12
| | | | | | | | | | | This doesn't do anything special to handle ipv6, dotless ip address, etc. BUG=3699 Review URL: http://codereview.chromium.org/18657 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8551 0039d316-1c4b-4281-b951-d872f2087c98
* Add q-values to languages in Accept-Language HTTP header to be compatible ↵jungshik@google.com2009-01-233-3/+85
| | | | | | | | | | | | | | with Apache. Add q-values to charsets in Accept-Charset header in the same way as Firefox does. BUG=5899 TEST=HttpUtilTest.Accept* (net_unittest) Review URL: http://codereview.chromium.org/17340 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8527 0039d316-1c4b-4281-b951-d872f2087c98
* BUG=1112hclam@chromium.org2009-01-231-4/+8
| | | | | | | | LGTMed in http://codereview.chromium.org/14831/show, just switched to git.. Review URL: http://codereview.chromium.org/18520 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8526 0039d316-1c4b-4281-b951-d872f2087c98
* Use PlatformThreadId, not int when dealing with thread ids.agl@chromium.org2009-01-231-1/+1
| | | | | | | | | | | | | | | | | Windows uses a DWORD (unsigned long) for thread ids and POSIX uses a pid_t (int on Linux) for the same. In the code, we are currently stuffing thread ids into an int which is dangerous on Windows (because DWORDS can exceed an int and wrap) and will break if pid_t is ever != int. This change changes all the places where we currently have an int to use a new typedef, PlatformThreadId. This change also needs to occur for process ids, but I'm not doing that in this CL. Review URL: http://codereview.chromium.org/18677 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8525 0039d316-1c4b-4281-b951-d872f2087c98
* Replace cases of Append(FILE_PATH_LITERAL()) with AppendASCII("").deanm@chromium.org2009-01-224-16/+16
| | | | | | Review URL: http://codereview.chromium.org/18499 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8454 0039d316-1c4b-4281-b951-d872f2087c98
* We should download text/csv mime types instead of displaying them.abarth@chromium.org2009-01-222-6/+8
| | | | | | | | | BUG=6079 R=darin Review URL: http://codereview.chromium.org/18349 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8448 0039d316-1c4b-4281-b951-d872f2087c98
* Mark the SECOM Trust Root CAs as EV. Note that bothwtc@chromium.org2009-01-221-0/+12
| | | | | | | | | | | | | the original RootCA1 and the new EV RootCA1 need to be marked as EV because the crypto library may build a certification path to either root CA. R=ian BUG=4985 TEST=https://www.secomtrust.net/contact/form.html Review URL: http://codereview.chromium.org/18640 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8429 0039d316-1c4b-4281-b951-d872f2087c98
* Return ERR_SSL_PROTOCOL_ERROR instead of the defaultwtc@chromium.org2009-01-211-1/+1
| | | | | | | | | | | | | ERR_FAILED when we read EOF during the SSL handshake. The ERR_SSL_PROTOCOL_ERROR error code will allow the TLS-intolerant server handling code in http_network_transaction.cc to kick in if necessary. R=eroman BUG=5894 Review URL: http://codereview.chromium.org/18606 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8377 0039d316-1c4b-4281-b951-d872f2087c98
* Fix dump_cache build.evan@chromium.org2009-01-211-8/+15
| | | | | | | Review URL: http://codereview.chromium.org/18400 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8353 0039d316-1c4b-4281-b951-d872f2087c98
* Make CommandLine into a normal object, with some statics for getting at the ↵evan@chromium.org2009-01-215-22/+11
| | | | | | | | | | | current process's command line. One explicit goal of this change is to *not* deal with the string/wstring issues at the API on POSIX; the functions are the same as before, which means they remain as broken as before. (I did try to fix the internals, though, so migrating the callers is now possible by adding platform-appropriate hooks.) Review URL: http://codereview.chromium.org/18248 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8347 0039d316-1c4b-4281-b951-d872f2087c98
* Provide initialization of member variablejar@chromium.org2009-01-201-0/+1
| | | | | | | | | Unit tests were failing in purify on build bot. TBR=huanr Review URL: http://codereview.chromium.org/18421 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8340 0039d316-1c4b-4281-b951-d872f2087c98
* generate test_shell.pak and hook up loading net resources fromtc@google.com2009-01-201-3/+3
| | | | | | | | | | test_shell.pak. Move the net resource loading into the platform specific files (still a stub on osx). Review URL: http://codereview.chromium.org/18186 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8321 0039d316-1c4b-4281-b951-d872f2087c98
* Improve SDCH stability stats and error recoveryjar@chromium.org2009-01-208-59/+246
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL provides an exponential back-off (within a run of chromium) for recovery to a decoding error, rather than an full disable of SDCH when a (minor) error appears. This will help to recover from the common (implementation) problem where a user has an SDCH encoded page as a startup tab, but doesn't still have the requisite dictionary from the previous run. The exponential backoff is not "time based," but instead counts down the number of times a tentatively blacklisted domain is accessed. I now detect the use of the browser cache in an SDCH decode, and use that to better identify if external proxies have corrupted the process, vs internal use of cache (such as at startup) has caused a "dictionary not found" error to emerge. r=openvcdiff,huanr Review URL: http://codereview.chromium.org/18355 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8290 0039d316-1c4b-4281-b951-d872f2087c98
* Generate all chrome .vcproj files:sgk@google.com2009-01-178-9/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Path name translation (/ to \) of various MSVSTool attributes. * Explicit keyword= arguments to MSVSProject. This will likely go away eventually in favor of uniform behavior. * Add a relative_path_substitutions array that can be used to substitute in Visual Studio variable like $(OutDir). * Add a local_directory_prefix that can be set to './' to only affect files in the current directory. * Additional Keyword ordering in Tool attributes to continue to match the default order Visual Studio generates. * Add a Derived() proxy class that can wrap a File node to tell the .vcproj generation that we want the derived file, not its source(s), in the file list. * In the individual *.scons files, add the necessary files (mostly .h files) to file lists, and update MSVSProject() calls with the additional necessary information. Result is identical .vcproj files modulo the following differences: * Four locales .vcproj files (da, en-US, he and zh-TW) with source file orders that don't match the other locale .vcproj files have re-ordered file lists to match the rest. * Cosmetic XML changes (white space, ending tags) in: chrome/app/chrome_dll.vcproj chrome/app/generated_resources.vcproj net/build/net_resources.vcproj * Removal or addition of ./ prefixes from various files that don't match the other file specifications within their individual .vcproj files: chrome/installer/util/util.vcproj net/build/net.vcproj net/build/net_unittests.vcproj * Add missing empty sections (<ToolFiles>, <References>, <Globals>) for consistency with other .vcproj files: chrome/tools/test/image_diff/image_diff.vcproj third_party/libpng/libpng.vcproj third_party/zlib/zlib.vcproj * Add missing RootNameSpace attribute: chrome/test/automation/automation.vcproj testing/gtest.vcproj * Use && instead of \r\n as a command separator, to sidestep XML-generation problems: chrome/app/chrome_exe.vcproj * Remove unnecessary (?) duplicate files in the file list: chrome/browser/views/browser_views.vcproj (event_utils.cc and event_utils.h were duplicated) Review URL: http://codereview.chromium.org/17603 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8253 0039d316-1c4b-4281-b951-d872f2087c98
* Refine a CHECK into several CHECKs to determine the returnwtc@chromium.org2009-01-171-1/+20
| | | | | | | | | | value of WaitForSingleObject and the error code. R=eroman BUG=6500 Review URL: http://codereview.chromium.org/18182 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8252 0039d316-1c4b-4281-b951-d872f2087c98
* Have net_resources.grd generate a .pak file too. Since the tldtc@google.com2009-01-162-6/+8
| | | | | | | | | | | data is generated and included in the .pak file, we need to add a dependency in the SCons build. Making the corresponding changes to mac/win is harder, so punting for now. Review URL: http://codereview.chromium.org/18127 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8220 0039d316-1c4b-4281-b951-d872f2087c98
* If connect succeeds synchronously, the event object is alsowtc@google.com2009-01-162-2/+4
| | | | | | | | | | | | | | signaled, so we need to reset the event object. Otherwise, the event object will be left in the wrong state when we write the request headers. Remove the unnecessary forward declaration of HostResolver. R=eroman BUG=6331 Review URL: http://codereview.chromium.org/18119 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8163 0039d316-1c4b-4281-b951-d872f2087c98
* Add another test case.ericroman@google.com2009-01-161-0/+25
| | | | | | Review URL: http://codereview.chromium.org/18111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8144 0039d316-1c4b-4281-b951-d872f2087c98
* revert 8087abarth@chromium.org2009-01-152-8/+6
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8088 0039d316-1c4b-4281-b951-d872f2087c98