summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* QUIC - server_info and server_key are listed next to each other.rtenneti@chromium.org2014-03-195-8/+8
| | | | | | | | | | | Fixes comments from wtc in: https://codereview.chromium.org/192583004/diff/310001/net/quic/quic_client_session.h R=wtc@chromium.org Review URL: https://codereview.chromium.org/202143004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257928 0039d316-1c4b-4281-b951-d872f2087c98
* This CL increases the number of packets we monitor for packet loss from 100 ↵jar@chromium.org2014-03-192-9/+119
| | | | | | | | | | | | | | | | | | | | to 150. We're doing this to see if the surprising packet loss rate continues to climb after 100. At the same time, this CL records histograms about consecutive packets. It records one class of histogram that records the exact sequence of 6 packets, and their loss pattern. Only packets among teh aforementioned 150 initial packets in a connection are tallied. The first 6 packets are tallied into a separate histogram. It also records another class of histograms that indicates for each packet sequence up to 21 in length, how many packets were received for each possible prefix. Only non-overlapping sequences of 21 packets among the aforementioned 150 initial packets are scanned. The first 21 packets are placed in a separate histogram. In all cases, the histograms are broken out by client connection type, such as Wifi 802.11n vs 802.11g, vs... etc, vs 3G mobile, 4G etc.. R=rch BUG=349314 Review URL: https://codereview.chromium.org/203723002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257910 0039d316-1c4b-4281-b951-d872f2087c98
* Prefer length() over size() for std:string in QUIC code.wtc@chromium.org2014-03-193-28/+31
| | | | | | | | | | | | | Other miscellaneous cleanups to reduce the differences from the internal code. R=rch@chromium.org BUG=none TEST=none Review URL: https://codereview.chromium.org/202923002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257887 0039d316-1c4b-4281-b951-d872f2087c98
* Change the SPDY4 maximum frame size to 16K-1jgraettinger@chromium.org2014-03-195-46/+67
| | | | | | | | | | | | | | | | | | | | | | This lands server change 62231065 by hkhalil. (Note Chromium uses SpdyFramer::GetControlFrameBufferMaxSize(), rather than SpdyFramer::kMaxControlFrameSize, to control this). Additional enforcement of this limit to come in follow-up CLs. Also adds some DCHECKs for better debugability of problematic test code. Adds some clamping to the maximum frame size to DATA frame size calculation in SpdyWriter. This has no effect for SPDY < 4, since maximum DATA frame payload there is huge. This lands server change 62302279 by hkhalil. BUG=345769 Review URL: https://codereview.chromium.org/184723002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257860 0039d316-1c4b-4281-b951-d872f2087c98
* SpdyFramer now uses HPACK for SPDY4 headers (re-apply)jgraettinger@chromium.org2014-03-199-503/+542
| | | | | | | | | | | | | | | | | | SpdyFramer defers calling OnControlFrameHeadersData() until the entire HPACK headers block has been decoded. At that point, the block is re-encoded to legacy SPDY3 format and passed to the visitor. This is a temporary measure suitable for testing only, intended to allow a decoupled switch to HPACK prior to being fully wired for SpdyHeadersHandlerInterface. This lands server change 62461978 by jgraettinger. BUG=339578 Review URL: https://codereview.chromium.org/201373002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257857 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce a variable and indentation in WebSocketChannel::ParseClose()tyoshino@chromium.org2014-03-191-24/+24
| | | | | | | | BUG=none Review URL: https://codereview.chromium.org/195733014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257856 0039d316-1c4b-4281-b951-d872f2087c98
* Implement ChaCha20Poly1305Encrypter and ChaCha20Poly1305Decrypter with NSS.wtc@chromium.org2014-03-192-8/+20
| | | | | | | | | | R=agl@chromium.org,rch@chromium.org BUG=none TEST=net_unittests Review URL: https://codereview.chromium.org/196603022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257854 0039d316-1c4b-4281-b951-d872f2087c98
* Retry requests on reused sockets that receive ERR_EMPTY_RESPONSE.davidben@chromium.org2014-03-1810-33/+144
| | | | | | | | | | | | | | | | | | | | We retry requests on ERR_CONNECTION_CLOSED in case of a close/reuse race, but ERR_CONNECTION_CLOSED is converted to ERR_EMPTY_RESPONSE if this is a socket's first request. Such a socket is normally not reused unless it was a preconnect miss. To avoid test flakiness, make the UNUSED vs UNUSED_IDLE determination not timing-sensitive. The existing logic is compares idle_time to 0, so it's dependent on clock granularity rather than any intentional timeout. Add equivalent tests to HttpNetworkTransactionTest.KeepAliveConnection for preconnect misses. BUG=352156 Review URL: https://codereview.chromium.org/197283012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257748 0039d316-1c4b-4281-b951-d872f2087c98
* Move all Chrome-specific logic out of QuicCryptoClientStreamrch@chromium.org2014-03-1819-356/+299
| | | | | | | | and into QuicClientSession (which is Chrome-specific). Review URL: https://codereview.chromium.org/197873011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257667 0039d316-1c4b-4281-b951-d872f2087c98
* QUIC - Added unit test for IsDataReady to verify that it returns falsertenneti@chromium.org2014-03-181-0/+57
| | | | | | | | | | | | if there is a pending write. IsDataReady is called before we save the server config to disk cache. BUG=362800 R=rch@chromium.org Review URL: https://codereview.chromium.org/200793003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257647 0039d316-1c4b-4281-b951-d872f2087c98
* Allow removing private data in chrome://net-export.davidben@chromium.org2014-03-1815-64/+224
| | | | | | | | | | | | | | | | | | | | | This introduces a new LogLevel, LOG_STRIP_PRIVATE_DATA, which callbacks within the network stack check to decide whether or not to report redacted data. Unfortunately, this involves duplicating the net-internals implementation, but that implementation isn't easily reusable given chrome://net-exports' constraints. Plumb this state through net-export and adjust the UI and state machine accordingly. Add various tests. This also moves HttpAuth::ChallengeTokenizer to HttpUtil::ChallengeTokenizer as some of the redaction logic reuses the parser. This avoids giving everything a dependency on HttpAuth. BUG=349502 Review URL: https://codereview.chromium.org/182523006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257645 0039d316-1c4b-4281-b951-d872f2087c98
* Remove akalin and szym from OWNERS files.mmenke@chromium.org2014-03-182-5/+5
| | | | | | | | | | They no longer work on Chrome. R=cbentzel@chromium.org, pauljensen@chromium.org, tim@chromium.org, zea@chromium.org Review URL: https://codereview.chromium.org/197853006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257639 0039d316-1c4b-4281-b951-d872f2087c98
* Put histogram code in disk_cache on a diet.bratell@opera.com2014-03-182-37/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | The CACHE_UMA macro expanded wildly and with all the static variables in all blocks it was impossible for the compiler to shrink it. This removes the static variables (for a minor performance hit) to save 75% of the size of BackendImpl::ReportStats() and other changes elsewhere. Examples (sorry, don't have data for symbols smaller than 6 KB so not exact): disk_cache::BackendImpl::ReportStats() 55423 bytes -> 9788 bytes disk_cache::BackendImpl::FirstEviction() 21361 bytes -> < 6 KB disk_cache::BackendImpl::OpenEntryImpl: 16381 bytes -> < 6 KB disk_cache::EntryImpl::ReportIOTime: 14626 bytes -> < 6 KB disk_cache::Eviction::ReportListStats: 10099 bytes -> < 6 KB disk_cache::Eviction::TrimCacheV2: 7820 bytes -> < 6 KB disk_cache::Eviction::TrimCache: 7095 bytes -> < 6 KB In total my stripped Linux x64 Release content_shell binary shrinks by 132 KB with this change (0.25%). BUG=352555 R=gavinp@chromium.org Review URL: https://codereview.chromium.org/196383016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257637 0039d316-1c4b-4281-b951-d872f2087c98
* SPDY - persist 200 most recently used SPDY settings to perferences file.rtenneti@chromium.org2014-03-184-13/+75
| | | | | | | | | | | | | | | This change reduces the size of Preferences file for around 0.5% users who have lot of entries (some users have more than 10,000 entries). Per server SpdySettings uses around 74 bytes. This change for some users could shkrink the preference file by more than 750k bytes). This change is similar to MRU change for AlternateProtocol. R=rch@chromium.org Review URL: https://codereview.chromium.org/199583005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257610 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 257524 "Move IsStringASCII/UTF8 to base namespace."brettw@chromium.org2014-03-177-20/+20
| | | | | | | | | | | | | | | | > Move IsStringASCII/UTF8 to base namespace. > > Use StringPiece for IsStringUTF8. > > TBR=sky > > Review URL: https://codereview.chromium.org/196793010 TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/198163004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257533 0039d316-1c4b-4281-b951-d872f2087c98
* Move IsStringASCII/UTF8 to base namespace.brettw@chromium.org2014-03-177-20/+20
| | | | | | | | | | Use StringPiece for IsStringUTF8. TBR=sky Review URL: https://codereview.chromium.org/196793010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257524 0039d316-1c4b-4281-b951-d872f2087c98
* Move ScopedFILE to base namespace and scoped_file.hbrettw@chromium.org2014-03-171-1/+2
| | | | | | | | R=viettrungluu@chromium.org Review URL: https://codereview.chromium.org/196073002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257518 0039d316-1c4b-4281-b951-d872f2087c98
* Move some functions in test_file_util to base namespace.brettw@chromium.org2014-03-171-5/+5
| | | | | | | | | R=viettrungluu@chromium.org TBR=viettrungluu Review URL: https://codereview.chromium.org/200883002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257515 0039d316-1c4b-4281-b951-d872f2087c98
* Move CommandLine to base namespace.brettw@chromium.org2014-03-176-9/+12
| | | | | | | | | | | | Fix all forward-declares and header files referencing CommandLine. This keeps a "using base::CommandLine" in the command line header file so that the rest of the source files can be changes in a follow-up. TBR=sky Review URL: https://codereview.chromium.org/196413016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257514 0039d316-1c4b-4281-b951-d872f2087c98
* Implement ScopedFD in terms of ScopedGeneric.brettw@chromium.org2014-03-172-8/+8
| | | | | | | | | | | | | | | Move to a new file base/files/scoped_file.h. I will also add ScopedFILE to here (currently in file_util.h) later. I think there is a crash in the old code in content/browser/zygote_host/zygote_host_impl_linux.cc that this patch should fix. The old ScopedFD took the address of something in a vector that is being modified. I removed SafeScopedFD from content/common/sandbox_linux/sandbox_linux.cc since base's ScopedFD not CHECKs on close failure (this is a more recent addition). Reland of https://codereview.chromium.org/191673003/ R=agl, viettrungluu Review URL: https://codereview.chromium.org/202113004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257473 0039d316-1c4b-4281-b951-d872f2087c98
* Make OpenSSL UpdateServerCert() OS independent.haavardm@opera.com2014-03-178-65/+292
| | | | | | | | | | | | | | | | | | | | | | | | | UpdateServerCert currently creates the server cert chain directly from the openssl struct X509. This works since OSCertHandle currently is an OpenSSL X509 struct when OpenSSL is used on Android and Linux. This patch makes the UpdateServerCert() OS independent by creating the X509Certificate from DER data instead of OSCertHandle to make it compile on the other platforms when USE_OPENSSL is off. Keep the USE_OPENSSL code to avoid converting back and forth between X509 and DER twice and OsCertHandle is X509. I see that there is a DER cache in x509_certificate_openssl.cc which could have simplified the patch a bit. However, if I understand a comment correctly, it shouldn't be mixed with certificates that comes from network, which is the case here. Also, that API is not exposed. Also remove some unused NSS code from x509_certificate_mac.cc. Review URL: https://codereview.chromium.org/173853014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257449 0039d316-1c4b-4281-b951-d872f2087c98
* Remove '--only-block-setting-third-party-cookies' flag.mkwst@chromium.org2014-03-163-20/+0
| | | | | | | | BUG=350870 Review URL: https://codereview.chromium.org/189463020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257366 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Implement ScopedFD in terms of ScopedGeneric. ↵jochen@chromium.org2014-03-152-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/191673003/) Reason for revert: Doesn't correctly link /mnt/data/b/build/slave/Chromium_Linux_Codesearch/build/src/third_party/gold/gold64: warning: hidden symbol 'base::internal::ScopedFDCloseTraits::Free(int)' in obj/base/files/nacl_helper.scoped_file.o is referenced by DSO lib/libipc.so Original issue's description: > Implement ScopedFD in terms of ScopedGeneric. > > Move to a new file base/files/scoped_file.h. I will also add ScopedFILE to here (currently in file_util.h) later. > > I think there is a crash in the old code in content/browser/zygote_host/zygote_host_impl_linux.cc that this patch should fix. The old ScopedFD took the address of something in a vector that is being modified. > > I removed SafeScopedFD from content/common/sandbox_linux/sandbox_linux.cc since base's ScopedFD not CHECKs on close failure (this is a more recent addition). > > BUG= > R=agl@chromium.org, viettrungluu@chromium.org > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257001 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257179 TBR=viettrungluu@chromium.org,agl@chromium.org,brettw@chromium.org NOTREECHECKS=true NOTRY=true BUG= Review URL: https://codereview.chromium.org/201203002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257323 0039d316-1c4b-4281-b951-d872f2087c98
* QUIC - IsDataReady returns false if there is an outstanding write isrtenneti@chromium.org2014-03-151-1/+1
| | | | | | | | | | | pending. BUG=362800 R=wtc@chromium.org, rch@chromium.org Review URL: https://codereview.chromium.org/196343017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257298 0039d316-1c4b-4281-b951-d872f2087c98
* QUIC - use QuicSessionKey tuple (host, port, is_https) instead ofrtenneti@chromium.org2014-03-1538-160/+340
| | | | | | | | | | | | | | | | | | | server_hostname, while creating QuicClientSession, QuicCryptoClientStream, QuicCryptoClientConfig, etc objects. QuicSessionKey is used as the key to access QUIC server config information from all caches (disk and memory caches). On Disk cache, the key for accessing QUIC server information is the flattened version (scheme://hostname:port) of QuicSession. scheme would be either http or https until we support other schemes. R=rch@chromium.org, wtc@chromium.org Review URL: https://codereview.chromium.org/192583004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257272 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a bug when an HttpTransactionFactory fails to create an HttpTransaction.mmenke@chromium.org2014-03-152-3/+77
| | | | | | | | | | | | | | | | | | UrlRequestHttpJob would never send an error up to the UrlRequest, since it assumed the lack of a transaction indicated the request had been cancelled. This was causing sync to stop working during suspend. The NetworkLayer was failing to create an HttpNetworkTransaction while suspended, so sync would end up waiting indefinitely on a hung request which it would never time out. This was only seen by sync because it has no HttpCache layer, and the cache layer never fails to create an HttpTransaction. BUG=348475 Review URL: https://codereview.chromium.org/196643003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257258 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 257227 "SpdyFramer now uses HPACK for SPDY4 headers"jam@chromium.org2014-03-147-533/+498
| | | | | | | | | | | | | | | | | | | | | | | | | | Broke sizes: http://build.chromium.org/p/chromium/builders/Linux/builds/48243 > SpdyFramer now uses HPACK for SPDY4 headers > > SpdyFramer defers calling OnControlFrameHeadersData() until the entire HPACK > headers block has been decoded. At that point, the block is re-encoded to > legacy SPDY3 format and passed to the visitor. > > This is a temporary measure suitable for testing only, intended to allow > a decoupled switch to HPACK prior to being fully wired for > SpdyHeadersHandlerInterface. > > This lands server change 62461978 by jgraettinger. > > BUG=339578 > > Review URL: https://codereview.chromium.org/195413002 TBR=jgraettinger@chromium.org Review URL: https://codereview.chromium.org/197283020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257247 0039d316-1c4b-4281-b951-d872f2087c98
* SpdyFramer now uses HPACK for SPDY4 headersjgraettinger@chromium.org2014-03-147-498/+533
| | | | | | | | | | | | | | | | | | SpdyFramer defers calling OnControlFrameHeadersData() until the entire HPACK headers block has been decoded. At that point, the block is re-encoded to legacy SPDY3 format and passed to the visitor. This is a temporary measure suitable for testing only, intended to allow a decoupled switch to HPACK prior to being fully wired for SpdyHeadersHandlerInterface. This lands server change 62461978 by jgraettinger. BUG=339578 Review URL: https://codereview.chromium.org/195413002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257227 0039d316-1c4b-4281-b951-d872f2087c98
* Move UTF16ToASCII, remove WideToASCII.brettw@chromium.org2014-03-148-11/+15
| | | | | | | | | | | | | | | | This removes WideToASCII and changes all callers to use UTF16ToASCII instead. Moves UTF16ToASCII from base/strings/string_util.h to base/strings/utf_string_conversions.h and into the base namespace. Convert a few related string_util functions to take a StringPiece16 instead of a string16. Remove IsStringASCII(std::wstring) which was unused. Updates callers' includes and namespace usage accordingly. TBR=sky Review URL: https://codereview.chromium.org/176843022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257200 0039d316-1c4b-4281-b951-d872f2087c98
* Implement ScopedFD in terms of ScopedGeneric.brettw@chromium.org2014-03-142-8/+8
| | | | | | | | | | | | | | | | | Move to a new file base/files/scoped_file.h. I will also add ScopedFILE to here (currently in file_util.h) later. I think there is a crash in the old code in content/browser/zygote_host/zygote_host_impl_linux.cc that this patch should fix. The old ScopedFD took the address of something in a vector that is being modified. I removed SafeScopedFD from content/common/sandbox_linux/sandbox_linux.cc since base's ScopedFD not CHECKs on close failure (this is a more recent addition). BUG= R=agl@chromium.org, viettrungluu@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257001 Review URL: https://codereview.chromium.org/191673003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257179 0039d316-1c4b-4281-b951-d872f2087c98
* Remove broken closed push logic in SpdyHttpStream::SendRequest()jgraettinger@chromium.org2014-03-141-4/+1
| | | | | | | | | | | SendRequest() now behaves as other SpdyHttpStream transaction methods, and directly returns the |closed_stream_status_| of closed streams. BUG=346470 Review URL: https://codereview.chromium.org/197473013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257157 0039d316-1c4b-4281-b951-d872f2087c98
* Change DCHECK_IS_ON() to DCHECK_IS_ONwangxianzhu@chromium.org2014-03-142-26/+27
| | | | | | | | | | | | | | | DCHECK_IS_ON has been a constant since r255987, and can be used in both if() and #if. It no more needs to be in function form. Converted 'if (DCHECK_IS_ON)' to '#if DCHECK_IS_ON' if proper. BUG=350462 TEST=build TBR=darin Review URL: https://codereview.chromium.org/195973002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257156 0039d316-1c4b-4281-b951-d872f2087c98
* Reland "Fix various issues in RedirectToFileResourceHandler."davidben@chromium.org2014-03-144-17/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It got reverted due to ASan issues. Fix child_id registration in ResourceDispatcherHostTests so that they happen on ForwardingFilter creation, rather than ad-hoc on a per-request basis. Original description: > - Handle errors in creating temporary files. > - Cancel on write failure instead of resuming. This used to work, but got > lost in some refactoring in r142108. > - Fix the OnResponseCompleted resume logic to account for partial writes. > - Don't lose write errors which occur after OnResponseCompleted is received. > - WeakPtrFactory goes after other members. > - OnWillStart was never forwarded to downstream handlers. > - Make sure the file is closed before deleting it. > > Also add a lot of machinery so we can better unit test this stack. Original Review URL: https://codereview.chromium.org/82273002 BUG=316634,347663 TEST=ResourceDispatcherHostTest.DownloadToFile ResourceDispatcherHostTest.RegisterDownloadedTempFile ResourceLoaderRedirectToFileTest.* TemporaryFileStreamTest.Basic Review URL: https://codereview.chromium.org/199453002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257147 0039d316-1c4b-4281-b951-d872f2087c98
* Additional sanity CHECKs on SPDY payloads.jgraettinger@chromium.org2014-03-142-2/+9
| | | | | | | | | | | | | | Expect that read completions are no longer than the read buffer SpdySession provided. Expect that sizes passed to MakeSpdyFrame() are not larger than the maximum theoretical SPDY frame size. BUG=344080 Review URL: https://codereview.chromium.org/195453003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257145 0039d316-1c4b-4281-b951-d872f2087c98
* - Copied existing C++ and Java JNI implementation.mef@chromium.org2014-03-1424-1/+2698
| | | | | | | | | | - Fixed compilation errors, added custom cflags and ldflags. - Added cronet_package target to build libcronet.so and cronet.jar. - Added cronet_sample_apk target to build CronetSample.apk sample app. Review URL: https://codereview.chromium.org/145213003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257131 0039d316-1c4b-4281-b951-d872f2087c98
* Move QuicServerInfo management from CachedState to the QuicStreamFactoryrch@chromium.org2014-03-1411-139/+147
| | | | | | | | and QuicCryptoClientStream. Review URL: https://codereview.chromium.org/196403002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257063 0039d316-1c4b-4281-b951-d872f2087c98
* Expire broken QUIC A-P mappings after some interval with backoff.rch@chromium.org2014-03-142-0/+68
| | | | | | | | BUG=230030 Review URL: https://codereview.chromium.org/199223002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257042 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Implement ScopedFD in terms of ScopedGeneric. ↵thakis@chromium.org2014-03-142-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/191673003/) Reason for revert: Doesn't build on android: FAILED: /mnt/data/b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/base/memory/base.discardable_memory_allocator_android.o.d -DV8_DEPRECATION_WARNINGS -DBLINK_SCALE_FILTERS_AT_RECORD_TIME -D_FILE_OFFSET_BITS=64 -DNO_TCMALLOC -DDISABLE_NACL -DCHROMIUM_BUILD -DCOMPONENT_BUILD -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DUSE_PROPRIETARY_CODECS -DENABLE_CONFIGURATION_POLICY -DENABLE_NEW_GAMEPAD_API=1 -DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY -DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DENABLE_EGLIMAGE=1 -DENABLE_AUTOFILL_DIALOG=1 -DCLD_VERSION=1 -DENABLE_PRINTING=1 -DENABLE_MANAGED_USERS=1 -DUSE_OPENSSL=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DBASE_IMPLEMENTATION -DANDROID -D__GNU_SOURCE=1 -DUSE_STLPORT=1 -D_STLP_USE_PTR_SPECIALIZATIONS=1 '-DCHROME_BUILD_ID=""' -DHAVE_SYS_UIO_H -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -Igen/base -I../../third_party/android_tools/ndk/sources/android/cpufeatures -I../.. -fstack-protector --param=ssp-buffer-size=4 -Werror -fno-exceptions -fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-reserved-user-defined-literal -Wno-deprecated-register -Xclang -load -Xclang /mnt/data/b/build/slave/Android_Clang_Builder__dbg_/build/src/tools/clang/scripts/../../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-url-directory -fcolor-diagnostics -Wexit-time-destructors -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -no-integrated-as -B/mnt/data/b/build/slave/Android_Clang_Builder__dbg_/build/src/third_party/android_tools/ndk//toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin -ffunction-sections -funwind-tables -g -fstack-protector -fno-short-enums -Wa,--noexecstack -D__compiler_offsetof=__builtin_offsetof -Dnan=__builtin_nan -target arm-linux-androideabi -mllvm -arm-enable-ehabi --sysroot=/mnt/data/b/build/slave/Android_Clang_Builder__dbg_/build/src/third_party/android_tools/ndk//platforms/android-14/arch-arm -I/mnt/data/b/build/slave/Android_Clang_Builder__dbg_/build/src/third_party/android_tools/ndk//sources/cxx-stl/stlport/stlport -Os -g -fomit-frame-pointer -fdata-sections -ffunction-sections -funwind-tables -g0 -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wsign-compare -std=gnu++11 -Wno-implicit-exception-spec-mismatch -Wno-abi -c ../../base/memory/discardable_memory_allocator_android.cc -o obj/base/memory/base.discardable_memory_allocator_android.o ../../base/memory/discardable_memory_allocator_android.cc:84:25:error: no matching function for call to 'mmap' void* const address = mmap( ^~~~ /mnt/data/b/build/slave/Android_Clang_Builder__dbg_/build/src/third_party/android_tools/ndk//platforms/android-14/arch-arm/usr/include/sys/mman.h:47:15: note: candidate function not viable: no known conversion from 'base::ScopedFD' (aka 'ScopedGeneric<int, internal::ScopedFDCloseTraits>') to 'int' for 5th argument extern void* mmap(void *, size_t, int, int, int, off_t); ^ 1 error generated. Original issue's description: > Implement ScopedFD in terms of ScopedGeneric. > > Move to a new file base/files/scoped_file.h. I will also add ScopedFILE to here (currently in file_util.h) later. > > I think there is a crash in the old code in content/browser/zygote_host/zygote_host_impl_linux.cc that this patch should fix. The old ScopedFD took the address of something in a vector that is being modified. > > I removed SafeScopedFD from content/common/sandbox_linux/sandbox_linux.cc since base's ScopedFD not CHECKs on close failure (this is a more recent addition). > > BUG= > R=agl@chromium.org, viettrungluu@chromium.org > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257001 TBR=viettrungluu@chromium.org,agl@chromium.org,brettw@chromium.org NOTREECHECKS=true NOTRY=true BUG= Review URL: https://codereview.chromium.org/197873014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257005 0039d316-1c4b-4281-b951-d872f2087c98
* Implement ScopedFD in terms of ScopedGeneric.brettw@chromium.org2014-03-142-8/+8
| | | | | | | | | | | | | | | Move to a new file base/files/scoped_file.h. I will also add ScopedFILE to here (currently in file_util.h) later. I think there is a crash in the old code in content/browser/zygote_host/zygote_host_impl_linux.cc that this patch should fix. The old ScopedFD took the address of something in a vector that is being modified. I removed SafeScopedFD from content/common/sandbox_linux/sandbox_linux.cc since base's ScopedFD not CHECKs on close failure (this is a more recent addition). BUG= R=agl@chromium.org, viettrungluu@chromium.org Review URL: https://codereview.chromium.org/191673003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257001 0039d316-1c4b-4281-b951-d872f2087c98
* Land Recent QUIC Changesrtenneti@chromium.org2014-03-1326-139/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add varz to track QUIC packets and bytes sent by transmission type. Not flag protected. Merge internal change: 63037893 + Updated QuicConnectionLogger to log TransmissionType. + Used connection_id instead of GUID in the comments. + Moved QUIC_SESSION_PACKET_SENT and QUIC_SESSION_PACKET_RETRANSMITTED to match the log messages description. https://codereview.chromium.org/196053008/ Killing off QUIC v14, which was never actually used. Merge internal change: 63025464 https://codereview.chromium.org/198523002/ Adds a varz variable to track the fraction of times we end up in cubic mode during congestion control. Merge internal change: 62977386 https://codereview.chromium.org/198303004/ Export QUIC response retransmit packet and byte counts via faster stats. Computation is done on a stream basis and ignores retransmitted control packets. Merge internal change: 62911712 https://codereview.chromium.org/197473012/ Avoiding a double disconnect scenario, and DFATALs on server. Merge internal change: 62767600 https://codereview.chromium.org/198263003/ Making GOAWAY advisory for SPDY-over-QUIC. Sending GOAWAYs on new connections when the server enters lame duck. Making sure we only send a GOAWAY once on a given connection. Merge internal change: 62700562 https://codereview.chromium.org/196343008/ R=rch@chromium.org Review URL: https://codereview.chromium.org/198353003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256932 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor DoReadHeadersComplete error-handling.davidben@chromium.org2014-03-132-31/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | There were invariants that are not very obvious from the control flow and some now unnecessary codepaths. Remove HandleConnectionClosedBeforeEndOfHeaders. the conversion to ERR_EMPTY_RESPONSE is since handled handled by HttpStreamParser, evidenced by HttpNetworkTransactionTest.NonKeepAliveConnectionEOF continuing to pass. Note that, in case of some unexpected regression, this will no longer happen in the SPDY case. This allows us to only treat ERR_CONNECTION_CLOSED special in the case there are partial headers. This makes it clearer why DCHECK(response_.headers.get()) is valid. As a bonus, by falling back to HandleIOError's call to ShouldResendRequest, the HTTP_TRANSACTION_RESTART_AFTER_ERROR logging happens. (That said, all such cases in HTTP/1.1 get converted to ERR_EMPTY_RESPONSE. That'll be fixed separately.) BUG=352156 Review URL: https://codereview.chromium.org/197353004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256899 0039d316-1c4b-4281-b951-d872f2087c98
* Enable the ProofVerifierChromium to handle multiple simultaneous requests.rch@chromium.org2014-03-132-52/+121
| | | | | | Review URL: https://codereview.chromium.org/196953006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256896 0039d316-1c4b-4281-b951-d872f2087c98
* Add ChaCha20Poly1305Encrypter, based onwtc@chromium.org2014-03-1320-670/+671
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | draft-agl-tls-chacha20poly1305-04 and identified by the tag CC12. Add the base class AeadBaseEncrypter for Aes128Gcm12Encrypter and ChaCha20Poly1305Encrypter. Both subclasses can be defined by configuring the base class with four parameters. Merge internal CL: 62224774 Add ChaCha20Poly1305Decrypter, based on draft-agl-tls-chacha20poly1305-04 and identified by the tag CC12. This continues the previous CL that added ChaCha20Poly1305Encrypter. Add the base class AeadBaseDecrypter for Aes128Gcm12Decrypter and ChaCha20Poly1305Decrypter. Both subclasses can be defined by configuring the base class with four parameters. Merge internal CL: 62637549 Note: The chacha20_poly1305_*_nss.cc files will be implemented in a follow-up CL. Six files created with "svn copy" were added separately in https://codereview.chromium.org/196743005/ (r256650). R=agl@chromium.org,rtenneti@chromium.org BUG=none TEST=net_unittests Review URL: https://codereview.chromium.org/189893002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256837 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce url::Origin to represent Web Origin.yhirano@chromium.org2014-03-137-60/+76
| | | | | | | | | | | | Introduce url::Origin to represent a serialized Web Origin defined in RFC6455. This class wraps a string representation of blink-side SecurityOrigin object. BUG=339373 R=tyoshino@chromium.org, ricea@chromium.org Review URL: https://codereview.chromium.org/170843007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256789 0039d316-1c4b-4281-b951-d872f2087c98
* Break out histograms for variations of WiFi in QUIC packet loss statusjar@chromium.org2014-03-133-7/+53
| | | | | | | | BUG=349314 Review URL: https://codereview.chromium.org/196323004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256763 0039d316-1c4b-4281-b951-d872f2087c98
* More sync of PRESUBMIT with what CQ runsphajdan.jr@chromium.org2014-03-131-2/+2
| | | | | | | | | | | | | | | | | This removes some configs that were here below in an attempt to reduce the tryserver load. They can be added later slowly after we verify they don't cause unnecessary load. Note that CQ was not checking them anyway, so they were losing at least 50% CL coverage. TBR=maruel BUG=317931 Review URL: https://codereview.chromium.org/198333003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256739 0039d316-1c4b-4281-b951-d872f2087c98
* Move HttpAuth::ChallengeTokenizer to its own file.davidben@chromium.org2014-03-1337-366/+431
| | | | | | | | | | | Avoids a circulate dependency in preparation of using this tokenizer to strip private data from net-export logs. BUG=349502 Review URL: https://codereview.chromium.org/191563004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256715 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 256688 "Fix various issues in RedirectToFileResourceHandler."cpu@chromium.org2014-03-134-177/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The linux asan bot went red ResourceDispatcherHostTest.DownloadToFile (run #1): [ RUN ] ResourceDispatcherHostTest.DownloadToFile [ OK ] ResourceDispatcherHostTest.DownloadToFile (212 ms) [----------] 1 test from ResourceDispatcherHostTest (212 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (213 ms total) [ PASSED ] 1 test. YOU HAVE 5 DISABLED TESTS ================================================================= ==9125==ERROR: LeakSanitizer: detected memory leaks Direct leak of 16 byte(s) in 1 object(s) allocated from: #0 0x49be81 in operator new(unsigned long) /usr/local/google/work/chromium/src/third_party/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:54 #1 0x23ce695 in content::ResourceDispatcherHostImpl::BeginRequest(int, ResourceHostMsg_Request const&, IPC::Message*, int) content/browser/loader/resource_dispatcher_host_impl.cc:1045 #2 0x23cba80 in OnRequestResource content/browser/loader/resource_dispatcher_host_impl.cc:879 #3 0x23cba80 in Dispatch\u003Ccontent::ResourceDispatcherHostImpl, content::ResourceDispatcherHostImpl, int, const ResourceHostMsg_Request &> content/common/resource_messages.h:305 #4 0x23cba80 in content::ResourceDispatcherHostImpl::OnMessageReceived(IPC::Message const&, content::ResourceMessageFilter*, bool*) content/browser/loader/resource_dispatcher_host_impl.cc:841 #5 0xe04954 in content::ResourceDispatcherHostTest_DownloadToFile_Test::TestBody() content/browser/loader/resource_dispatcher_host_unittest.cc:2840 #6 0x2c10c9a in HandleExceptionsInMethodIfSupported\u003Ctesting::Test, void> testing/gtest/src/gtest.cc:2045 #7 0x2c10c9a in testing::Test::Run() testing/gtest/src/gtest.cc:2061 #8 0x2c12dea in testing::TestInfo::Run() testing/gtest/src/gtest.cc:2237 #9 0x2c13bb3 in testing::TestCase::Run() testing/gtest/src/gtest.cc:2344 #10 0x2c24c6a in testing::internal::UnitTestImpl::RunAllTests() testing/gtest/src/gtest.cc:4065 #11 0x2c24250 in HandleExceptionsInMethodIfSupported\u003Ctesting::internal::UnitTestImpl, bool> testing/gtest/src/gtest.cc:2045 #12 0x2c24250 in testing::UnitTest::Run() testing/gtest/src/gtest.cc:3697 #13 0x2b9ed2c in RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2231 #14 0x2b9ed2c in base::TestSuite::Run() base/test/test_suite.cc:213 #15 0x2b92bcb in Run base/callback.h:401 #16 0x2b92bcb in base::(anonymous namespace)::LaunchUnitTestsInternal(int, char**, base::Callback\u003Cint ()> const&, int) base/test/launcher/unit_test_launcher.cc:494 #17 0x199a83e in main content/test/run_all_unittests.cc:14 #18 0x7f6e898bf76c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226 SUMMARY: AddressSanitizer: 16 byte(s) leaked in 1 allocation(s). http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%2BLSan%20Tests%20%282%29/builds/409 > Fix various issues in RedirectToFileResourceHandler. > > - Handle errors in creating temporary files. > - Cancel on write failure instead of resuming. This used to work, but got > lost in some refactoring in r142108. > - Fix the OnResponseCompleted resume logic to account for partial writes. > - Don't lose write errors which occur after OnResponseCompleted is received. > - WeakPtrFactory goes after other members. > - OnWillStart was never forwarded to downstream handlers. > - Make sure the file is closed before deleting it. > > Also add a lot of machinery so we can better unit test this stack. > > BUG=316634,347663 > TEST=ResourceDispatcherHostTest.DownloadToFile > ResourceDispatcherHostTest.RegisterDownloadedTempFile > ResourceLoaderTest.RedirectToFile* > TemporaryFileStreamTest.Basic > > Review URL: https://codereview.chromium.org/82273002 TBR=davidben@chromium.org Review URL: https://codereview.chromium.org/196533013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256704 0039d316-1c4b-4281-b951-d872f2087c98
* Remove NetLog::LOG_BASIC.davidben@chromium.org2014-03-1222-139/+147
| | | | | | | | | | | | It's only used in test code. Preparatory CL to introduce a LOG_STRIP_PRIVATE_DATA log level, so we don't have to break the ordering of levels. BUG=349502 Review URL: https://codereview.chromium.org/196203002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256690 0039d316-1c4b-4281-b951-d872f2087c98
* Add additional information to pinning reports.agl@chromium.org2014-03-122-0/+11
| | | | | | | | | | We suspect that malware might be corrupting our pinning information somehow. BUG=none Review URL: https://codereview.chromium.org/197663004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256689 0039d316-1c4b-4281-b951-d872f2087c98