summaryrefslogtreecommitdiffstats
path: root/net/base
Commit message (Collapse)AuthorAgeFilesLines
* Add nhs.uk as a single-authority zone.agl@chromium.org2009-04-022-1/+4
| | | | | | | | | | | | (Requested by David Hinkinson-Hodnett of NHS Choices). This also mirrors the current Mozilla exceptions list: http://mxr.mozilla.org/mozilla/source/netwerk/dns/src/effective_tld_names.dat?raw=1 http://codereview.chromium.org/56187 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13048 0039d316-1c4b-4281-b951-d872f2087c98
* Resubmitted code from revision 12809. The bug in the Windows SSL stack thatmarkus@chromium.org2009-03-3114-74/+193
| | | | | | | this code originally uncovered has been fixed in a separate changelist. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12876 0039d316-1c4b-4281-b951-d872f2087c98
* Ensures that writes are at least one byte, matching the libevent version. As ↵avi@google.com2009-03-311-0/+1
| | | | | | | | discussed in http://codereview.chromium.org/55014 . Review URL: http://codereview.chromium.org/56090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12871 0039d316-1c4b-4281-b951-d872f2087c98
* Set completed_handshake_ to true after the entire Connectwtc@chromium.org2009-03-311-1/+6
| | | | | | | | | | sequence is done, otherwise IsConnected may return true prematurely (while in the STATE_VERIFY_CERT state). R=markus Review URL: http://codereview.chromium.org/56098 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12869 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting, as this changelist broke unittests on Windows.markus@chromium.org2009-03-3014-193/+74
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12816 0039d316-1c4b-4281-b951-d872f2087c98
* Change the bad-certificate handler for SSL (using NSS) to return anmarkus@chromium.org2009-03-3014-74/+193
| | | | | | | | | | | | | | | | | | | | | | | error. This requires a few additional changes in the rest of the code. In particular, we now have to teach HttpNetworkTransaction about how to restart connections with bad certificates. This was originally intended to be done by ReconnectIgnoringLastError(), but that API turns out be very difficult to implement in the SSLClientSocket. So, instead, we just create a completely new SSLClientSocket. We also have to be careful to store a copy of the certificate from within the bad-certificate handler, as it won't be available by the time GetSSLInfo() is called. And we fix a bug that would cause us to erroneously talk SSL on reconnected TCP sockets, even though we were still supposed to negotiate a proxy tunnel first. Review URL: http://codereview.chromium.org/43115 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12809 0039d316-1c4b-4281-b951-d872f2087c98
* Add cast to fix tree bustage on macjar@chromium.org2009-03-301-3/+6
| | | | | | | tbr=huanr Review URL: http://codereview.chromium.org/57014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12786 0039d316-1c4b-4281-b951-d872f2087c98
* Use HTTP status return code to make SDCH handling more robust.jar@chromium.org2009-03-305-9/+216
| | | | | | | | | | | | | | | | | | | | | At least one proxy replaces the SDCH content with an error page (of HTML, without SDCH compression). We can identify that scenario by spotting the 40x HTTP return code (and the fact that the content is not SDCH encoded, even though we advertised SDCH and a dictionary to the server). This change list adds the ability to access the return code via the FilterContext. The bulk of the change is centered on getting that access method to be const in all derived classes. bug=8916 r=wtc,huanr,openvcdiff Review URL: http://codereview.chromium.org/56043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12784 0039d316-1c4b-4281-b951-d872f2087c98
* Increase allowable dictionary size so that iGoogle can test SDCHjar@chromium.org2009-03-271-1/+1
| | | | | | | r=huanr,openvcdiff Review URL: http://codereview.chromium.org/56023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12712 0039d316-1c4b-4281-b951-d872f2087c98
* Fix leak in cert code that Valgrind found.avi@google.com2009-03-271-24/+33
| | | | | | | | http://crbug.com/9370 Review URL: http://codereview.chromium.org/42662 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12687 0039d316-1c4b-4281-b951-d872f2087c98
* filter_context.GetMimeType returns false if there is nowtc@chromium.org2009-03-271-1/+1
| | | | | | | | | | | Content-Type response header, so we should not assert that 'success' is always true. But we can assert that if 'success' is false, 'mime_type' is empty. R=jar Review URL: http://codereview.chromium.org/53127 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12659 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent making real DNS lookups by chrome tests.phajdan.jr@chromium.org2009-03-274-12/+36
| | | | | | | | | | | | | | | | - by default a test which makes external DNS lookup directly or indirectly will fail - added a quite simple way to allow a test to make external queries - added a way to make external queries fail (for tests which don't need them to succeed but it's hard to not make the query) - made neccessary adjustments to existing tests so that they still pass http://crbug.com/9109 Review URL: http://codereview.chromium.org/45026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12653 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure last_time_seen_ is protected by the CookieMonster lock.deanm@chromium.org2009-03-261-2/+6
| | | | | | | Review URL: http://codereview.chromium.org/49019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12542 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure filters can handle an empty input bufferjar@chromium.org2009-03-252-4/+8
| | | | | | | | | | | | | | | The chaining of filters helped to guarantee that buffers were properly flushed when large expansions took place. That change assumed that a filter could be called with no input (as some filters need to be called repeatedly this way to purge massive internal state). The gzip and bzip filters were returning an error in that scenario. bug=9316 r=huanr Review URL: http://codereview.chromium.org/53074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12524 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: First pass to make it possible to havervargas@google.com2009-03-251-0/+20
| | | | | | | | | | | | multiple instances of BackendImpl. We need multiple objects to be able to support media files on the cache. After this change, histograms will be the only thing that get messed up by multiple disk caches. Review URL: http://codereview.chromium.org/49027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12520 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 12479 which reverted 12470.willchan@chromium.org2009-03-255-89/+163
| | | | | | | This change is the same as 12470, except with HttpRequestInfo::priority initialized in the initializer list, which should fix the purify errors. Review URL: http://codereview.chromium.org/53066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12490 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 12470.willchan@chromium.org2009-03-255-163/+89
| | | | | | | caused purify errors Review URL: http://codereview.chromium.org/45055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12479 0039d316-1c4b-4281-b951-d872f2087c98
* Prioritize which HTTP requests get a socket first by adding a priority level ↵willchan@chromium.org2009-03-255-89/+163
| | | | | | | | | | to various methods and classes. Fix lint errors along the way. R=darin,wtc BUG=8993 Review URL: http://codereview.chromium.org/42541 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12470 0039d316-1c4b-4281-b951-d872f2087c98
* Do not apply gzip filter to file names with gz/tgz/svgz extensions.thestig@chromium.org2009-03-251-0/+16
| | | | | | | | | This matches Firefox's behavior. BUG=8170 Review URL: http://codereview.chromium.org/42452 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12467 0039d316-1c4b-4281-b951-d872f2087c98
* GetMyHostName is renamed GetHostName to match the name ofwtc@chromium.org2009-03-253-8/+7
| | | | | | | | | the Unix/Winsock function gethostname. R=eroman Review URL: http://codereview.chromium.org/42590 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12466 0039d316-1c4b-4281-b951-d872f2087c98
* * Switch the posix FileStream code over to using WorkerPool for asynchronous ↵willchan@chromium.org2009-03-242-69/+752
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | operations. * Add a bunch of tests for asynchronous operations. * Fix lint errors. Before: Summary iterations 5 pages 20 milliseconds 18585 mean per set 3717.00 mean per page 185.85 timer lag 2663.00 timer lag per page 26.63 After: Summary iterations 5 pages 20 milliseconds 9279 mean per set 1855.80 mean per page 92.79 timer lag 689.00 timer lag per page 6.89 Review URL: http://codereview.chromium.org/48111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12398 0039d316-1c4b-4281-b951-d872f2087c98
* Net module changes to support caching responses to a POST request.darin@chromium.org2009-03-241-2/+13
| | | | | | | | | | | The solution is to add a user-defined identifier to UploadData. If that identifier is set, and if the request method is POST, then HttpCache will enable caching for the response. (The cache key will be a composition of the identifier and the URL.) A subsequent POST request to the same URL with the same identifier will "hit" the previously generated cache entry. Reuse from the cache is subject to all of the standard rules. BUG=2636 R=wtc Review URL: http://codereview.chromium.org/52028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12374 0039d316-1c4b-4281-b951-d872f2087c98
* Implement SSL renegotiation.wtc@chromium.org2009-03-202-77/+122
| | | | | | | | | | | | | | | | | | | | | | | | In the Windows Schannel API, a server requests renegotiation when DecryptMessage (decrypting received data) returns SEC_I_RENEGOTIATE. We need to jump to the handshake sequence, and when handshake completes, come back to reading data. I also cleaned up the code. I created the SetNextStateForRead and FreeSendBuffer functions to share common code, and made sure our handshake sequence is completely equivalent to the handshake sequence in the Platform SDK WebClient.c sample. R=rvargas BUG=6893 TEST=Visit these sites, which request SSL renegotiation: https://secure.skandiabanken.se/Skbsecure/LoginInternet/SKBLoginInternet.aspx https://secure.skandiabanken.no/SkbSecure/Authentication/Otp/Default.ashx https://www.myopenid.com/signin_certificate Review URL: http://codereview.chromium.org/42380 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12229 0039d316-1c4b-4281-b951-d872f2087c98
* Don't expect unit tests to free root certdkegel@google.com2009-03-201-0/+4
| | | | | | Review URL: http://codereview.chromium.org/42425 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12223 0039d316-1c4b-4281-b951-d872f2087c98
* Add #include <fcntl.h>patrick@chromium.org2009-03-201-0/+2
| | | | | | Review URL: http://codereview.chromium.org/50060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12190 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for progressive JPEGs with MIME type image/pjpeg. Fixes Issue 2104.jon@chromium.org2009-03-191-0/+1
| | | | | | Review URL: http://codereview.chromium.org/42424 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12168 0039d316-1c4b-4281-b951-d872f2087c98
* Add a unit test for X509Certificate::Policy.abarth@chromium.org2009-03-191-0/+36
| | | | | | | | TBR=wtc Review URL: http://codereview.chromium.org/50002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12086 0039d316-1c4b-4281-b951-d872f2087c98
* Net unittests: handle the case where recv failsagl@chromium.org2009-03-191-1/+9
| | | | | | | | | (found by Coverity) Review URL: http://codereview.chromium.org/48164 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12076 0039d316-1c4b-4281-b951-d872f2087c98
* Try to get inter-packet times more preciselyjar@chromium.org2009-03-192-21/+48
| | | | | | | | | | | | | | | | | | I had tried to rely on the call to ReadData() being made once per TCP/IP packet, but histograms from the field show that does not work well :-(. This version looks for boundary counts of multiples of 1430 bytes, and uses that as a better approximation of when a packet is received. For test data with only a few packets, this is excellent. Some vendors such as Google tend to use at most 1430 bytes per packet, so even if we are off a bit, it will be close (for small packet counts). Alos, add histogram for total transmitted data (compressed via sdch and gzip) r=huanr,ajenjo Review URL: http://codereview.chromium.org/48077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12069 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unneeded uses of base/ref_counted.h.thestig@chromium.org2009-03-182-3/+2
| | | | | | Review URL: http://codereview.chromium.org/48105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11974 0039d316-1c4b-4281-b951-d872f2087c98
* Fix leak in GetCertSubjectAltNamesOfType(). Found by valgrind.dkegel@google.com2009-03-181-0/+1
| | | | | | | | | | | | ERROR:root:Leak_DefinitelyLost malloc (ome/kcc/depot2-kcc-ts_valgrind-client/google_vendor_src_branch/valgrind/trunk/coregrind/m_replacemalloc/vg_replace_malloc.c:207) ... CERT_FindCertExtension (/usr/lib32/libnss3.so.1d) net::(anonymous namespace)::GetCertSubjectAltNamesOfType(CERTCertificateStr*, CERTGeneralNameTypeEnum, std::vector<std::string, std::allocator<std::string> >*) (net/base/x509_certificate_nss.cc:134) Review URL: http://codereview.chromium.org/48097 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11941 0039d316-1c4b-4281-b951-d872f2087c98
* Fix incorrect include guards in net/, where the guard didn't match the filename.deanm@chromium.org2009-03-173-4/+9
| | | | | | | | | Also add a guard to data_url.h which was missing a guard. Review URL: http://codereview.chromium.org/42282 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11865 0039d316-1c4b-4281-b951-d872f2087c98
* SSL Fix: Step 2.Add HasAllowedCert and HasDeniedCert to ↵abarth@chromium.org2009-03-172-0/+14
| | | | | | | | X509Certificate::Policy.R=wtcBUG=8706 Review URL: http://codereview.chromium.org/42255 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11839 0039d316-1c4b-4281-b951-d872f2087c98
* Removed unneeded includes of base/time.h.thestig@chromium.org2009-03-161-1/+4
| | | | | | Review URL: http://codereview.chromium.org/48019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11766 0039d316-1c4b-4281-b951-d872f2087c98
* Added yet one more histogram to help debug SDCH issues.jar@chromium.org2009-03-131-2/+4
| | | | | | | r=wtc Review URL: http://codereview.chromium.org/46060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11675 0039d316-1c4b-4281-b951-d872f2087c98
* wtc: please look at URL related code, and hooks and nitsjar@chromium.org2009-03-138-188/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | you might have commented on before. huanr: please look at sdch_filter code. The intent was no semantic change, and only change in histograms and stats gathered. I wanted to be sure I had better stats on several failure cases, as the turn-around time of adding stats to instrument such cases after they surface is just too long. The big feature is the mechanism for getting the total number of bytes passed to a filter. We use the filter context to achieve this, and then the SDCH filter can calculate compression ratio (from pre-gunzip vs post SDCH decompress). The number of bytes read was also histogrammed in a number of error scenarios, to better diagnose what is going on when these cases arrise (example: When some data is still buffered in the VCDIFF decoder). The sdch_filter destructor was getting long and hard to read with multiple if blocks, so I cleaned that up as well a bit (less indentation, and use of early returns). Nits not included in previous CL that earlier are listed as well. r=wtc,huanr Review URL: http://codereview.chromium.org/40319 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11665 0039d316-1c4b-4281-b951-d872f2087c98
* Highlights of changes:hclam@chromium.org2009-03-131-0/+3
| | | | | | | | | | | | | | | | | | | 1. Added entry to ResourceResponseHead so that it contains either a base::PlatformFile (OS_WIN) or base::FileDescriptor (OS_POSIX) for passing the file handle from browser to renderer process. 2. Also added IPC messages for reporting download progress and ACK message for it. ResourceLoaderBridge::Peer::OnDownloadProgress is added so that the peer is notified of the download progress in the renderer process. 3. Load flag to kick start the resource loading for media files. LOAD_MEDIA_RESOURCE is added so that ResourceDispatcherHost knows how to use a different ResourceHandler for handling media resource request. Review URL: http://codereview.chromium.org/27168 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11661 0039d316-1c4b-4281-b951-d872f2087c98
* Removed unneeded includes of base/scoped_ptr.h. Reduce usage from ~800 files ↵thestig@chromium.org2009-03-133-2/+1
| | | | | | | | to ~400. Review URL: http://codereview.chromium.org/46039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11651 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unneeded platform_thread.h includes. Reduces number of includes from ↵thestig@chromium.org2009-03-131-1/+0
| | | | | | | | 598 to 511. Review URL: http://codereview.chromium.org/42165 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11617 0039d316-1c4b-4281-b951-d872f2087c98
* Remove logging.h from cc files that don't use it.thestig@chromium.org2009-03-123-3/+0
| | | | | | Review URL: http://codereview.chromium.org/42155 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11593 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unneeded uses of logging.h in header files.thestig@chromium.org2009-03-122-1/+1
| | | | | | Review URL: http://codereview.chromium.org/43148 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11590 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unneeded includes of googleurl/src/url_parse.h and url_canon.h.thestig@chromium.org2009-03-122-3/+0
| | | | | | Review URL: http://codereview.chromium.org/42102 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11502 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 11495 (since that reversion didn't heal plugin problem)jar@chromium.org2009-03-121-2/+1
| | | | | | | tbr=abarth Review URL: http://codereview.chromium.org/43112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11500 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 11484 to try to heal plugin_test failurejar@chromium.org2009-03-111-1/+2
| | | | | | | tbr=abarth Review URL: http://codereview.chromium.org/42101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11495 0039d316-1c4b-4281-b951-d872f2087c98
* Block reading unauthenticated bytes from the proxy when the user cancels a ↵abarth@chromium.org2009-03-111-2/+1
| | | | | | | | | | | 407 proxy auth request while we're trying to establish an SSL tunnel. BUG=8473 R=wtc Review URL: http://codereview.chromium.org/42065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11484 0039d316-1c4b-4281-b951-d872f2087c98
* Minor nits in IO bufferjar@chromium.org2009-03-112-2/+4
| | | | | | | | | | | | | | | | While doing restructuring work on filters, I read some of the IObuffer code, and it scared me a bit that there was a public constructor taking a data buffer that was then destroyed. After searching around for how this was used, I realized it is only used by the derived class, and thought that making it protected would save other folks from wondering/searching/checking. Since the size type in other constuctory was int rather than size_t, I also added a DCHECK (mostly out of paranoia). r=rvargas Review URL: http://codereview.chromium.org/43086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11479 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGEdeanm@chromium.org2009-03-1187-87/+0
| | | | | | | | | Normalize end of file newlines in net/. All files end in a single newline. Review URL: http://codereview.chromium.org/43079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11442 0039d316-1c4b-4281-b951-d872f2087c98
* Unfork the code path for loading net resources on mac, ie-put it back inlinethomasvl@chromium.org2009-03-111-14/+1
| | | | | | | with win/linux. Review URL: http://codereview.chromium.org/43044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11439 0039d316-1c4b-4281-b951-d872f2087c98
* remove a bogus comment on thread safety.thomasvl@chromium.org2009-03-111-4/+1
| | | | | | Review URL: http://codereview.chromium.org/42034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11436 0039d316-1c4b-4281-b951-d872f2087c98
* Slight code change to make some global variables const.maruel@google.com2009-03-1011-67/+103
| | | | | | | Fix >80 cols lines. Review URL: http://codereview.chromium.org/42013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11342 0039d316-1c4b-4281-b951-d872f2087c98