chromium/src/net.git
8 min agoRevert of Reenable UpdateDynamicPKPMaxAge0 test. (https://codereview.chromium.org... master
jam@chromium.org [Fri, 25 Jul 2014 06:38:57 +0000 (06:38 +0000)]
Revert of Reenable UpdateDynamicPKPMaxAge0 test. (https://codereview.chromium.org/293253002/)

Reason for revert:
this is still flaking. more info in bug

TBR=palmer
NOTRY=true

Original issue's description:
> Reenable UpdateDynamicPKPMaxAge0 test.
>
> BUG=375538
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=281863

Review URL: https://codereview.chromium.org/412353006

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285508 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

41 min agoMake Pepper WebSocket UtilityGetProtocol test less flaky by making the wsh wait for...
tyoshino@chromium.org [Fri, 25 Jul 2014 06:05:27 +0000 (06:05 +0000)]
Make Pepper WebSocket UtilityGetProtocol test less flaky by making the wsh wait for close

Attempt to fix the flakiness by making sure the server handler doesn't exit
before the client closes.

BUG=389084
R=jgraettinger,yhirano

Review URL: https://codereview.chromium.org/410383003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285500 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

44 min agoSwitch to using SSL_get0_certificate_types for client auth.
davidben@chromium.org [Fri, 25 Jul 2014 06:03:08 +0000 (06:03 +0000)]
Switch to using SSL_get0_certificate_types for client auth.

Upstream added SSL_get0_certificate_types while we added
SSL_get_client_certificate_types in parallel. Switch to upstream's API.

BUG=388000

Review URL: https://codereview.chromium.org/415853002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285498 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

51 min agoUpdate net/data/websocket/close-code-and-reason_wsh.py
tyoshino@chromium.org [Fri, 25 Jul 2014 05:56:16 +0000 (05:56 +0000)]
Update net/data/websocket/close-code-and-reason_wsh.py

Sync with one in the LayoutTests directory to include the code to
wait for a close frame from the client.

BUG=396399
R=jgraettinger,ricea

Review URL: https://codereview.chromium.org/415953003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285497 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

51 min agoRemove Create*Value (except CreateNullValue)
estade@chromium.org [Fri, 25 Jul 2014 05:55:36 +0000 (05:55 +0000)]
Remove Create*Value (except CreateNullValue)

BUG=160586

Review URL: https://codereview.chromium.org/415423002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285496 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

86 min agoRevert 285446 "Log the certificate subjects from the server cert..."
hajimehoshi@chromium.org [Fri, 25 Jul 2014 05:21:16 +0000 (05:21 +0000)]
Revert 285446 "Log the certificate subjects from the server cert..."

Tests failed on XP: http://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%281%29/builds/32148

> Log the certificate subjects from the server certificate sent via QUIC.
>
> Review URL: https://codereview.chromium.org/418723002

TBR=rch@chromium.org

Review URL: https://codereview.chromium.org/415333005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285480 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 hours agoMake the default alternate protcol probability threshold 1, not 0.
rch@chromium.org [Fri, 25 Jul 2014 03:56:54 +0000 (03:56 +0000)]
Make the default alternate protcol probability threshold 1, not 0.
This means that by default, Chrome will honor headers like:
  Alternate-Protocol: 80:quic
  Alternate-Protocol: 80:quic,p=1
But not:
  Alternate-Protocol: 80:quic,p=.5
Eventually we need to switch to a dynamic threshold, but on step at a time.

Review URL: https://codereview.chromium.org/411423003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285473 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 hours agoLog the certificate subjects from the server certificate sent via QUIC.
rch@chromium.org [Fri, 25 Jul 2014 01:16:49 +0000 (01:16 +0000)]
Log the certificate subjects from the server certificate sent via QUIC.

Review URL: https://codereview.chromium.org/418723002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285446 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

5 hours agoRemove LOG(INFO)'s from spdy_network_transaction_unittest.cc - Revert r244946
rch@chromium.org [Fri, 25 Jul 2014 01:07:02 +0000 (01:07 +0000)]
Remove LOG(INFO)'s from spdy_network_transaction_unittest.cc - Revert r244946

BUG=395354

Review URL: https://codereview.chromium.org/416153002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285444 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 hours agoRename ServerBoundCert => ChannelID to reflect the current name
rch@chromium.org [Fri, 25 Jul 2014 00:25:35 +0000 (00:25 +0000)]
Rename ServerBoundCert => ChannelID to reflect the current name
of this feature.

TBR=darin

Review URL: https://codereview.chromium.org/356713005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285432 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 hours agoExplain the three values written by WriteSecBuf, in particular, why the
wtc@chromium.org [Thu, 24 Jul 2014 23:38:26 +0000 (23:38 +0000)]
Explain the three values written by WriteSecBuf, in particular, why the
first two values are the same.

R=rsleevi@chromium.org, glider@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/418533002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285407 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 hours agonet: add a couple of sites to HSTS preloaded.
agl@chromium.org [Thu, 24 Jul 2014 21:02:48 +0000 (21:02 +0000)]
net: add a couple of sites to HSTS preloaded.

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285368 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

19 hours agoFix copy-pasto in MockSSPILibrary::QuerySecurityPackageInfo and MockSSPILibrary:...
glider@chromium.org [Thu, 24 Jul 2014 11:21:44 +0000 (11:21 +0000)]
Fix copy-pasto in MockSSPILibrary::QuerySecurityPackageInfo and MockSSPILibrary::DeleteSecurityContext

BUG=NONE
R=cbentzel@chromium.org

Review URL: https://codereview.chromium.org/414443011

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285191 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

19 hours agoFix WebSocket race between close and connect.
ricea@chromium.org [Thu, 24 Jul 2014 10:48:16 +0000 (10:48 +0000)]
Fix WebSocket race between close and connect.

If the WebSocket handshake was cancelled immediately after the connect
succeeded before the ClientSocketHandle was fully initialised, then the
socket would not be released back to the pool, and as a result the
endpoint would not be unlocked.

Fix by actively reclaiming the socket in
WebSocketTransportClientSocketPool::CancelRequest().

Also add a test for this condition.

BUG=394268, 389084
TEST=net_unittests

Review URL: https://codereview.chromium.org/394113003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285175 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

26 hours agoRefactor unix domain socket.
byungchul@chromium.org [Thu, 24 Jul 2014 03:51:23 +0000 (03:51 +0000)]
Refactor unix domain socket.

This is a pre-requisite for http server refactoring,
https://codereview.chromium.org/296053012/.

1) Define UnixDomainClientSocket and UnixDomainServerSocket utilizing
   SocketLibevent.
2) Rename UnixDomainSocket to UnixDomainListenSocket to reduce confusion.
3) unittests

BUG=371906

Review URL: https://codereview.chromium.org/376323002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285148 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

27 hours agoRemove now unnecessary const_casts.
davidben@chromium.org [Thu, 24 Jul 2014 03:01:11 +0000 (03:01 +0000)]
Remove now unnecessary const_casts.

BoringSSL fixes this API to be const-correct.

BUG=none

Review URL: https://codereview.chromium.org/417683003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285134 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

32 hours agoclang/win: Fix most -Wwriteable-strings warnings.
thakis@chromium.org [Wed, 23 Jul 2014 22:04:53 +0000 (22:04 +0000)]
clang/win: Fix most -Wwriteable-strings warnings.

Many win32 APIs take non-const string pointers. I checked that MSDN documents
them as _In_ and says that they are inputs, and then added const_cast<>s at
the calling sites. (In one test, I introduced a helper struct so that there
can be fewer casts.)

This wasn't just busywork, I found one function that we were handing string
literals where the documentation explicitly said that that's not valid
(filed http://crbug.com/396705).

I didn't change the DECLARE_REGISTRY_APPID_RESOURCEID() call in cloud_print;
it sounds like that'll fix itself when we update to the 2014 sdk:
http://connect.microsoft.com/VisualStudio/feedback/details/806376/atl-hindrances-to-adopting-new-strictstrings-conformance-option-in-vs2013

BUG=396705,82385
R=rnk@chromium.org, rsleevi@chromium.org, sergeyu@chromium.org, vitalybuka@chromium.org

Review URL: https://codereview.chromium.org/413763003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@285051 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

37 hours agoDisable all the tests that are flaking more than 5% on Windows builders.
jam@chromium.org [Wed, 23 Jul 2014 17:20:15 +0000 (17:20 +0000)]
Disable all the tests that are flaking more than 5% on Windows builders.

Data from http://chromium-build-logs.appspot.com/flakiness_dashboard?master=chromium.win.

BUG=386891,387124,396373,396384,396386,396387,396388,396390,396392,387124,396393,396395,396399,396402,396403,396404,396405,393149,396409,95557,396413,396414,375894
R=viettrungluu@chromium.org
TBR=brettw, rvargas, sky

Review URL: https://codereview.chromium.org/410843003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284977 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

38 hours agoEncode all grit outputs in .gn files
brettw@chromium.org [Wed, 23 Jul 2014 16:32:32 +0000 (16:32 +0000)]
Encode all grit outputs in .gn files

This finishes the rest of the Grit outputs that was started in a previous pass, and removes the ability to optionally deduce outputs at GN-time (which is slow so we don't want to do it).

R=viettrungluu@chromium.org

Review URL: https://codereview.chromium.org/411543005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284947 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 days agoRename WorkSource to CallbackSource.
wtc@chromium.org [Wed, 23 Jul 2014 01:50:04 +0000 (01:50 +0000)]
Rename WorkSource to CallbackSource.

Accordingly, the DoPendingWork method is renamed RunPendingCallbacks,
the work_source parameter is renamed callback_source, and the
CommunicateHandshakeMessagesAndDoWork function is renamed
CommunicateHandshakeMessagesAndRunCallbacks.

Change CryptoTestUtils::HandshakeWithFakeClient to verify that
the ChannelIDSource operate asynchronously if the
channel_id_source_async option is true.

R=rch@chromium.org,rtenneti@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/405293003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284831 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 days agoQUIC - undo the chromium specific changes from the following CL which
rtenneti@chromium.org [Wed, 23 Jul 2014 01:40:40 +0000 (01:40 +0000)]
QUIC - undo the chromium specific changes from the following CL which
did "Moving work from the QuicSession constructor to
InitializeSession()".

  https://codereview.chromium.org/393953009/
  Merge internal change: 70661792

This CL fixes the crash bug in
net::QuicSession::IsCryptoHandshakeConfirmed. We are accessing
crypto_stream_ before it was created. This could be triggered if the
computer is slow or goes to sleep and crypto handshake not completed
timer goes off.

BUG=395790
R=rch@chromium.org

Review URL: https://codereview.chromium.org/407193002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284827 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 days agoDisable two recent Channel ID-related CLs to investigate a secure QUIC performance...
wtc@chromium.org [Tue, 22 Jul 2014 23:37:12 +0000 (23:37 +0000)]
Disable two recent Channel ID-related CLs to investigate a secure QUIC performance degradation.

The change to quic_stream_factory.cc disables
https://codereview.chromium.org/346323002/

The change to quic_crypto_client_stream.cc disables
https://codereview.chromium.org/355293003/

R=rch@chromium.org
BUG=396185

Review URL: https://codereview.chromium.org/414523004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284806 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 days agoSwitch to BoringSSL.
davidben@chromium.org [Tue, 22 Jul 2014 18:20:37 +0000 (18:20 +0000)]
Switch to BoringSSL.

This is a reland of r284079 which was reverted in r284248 for components build
issues. That, in turn, was a reland of r283813 which was reverted in r283845
because it broke WebRTC tests on Android. That, in turn, was a reland of
r283542 which was reverted in r283591 because it broke the WebView build.

This is a much larger change than its diff suggests. If it breaks
something, please revert first and ask questions later.

BUG=393317
R=agl@chromium.org, jam@chromium.org

Review URL: https://codereview.chromium.org/401153002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284729 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 days agoDifferent SPDY Hpack constant table for startup time and footprint (60KB).
bratell@opera.com [Tue, 22 Jul 2014 16:21:48 +0000 (16:21 +0000)]
Different SPDY Hpack constant table for startup time and footprint (60KB).

The hpack constant table was 40-60 KB (gcc: 40 KB, clang: 60KB), for
storing 2 KB of data. Not optimal.

By making it an ordinary static data table we save 60 KB with clang:

Total change: -64153 bytes
==========================
  1 added, totalling +2056 bytes across 1 sources
  1 removed, totalling -66215 bytes across 1 sources
  1 grown, for a net change of +14 bytes (367 bytes before, 381 bytes after) across 1 sources
  1 shrunk, for a net change of -8 bytes (10504 bytes before, 10496 bytes after) across 1 sources

and save 40 KB with gcc:

Total change: -41382 bytes
==========================
  1 added, totalling +2056 bytes across 1 sources
  2 removed, totalling -43597 bytes across 2 sources
  1 grown, for a net change of +167 bytes (341 bytes before, 508 bytes after) across 1 sources
  1 shrunk, for a net change of -8 bytes (10576 bytes before, 10568 bytes after) across 1 sources

BUG=394269

Review URL: https://codereview.chromium.org/393573002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284698 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 days agoEnforce SafetyMode for YouTube if prefs::kForceSafeSearch is on, by modifying (or...
treib@chromium.org [Tue, 22 Jul 2014 16:03:24 +0000 (16:03 +0000)]
Enforce SafetyMode for YouTube if prefs::kForceSafeSearch is on, by modifying (or adding) YouTube's PrefCookie in the HTTP header.

This is essentially a followup to https://codereview.chromium.org/11186002/

Note: This is a fixed reland of crrev.com/282546 / https://codereview.chromium.org/354183002/ which was reverted due to a bug in ParseRequestCookieLine.

TBRing since it has already been reviewed in the first try.

TBR=erikwright@chromium.org

BUG=344815

Review URL: https://codereview.chromium.org/388823002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284687 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 days agoAdd AssertNoURLRequests() to URLRequestContext subclass destructors.
jgraettinger@chromium.org [Tue, 22 Jul 2014 00:27:40 +0000 (00:27 +0000)]
Add AssertNoURLRequests() to URLRequestContext subclass destructors.

BUG=377852

Review URL: https://codereview.chromium.org/379293002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284556 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 days agoSet tls_client_cert_optional in net/.../testserver.py.
pneubeck@chromium.org [Mon, 21 Jul 2014 15:22:41 +0000 (15:22 +0000)]
Set tls_client_cert_optional in net/.../testserver.py.

Before this value wasn't set at all leading to crashes of the test server if tsls_client_auth was enabled.

BUG=NONE
TBR=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/407653005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284431 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

3 days agonet: fix comment typo and format in HSTS preloaded.
agl@chromium.org [Mon, 21 Jul 2014 13:54:39 +0000 (13:54 +0000)]
net: fix comment typo and format in HSTS preloaded.

(No semantic change.)

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284422 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 days agoRevert "Switch to BoringSSL."
agl@chromium.org [Fri, 18 Jul 2014 23:18:18 +0000 (23:18 +0000)]
Revert "Switch to BoringSSL."

This reverts commit r284079.

BUG=395271

Review URL: https://codereview.chromium.org/406693004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284248 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 days agoLand Recent QUIC Changes.
rtenneti@chromium.org [Fri, 18 Jul 2014 21:35:24 +0000 (21:35 +0000)]
Land Recent QUIC Changes.

Cleanup and adding GetCongestionControlType.

Merge internal change: 71125139
https://codereview.chromium.org/400813002/

QUIC test only change to add track the observed loss rate in
SendAlgorithmSimulator.

Merge internal change: 71116533
https://codereview.chromium.org/399763004/

Minor formatting changes to keep the code similar to internal tree.

Merge internal change: 71059110
https://codereview.chromium.org/393283005/

Add more testing to QUIC's BbrTcpSender to verify it shares bandwidth
fairly with itself.

Also includes fixes to SendAlgorithmSimulator.

Merge internal change: 71000950
https://codereview.chromium.org/399793002/

Will merge BbrTcpSender changes in a future CL after the approvals.

Add a DLOG that indicates the peer sent us a QUIC_PUBLIC_RESET. Makes it
more obvious why the connection ended when running the quic_client.

Merge internal change: 70900278
https://codereview.chromium.org/399793002/

QUIC test only change to add a convenience operator for printing
SendAlgorithmSimulator stats.

Merge internal change: 70897829
https://codereview.chromium.org/399773003/

Adds dynamic setting of FEC group size based on the connection's current
congestion window.

There will be two triggers for transmitted an FEC packet, when
protection is required -- max_packets_per_fec_group, and an FEC alarm
that triggers an FEC packet if the FEC group has been open for long
enough. This CL implements dynamically setting
max_packets_per_fec_group. The FEC alarm will be written in a
subsequent CL.

Merge internal change: 70821636
https://codereview.chromium.org/398873003/

R=rch@chromium.org

Review URL: https://codereview.chromium.org/399153003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284205 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 days agoQUIC - minor cleanup changes.
rtenneti@chromium.org [Fri, 18 Jul 2014 16:06:23 +0000 (16:06 +0000)]
QUIC - minor cleanup changes.
  + Fixed indentation.
  + Added early returns.
  + Fixed comments.
  + Removed not needed virtual.

Fixed nit comments from wtc for the following CLs.

  https://codereview.chromium.org/368803003/
  https://codereview.chromium.org/366863002/
  https://codereview.chromium.org/393953011/

R=wtc@chromium.org

Review URL: https://codereview.chromium.org/394053003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284109 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 days agoSwitch to BoringSSL.
agl@chromium.org [Fri, 18 Jul 2014 13:51:03 +0000 (13:51 +0000)]
Switch to BoringSSL.

(This is a reland of r283813 which was reverted in r283845 because it broke
WebRTC tests on Android. That, in turn, was a reland of of r283542 which was
reverted in r283591 because it broke the WebView build.)

This is a much larger change than its diff suggests. If it breaks
something, please revert first and ask questions later.

BUG=none

Review URL: https://codereview.chromium.org/401613008

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284079 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 days agoRemove NSSCertDatabase from ClientCertStoreChromeOS unittest.
pneubeck@chromium.org [Fri, 18 Jul 2014 10:57:07 +0000 (10:57 +0000)]
Remove NSSCertDatabase from ClientCertStoreChromeOS unittest.

The database was only used to import a PKCS#12 file. By changing to separate key (PKCS#8 format) and cert (X509 in PEM encoding), only dependencies on the lower level RSAPrivateKey, X509Certificate and PK11_* NSS functions are required.
Note this removes at the same time a call to the deprecated NSSCertDatabase::GetInstance().

Also
- fixes multi profile cases of the unit test and the CA matching (the latter is now identical to all other platforms).
- fixes a bug in the matching of client certs from software slots, because of reused cert database names
- gets rid of the error output that occurred during the PKCS12 import because the file contained also a CA cert:
  [ERROR:nsPKCS12Blob.cpp(219)] Could not grab a handle to the certificate in the slot from the corresponding PKCS#12 DER certificate.

BUG=210525, 329735,315285

Review URL: https://codereview.chromium.org/394013005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284056 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

6 days agoLand Recent QUIC Changes.
rtenneti@chromium.org [Fri, 18 Jul 2014 09:27:50 +0000 (09:27 +0000)]
Land Recent QUIC Changes.

Correct comment, and change ptr argument to const ref in
CacheNewServerConfig.

Merge internal change: 70794754
https://codereview.chromium.org/398643003/

Allow QUIC clients to accept STK/SCFG updates on an existing connection.

Merge internal change: 70794017
https://codereview.chromium.org/393953011/

To be used in internal change: 70123647 when processing a mid-connection
update of SCFG/STK.

QUIC: Factor out updating cached server config into a new method.

Merge internal change: 70736560
https://codereview.chromium.org/398623003/

Adding logging to quic for tracegraf

This should not change behavior. set_logging_visitor is only used in a
test and will be done in a followup CL.

Adding logging to quic in a protobuf that will be used by tracegraf (not
yet used in production).

Merge internal change: 70735705
https://codereview.chromium.org/398683002/

Reduce the scope of a spurious WARNING log when processing strike
register errors to something that truly shouldn't happen.  Also change
log level to DFATAL.

Merge internal change: 70716413
https://codereview.chromium.org/391283003/

Enable Kathleen Nichols min rtt algorithm with a 1 minute window in
QUIC's BBRTcpSender.

Merge internal change: 70683520
https://codereview.chromium.org/394023005/

Moving the work currently done in the QuicSession constructor to
Initialize().

This is worthwhile because currently it's possible for virtual functions
to be called from under the stack of the QuicSession constructor, which
is confusing and annoying to debug.  Example: if a bad config (without
SetDefaults called) is passed to the quic server session, it calls
SetFromConfig which calls SetIdleNetworkTimeout which calls
CheckForTimeout which can technically call SendConnectionClose which
calls CloseConnection which calls visitor->OnConnectionClosed() on the
session, which still doesn't have a good vtable.

As it turns out, this puts the internal server in an inconsistent state
which causes all sorts of other annoying to debug things.  This can be
solved by never giving an invalid config (heh) or, say, not doing a ton
of complicated work in a constructor in the first place.

This hopefully will also make some unit testing earlier as you don't
have to do quite as much work in test classes.

Moving work from the QuicSession constructor to InitializeSession()

Merge internal change: 70661792
https://codereview.chromium.org/393953009/

Change QUIC's pacing sender to send at 1.25x the estimated bandwidth
during congestion avoidance, instead of 2x.

Merge internal change: 70658053
https://codereview.chromium.org/393943004/

Populate FasterExtraStats for QUIC requests
if --faster_stats_extra_logging != 0

Merge internal change: 70419510
https://codereview.chromium.org/396533003/

Fix a newly introduced bug in QUIC's PacingSender where burst_tokens_
would never be set back to 10 after the initialization, because
OnCongestionEvent is never called with bytes_in_flight of 0.

Merge internal change: 70371419
https://codereview.chromium.org/397513002/

R=rch@chromium.org

Review URL: https://codereview.chromium.org/391383002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@284041 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoFix canPlayType() support for non-RFC compliant mp3 mimetype.
acolwell@chromium.org [Thu, 17 Jul 2014 23:49:47 +0000 (23:49 +0000)]
Fix canPlayType() support for non-RFC compliant mp3 mimetype.

The 'audio/mpeg; codecs="mp3"' mimetype is not RFC 3003 compliant, but a
bunch of sites apparently use it. This change restores the behavior that
was in M35 and earlier and returns "probably" for this mimetype.

The changes are intentionally kept small so they can be easily be merged
to the M36 & M37 branches.

BUG=393720,386073
TEST=MediaCanPlayTypeTest.CodecSupportTest_mp3

Review URL: https://codereview.chromium.org/400023002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283929 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoRevert 283813 "Switch to BoringSSL."
vitalybuka@chromium.org [Thu, 17 Jul 2014 20:07:06 +0000 (20:07 +0000)]
Revert 283813 "Switch to BoringSSL."
Failed WebRtcBrowserTest on android_dbg_triggered_tests.

> Switch to BoringSSL.
>
> (This is a reland of r283542 which was reverted in r283591 because it
> broke the WebView build. The android_aosp trybots are broken[1] so this
> based on hope.)
>
> This is a much larger change than its diff suggests. If it breaks
> something, please revert first and ask questions later.
>
> [1] http://code.google.com/p/chromium/issues/detail?id=394597
>
> BUG=none
>
> Review URL: https://codereview.chromium.org/399993002

TBR=agl@chromium.org

Review URL: https://codereview.chromium.org/405503002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283845 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoQUIC - Record reject reasons for CHLO message.
rtenneti@chromium.org [Thu, 17 Jul 2014 18:06:57 +0000 (18:06 +0000)]
QUIC - Record reject reasons for CHLO message.

Added "Net.QuicClientHelloRejectReasons" histogram to track
the reject reason in UMA. Currently it tracks only reject
reason.

Once we have more data, will add the multiple reject reasons
to histograms.xml (instead of listing all potential
combinations). We are guessing, that we would have few
failures due to multiple errors.

R=jar@chromium.org, rch@chromium.org, asvitkine@chromium.org, wtc@chromium.org

Review URL: https://codereview.chromium.org/342863005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283816 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoSwitch to BoringSSL.
agl@chromium.org [Thu, 17 Jul 2014 17:59:10 +0000 (17:59 +0000)]
Switch to BoringSSL.

(This is a reland of r283542 which was reverted in r283591 because it
broke the WebView build. The android_aosp trybots are broken[1] so this
based on hope.)

This is a much larger change than its diff suggests. If it breaks
something, please revert first and ask questions later.

[1] http://code.google.com/p/chromium/issues/detail?id=394597

BUG=none

Review URL: https://codereview.chromium.org/399993002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283813 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoUpload pk8 key files for ClientCertStoreChromeOS unittest.
pneubeck@chromium.org [Thu, 17 Jul 2014 13:21:49 +0000 (13:21 +0000)]
Upload pk8 key files for ClientCertStoreChromeOS unittest.

This uploads key files before changing the unit test, as the Commit-Queue has problems with binary files.

Main CL will be committed afterwards: https://codereview.chromium.org/394013005/

BUG=210525, 329735, 315285
TBR=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/399103002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283765 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

7 days agoReject reasons from strike register when nonce validation fails.
rtenneti@chromium.org [Thu, 17 Jul 2014 07:34:19 +0000 (07:34 +0000)]
Reject reasons from strike register when nonce validation fails.

Send reject reason to client for debugging purposes.

Merge internal change: 70366491

R=wtc@chromium.org

Review URL: https://codereview.chromium.org/388333005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283692 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoRemove base/network_change_notifier_linux_unittest.cc exclusion.
mukai@chromium.org [Thu, 17 Jul 2014 06:16:50 +0000 (06:16 +0000)]
Remove base/network_change_notifier_linux_unittest.cc exclusion.

It seems this file doesn't exist anymore, so the exclusion
rules aren't also necessary. And GN reports error for
excluding non-existing files.

BUG=None
R=brettw@chromium.org, szym@chromium.org
TEST=None

Review URL: https://codereview.chromium.org/399723002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283655 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoFix a few stray net::'s in net/socket/
davidben@chromium.org [Thu, 17 Jul 2014 04:27:04 +0000 (04:27 +0000)]
Fix a few stray net::'s in net/socket/

BUG=none

Review URL: https://codereview.chromium.org/395303003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283642 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoRemove default key slot from KeygenHandler.
pneubeck@chromium.org [Thu, 17 Jul 2014 04:05:12 +0000 (04:05 +0000)]
Remove default key slot from KeygenHandler.

KeygenHandler defaulted to use the persistent key slot. However, the Handler is also used in ChromeOS where no such global persistent slot exists.

This change removes this default behavior from KeygenHandler.
Instead only the slot provided by the CryptoModuleDelegate will be used.
If no CryptoModuleDelegate is set, then an error will be thrown on keygen usage.

The unit test of KeygenHandler now explicitly provides the slot through a StubCryptoModuleDelegate.
In a follow up, the crypto::GetPersistentNSSKeySlot() call will be removed from the unit tests as well and instead the test slot will be get()'ed from the ScopedTestNSSDB.

BUG=210525

Review URL: https://codereview.chromium.org/384413004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283634 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoRevert "Switch to BoringSSL."
agl@chromium.org [Thu, 17 Jul 2014 00:20:36 +0000 (00:20 +0000)]
Revert "Switch to BoringSSL."

This reverts commit 283542.

This broke the WebView Android build.

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283591 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoReimplement QuicCryptoClientStream::WasChannelIDSent with a boolean
wtc@chromium.org [Wed, 16 Jul 2014 23:17:47 +0000 (23:17 +0000)]
Reimplement QuicCryptoClientStream::WasChannelIDSent with a boolean
member so we can free channel_id_key_ after we're finished with it.

This fixes a TODO in https://codereview.chromium.org/355293003/.

R=rch@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/397803004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283569 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoSwitch to BoringSSL.
agl@chromium.org [Wed, 16 Jul 2014 22:15:31 +0000 (22:15 +0000)]
Switch to BoringSSL.

(This is a much larger change than its diff suggests. If it breaks something, please revert first and ask questions later.)

R=davidben@chromium.org, eroman@chromium.org, rsleevi@chromium.org

Review URL: https://codereview.chromium.org/345063006

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283542 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoReplace setsockopt(IP_PKTINFO) and setsockopt(IPV6_RECVPKTINFO) calls by
wtc@chromium.org [Wed, 16 Jul 2014 20:23:12 +0000 (20:23 +0000)]
Replace setsockopt(IP_PKTINFO) and setsockopt(IPV6_RECVPKTINFO) calls by
gfe_quic::QuicSocketUtils::SetGetAddressInfo() calls. Update
gfe_quic::QuicSocketUtils::SetGetAddressInfo() to the best-known
implementation.

Merge internal CL: 70966702

R=rtenneti@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/397793004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283482 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoRemove an unused local variable in quic_in_memory_cache.cc, only used
wtc@chromium.org [Wed, 16 Jul 2014 19:05:58 +0000 (19:05 +0000)]
Remove an unused local variable in quic_in_memory_cache.cc, only used
for testing.

Merge internal CL: 71210916

R=rtenneti@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/393143002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283464 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoFix buffer reuse bug in SSLServerSocket tests.
davidben@chromium.org [Wed, 16 Jul 2014 18:40:43 +0000 (18:40 +0000)]
Fix buffer reuse bug in SSLServerSocket tests.

Write would return synchronously but continue to retain the buffer.

BUG=380340,381147

Review URL: https://codereview.chromium.org/396003002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283454 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

8 days agoNarrow the strike register window in both directions when tracking many
rtenneti@chromium.org [Wed, 16 Jul 2014 18:29:50 +0000 (18:29 +0000)]
Narrow the strike register window in both directions when tracking many
recent nonces.  This reduces the amount of time that nonces with future
timestamps are tracked, which allows accepting more nonces from clients
with clocks that agree with the strike register's clock.

Not flag protected.

Merge internal change: 69497947

R=wtc@chromium.org

Review URL: https://codereview.chromium.org/389393005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283445 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 days agoFix TestChannelIDKey ASan failure under OpenSSL.
davidben@chromium.org [Wed, 16 Jul 2014 05:30:43 +0000 (05:30 +0000)]
Fix TestChannelIDKey ASan failure under OpenSSL.

EVP_MD_CTX has two sets of cleanup functions, depending on whether it's heap-
or stack-allocated.

BUG=393962

Review URL: https://codereview.chromium.org/395933003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283358 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 days agofix narrowing conversion warning in SpdyFramerTest.CreatePriority
mostynb@opera.com [Wed, 16 Jul 2014 05:15:45 +0000 (05:15 +0000)]
fix narrowing conversion warning in SpdyFramerTest.CreatePriority

Avoid narrowing conversion warnings by not trying to put
a char in an unsigned char array.

BUG=345769

Review URL: https://codereview.chromium.org/392883002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283352 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 days ago[Android][gn] Add android resources templates
cjhopman@chromium.org [Wed, 16 Jul 2014 00:11:03 +0000 (00:11 +0000)]
[Android][gn] Add android resources templates

This adds support for android resources to gn.

Two new templates are introduced:

java_string_grd: This is like gyp's build/java_strings_grd.gypi. It runs
grit and generates Android strings.xml files and then zips them
together.
android_resources: This is the target for android resources. It is
mostly a wrapper around process_resources.py. This is *not part* of
android_library (like it is in gyp). Making these two things separate is
more like facebook's BUCK and google's internal build rules (and gyp's
java.gypi and java_apk.gypi have gotten way too big and complicated).

Changes to the actual build scripts are very minor except for the added
support for andoid_resources to write_build_config.py. Building
resources requires getting all the transitive resource dependencies, and
so this reuses the simple sorted transitive dependency thing from
write_ordered_libraries.py.

TBR=rch@chromium.org
BUG=359249

Review URL: https://codereview.chromium.org/361633002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283293 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

9 days agoFix strike register horizon computation.
rtenneti@chromium.org [Tue, 15 Jul 2014 19:11:40 +0000 (19:11 +0000)]
Fix strike register horizon computation.

Merge internal change: 69311275

R=wtc@chromium.org

Review URL: https://codereview.chromium.org/396473002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283228 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

10 days agoPreserve transport errors for OpenSSL sockets.
davidben@chromium.org [Mon, 14 Jul 2014 20:43:41 +0000 (20:43 +0000)]
Preserve transport errors for OpenSSL sockets.

This makes the OpenSSL BIO pair behave like nss_memio with respect to errors,
eliminating many discrepancies between the two backends in
ssl_client_socket_unittest.cc. (While adding one as it exposes a difference in
how OpenSSL and NSS behave internally.) This also makes our fallback behavior
on TCP reset match; in NSS we take care to only fall back to TLS 1, but our
OpenSSL code falls back all the way to SSL3.

We save transport errors and install a BIO callback to return those errors
through the OpenSSL error queue when OpenSSL's SSL implementation attempts to
read or write to the transport BIO.

BUG=372849, 341178

Review URL: https://codereview.chromium.org/367963007

git-svn-id: http://src.chromium.org/svn/trunk/src/net@283013 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

10 days agonet: a couple of domains for HSTS preloading.
agl@chromium.org [Mon, 14 Jul 2014 18:11:28 +0000 (18:11 +0000)]
net: a couple of domains for HSTS preloading.

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282977 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

10 days agoAdd support for clearing the HTTP auth cache.
christiank@opera.com [Mon, 14 Jul 2014 14:23:45 +0000 (14:23 +0000)]
Add support for clearing the HTTP auth cache.

This patch adds an API so that the platform can clear the HTTP auth cache
at will. This can be useful when clearing private browsing data to prevent
cached credentials from being re-used.

BUG=63723

Review URL: https://codereview.chromium.org/351833002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282944 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 days agoReland "Separate client and server pushed streams limits."
baranovich@yandex-team.ru [Mon, 14 Jul 2014 02:21:55 +0000 (02:21 +0000)]
Reland "Separate client and server pushed streams limits."

https://codereview.chromium.org/367963003/

Fix use-after-free error

BUG=170544, 377538
R=jgraettinger@chromium.org

TEST=SpdySessionTest.PushedStreamShouldNotCountToClientConcurrencyLimit
SpdySessionTest.RejectPushedStreamExceedingConcurrencyLimit
SpdySessionTest.IgnoreReservedRemoteStreamsCount

Review URL: https://codereview.chromium.org/371273003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282889 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

11 days agoAdd GetSystemNSSKeySlot, merge GetPrivateNSSKeySlot/GetPublicNSSKeySlot to GetPersist...
mattm@chromium.org [Sun, 13 Jul 2014 07:19:00 +0000 (07:19 +0000)]
Add GetSystemNSSKeySlot, merge GetPrivateNSSKeySlot/GetPublicNSSKeySlot to GetPersistentNSSKeySlot.

GetSystemNSSKeySlot returns the ChromeOS system-wide TPM slot.

ChromeOS has separate slots for each user and linux doesn't have a public/private split, so GetPrivateNSSKeySlot no longer makes sense.

BUG=210525
TBR=stevenjb@chromium.org

Review URL: https://codereview.chromium.org/383593002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282862 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

12 days agoRemove usage of singleton software_slot_ in nss on ChromeOS
tbarzic@chromium.org [Sat, 12 Jul 2014 12:46:17 +0000 (12:46 +0000)]
Remove usage of singleton software_slot_ in nss on ChromeOS

Instead of opening primary user's public slot separately, do it like it's done
for other users: when InitializeNSSForChromeOSUser is called.

This makes primary user's public slot state not dependent on chromeos::TPMTokenLoader.

Also, with this, opening primary users public slot is not bound with enabling
TPM anymore, so the slot may get open for guest user and on Linux ChromeOS.

BUG=383663, 302062

Review URL: https://codereview.chromium.org/317613004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282817 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoMark the ParseIPLiteralToNumber function as NET_EXPORT because it's used
wtc@chromium.org [Sat, 12 Jul 2014 06:20:53 +0000 (06:20 +0000)]
Mark the ParseIPLiteralToNumber function as NET_EXPORT because it's used
by many files outside src/net.

R=eroman@chromium.org,mef@chromium.org
BUG=393387

Review URL: https://codereview.chromium.org/385943004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282808 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoPort the __SSE2__ code to Visual C++.
wtc@chromium.org [Sat, 12 Jul 2014 01:33:00 +0000 (01:33 +0000)]
Port the __SSE2__ code to Visual C++.

R=thakis@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/383543003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282773 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoPass the client certificate into OpenSSL in common code.
davidben@chromium.org [Sat, 12 Jul 2014 01:25:13 +0000 (01:25 +0000)]
Pass the client certificate into OpenSSL in common code.

The private key's the hard one, but this is a first step
and can be independent of USE_OPENSSL_CERTS.

BUG=362035

Review URL: https://codereview.chromium.org/383003002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282770 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoMake sure read/write buffer alive in TCPSocketLibevent.
byungchul@chromium.org [Sat, 12 Jul 2014 00:33:03 +0000 (00:33 +0000)]
Make sure read/write buffer alive in TCPSocketLibevent.

SocketLibevent release ref-count of read/write buffer before calling callback.
Need to hold ref-count of buffer in TCPSocketLibevent to make sure the buffer
alive in callback.

BUG=393221

Review URL: https://codereview.chromium.org/382143007

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282756 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoInsulate the legacy Android client auth code from OpenSSL ABI changes.
davidben@chromium.org [Fri, 11 Jul 2014 22:07:59 +0000 (22:07 +0000)]
Insulate the legacy Android client auth code from OpenSSL ABI changes.

The current implementation assumes the Android system OpenSSL and our copy have
compatible ABIs. This will be a problem when switching to BoringSSL which has
already changed from ABIs. Moreoever, it's already slightly off now as any
globals (error queue and locks) have different instances between the two.

Rework the code to never mix the two ABIs. We replicate the subset of OpenSSL
ABI we care about and use it to find the rsa_priv_enc implementation. This is
then mapped to Chromium OpenSSL via the custom RSA_METHOD. In addition, because
we cannot safely increase reference counts, retain references to Java wrappers
where appropriate in lieu of the C structures.

Also fix AndroidKeyStore unit tests on 4.1; they broke after an overzealous
NOTREACHED() in r278305.

BUG=389414

Review URL: https://codereview.chromium.org/365503007

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282713 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoSwitch OpenSSLClientKeyStore::ScopedEVP_PKEY to crypto::ScopedEVP_PKEY.
davidben@chromium.org [Fri, 11 Jul 2014 20:26:35 +0000 (20:26 +0000)]
Switch OpenSSLClientKeyStore::ScopedEVP_PKEY to crypto::ScopedEVP_PKEY.

BUG=none

Review URL: https://codereview.chromium.org/388683002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282684 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoRevert 282546 "Enforce SafetyMode for YouTube if prefs::kForceSa..."
kustermann@google.com [Fri, 11 Jul 2014 09:56:12 +0000 (09:56 +0000)]
Revert 282546 "Enforce SafetyMode for YouTube if prefs::kForceSa..."

Reason for revert:
[0711/004616:ERROR:unit_test_launcher.cc(360)] no test result for
SafeSearchUtilTest.ModifyYoutubePrefCookie
[ RUN      ] SafeSearchUtilTest.ModifyYoutubePrefCookie
c:\b\depot_tools\win_toolchain\vs2013_files\vc\include\xstring(79) : Assertion
failed: string iterator not dereferencable
c:\b\depot_tools\win_toolchain\vs2013_files\vc\include\xstring(80) : Assertion
failed: "Standard C++ Libraries Out of Range" && 0
[7000/7003] SafeSearchUtilTest.ModifyYoutubePrefCookie (UNKNOWN)

> Enforce SafetyMode for YouTube if prefs::kForceSafeSearch is on, by modifying (or adding) YouTube's PrefCookie in the HTTP header.
>
> This is essentially a followup to https://codereview.chromium.org/11186002/
>
> BUG=344815
>
> Review URL: https://codereview.chromium.org/354183002

TBR=treib@chromium.org

Review URL: https://codereview.chromium.org/385113003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282601 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoBreak cyclic dependency between CertDatabase and NSSCertDatabase.
pneubeck@chromium.org [Fri, 11 Jul 2014 09:28:11 +0000 (09:28 +0000)]
Break cyclic dependency between CertDatabase and NSSCertDatabase.

Before:
- CertDatabase::ObserveNSSCertDatabase(NSSCertDatabase* source) and implementation referenced NSSCertDatabase
- NSSCertDatabase() referenced CertDatabase::GetInstance()

Now:
- CertDatabase has no reference to NSSCertDatabase.
- NSSCertDatabase references CertDatabase.

BUG=NONE

Review URL: https://codereview.chromium.org/370633003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282594 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

13 days agoAdding cache hit/miss histograms to DiskBasedCertCache. There are separate
brandonsalmon@chromium.org [Fri, 11 Jul 2014 07:45:07 +0000 (07:45 +0000)]
Adding cache hit/miss histograms to DiskBasedCertCache. There are separate
histograms for the in-memory MRU cache and the disk cache.

This cl is closely related to https://codereview.chromium.org/356953003/, which implements similar histograms in the http_cache.

and a follow up to https://codereview.chromium.org/361513003/

BUG=

Review URL: https://codereview.chromium.org/378063002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282584 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoEnforce SafetyMode for YouTube if prefs::kForceSafeSearch is on, by modifying (or...
treib@chromium.org [Fri, 11 Jul 2014 04:54:42 +0000 (04:54 +0000)]
Enforce SafetyMode for YouTube if prefs::kForceSafeSearch is on, by modifying (or adding) YouTube's PrefCookie in the HTTP header.

This is essentially a followup to https://codereview.chromium.org/11186002/

BUG=344815

Review URL: https://codereview.chromium.org/354183002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282546 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoEnable QUIC version 19
jar@chromium.org [Fri, 11 Jul 2014 02:58:09 +0000 (02:58 +0000)]
Enable QUIC version 19

r=wtc

Review URL: https://codereview.chromium.org/380403002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282511 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoAdding DiskBasedCertCache to HttpCache (+UMA).
brandonsalmon@chromium.org [Thu, 10 Jul 2014 21:18:00 +0000 (21:18 +0000)]
Adding DiskBasedCertCache to HttpCache (+UMA).

Review URL: https://codereview.chromium.org/356953003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282429 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoRevert 282307 "Map WebSocket URL schemes to HTTP URL schemes for..."
kaliamoorthi@chromium.org [Thu, 10 Jul 2014 15:18:44 +0000 (15:18 +0000)]
Revert 282307 "Map WebSocket URL schemes to HTTP URL schemes for..."

> Map WebSocket URL schemes to HTTP URL schemes for auth purposes.
>
> This permits WebSocket connections to inherit credentials from HTTP pages, and
> matches the behaviour of other browsers.
>
> Design doc: https://docs.google.com/a/chromium.org/document/d/129rLtf5x3hvhP5rayLiSxnEjOXS8Z7EnLJgBL4CdwjI/edit
>
> Also consider any 401 or 407 results that reach the WebSocketStream
> URLRequest::Delegate to be unrecoverable errors.
>
> Also ensure that the response headers are reported back to the renderer
> when the developer tools are open and a 401 error happens.
>
> BUG=123862
>
> Review URL: https://codereview.chromium.org/336263005

Seems to cause WebSocket1 failure in WinXP

TBR=ricea@chromium.org

Review URL: https://codereview.chromium.org/388493002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282331 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoMove http_server_properties_manager from chrome/browser/net to net/http.
mef@chromium.org [Thu, 10 Jul 2014 12:43:47 +0000 (12:43 +0000)]
Move http_server_properties_manager from chrome/browser/net to net/http.

BUG=

Review URL: https://codereview.chromium.org/378823002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282319 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoMap WebSocket URL schemes to HTTP URL schemes for auth purposes.
ricea@chromium.org [Thu, 10 Jul 2014 11:13:47 +0000 (11:13 +0000)]
Map WebSocket URL schemes to HTTP URL schemes for auth purposes.

This permits WebSocket connections to inherit credentials from HTTP pages, and
matches the behaviour of other browsers.

Design doc: https://docs.google.com/a/chromium.org/document/d/129rLtf5x3hvhP5rayLiSxnEjOXS8Z7EnLJgBL4CdwjI/edit

Also consider any 401 or 407 results that reach the WebSocketStream
URLRequest::Delegate to be unrecoverable errors.

Also ensure that the response headers are reported back to the renderer
when the developer tools are open and a 401 error happens.

BUG=123862

Review URL: https://codereview.chromium.org/336263005

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282307 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agonet: enforce domain limitations on India CCA.
agl@chromium.org [Thu, 10 Jul 2014 07:51:46 +0000 (07:51 +0000)]
net: enforce domain limitations on India CCA.

See http://googleonlinesecurity.blogspot.com/2014/07/maintaining-digital-certificate-security.html

BUG=392251

Review URL: https://codereview.chromium.org/380033002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282276 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoSmall cleanups to ported QuicServer and dependencies
dmziegler@chromium.org [Thu, 10 Jul 2014 07:51:05 +0000 (07:51 +0000)]
Small cleanups to ported QuicServer and dependencies

Based on review comments from https://codereview.chromium.org/337093003/

BUG=

Review URL: https://codereview.chromium.org/361083002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282275 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoEliminate ScopedOpenSSL in favour of scoped_ptr<> specializations.
rsleevi@chromium.org [Thu, 10 Jul 2014 04:39:38 +0000 (04:39 +0000)]
Eliminate ScopedOpenSSL in favour of scoped_ptr<> specializations.

Match the NSS, CryptoAPI (Win) and Security (OS X) approaches by
declaring the scoped types as specializations of our existing scoped
classes.

Like NSS, this requires an intermediate helper type, because our
scoped_ptr<> doesn't accept deleter functions as template
arguments (though they are valid in C++11's unique_ptr<>). A few base
cryptographic (non-certificate) types are used in
scoped_openssl_types.h, while the remainder are left for
implementations to specialize as needed.

In an ideal world, this would be scoped_ptr<FOO, FOO_free>, but that
will require unique_ptr<> support.

BUG=388904

Review URL: https://codereview.chromium.org/361193003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282257 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoAdd an async ChannelIDSource for testing.
wtc@chromium.org [Thu, 10 Jul 2014 04:30:23 +0000 (04:30 +0000)]
Add an async ChannelIDSource for testing.

R=avd@chromium.org,rch@chromium.org
BUG=none

Review URL: https://codereview.chromium.org/380543003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282253 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoRefactor tcp socket.
byungchul@chromium.org [Wed, 9 Jul 2014 21:12:34 +0000 (21:12 +0000)]
Refactor tcp socket.

This is a pre-requisite for http server refactoring,
https://codereview.chromium.org/296053012/.

1) Introduce SocketLibevent for tcp and unix domain sockets.
2) TCPSocketLibevent utilizes SocketLibevent.
3) For backward compatibility, TCPSocketLibevent::AdoptConnectedSocket()
   allows the empty address.

BUG=371906

Review URL: https://codereview.chromium.org/348803003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@282121 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoAdd Finch experiment for selectively bypassing proxies.
rcs@chromium.org [Wed, 9 Jul 2014 05:23:54 +0000 (05:23 +0000)]
Add Finch experiment for selectively bypassing proxies.

Add option to bypass the data compression proxy if the request resource
type (as inferred by the renderer process) is not an image.

For background, see this design doc:

https://docs.google.com/a/google.com/document/d/1Kz92Fmw3lv_R-2aNvLp8jW9lkfKOZciTZtni2qQ_Adc/edit

BUG=391836

Review URL: https://codereview.chromium.org/332313003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@281951 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoFix bug in net/quic/quic_reliable_client_stream.cc found by pkastings.
rch@chromium.org [Tue, 8 Jul 2014 23:49:38 +0000 (23:49 +0000)]
Fix bug in net/quic/quic_reliable_client_stream.cc found by pkastings.
Instead of returning ERR_ABORTED, we should return 0 and Reset the stream.

Review URL: https://codereview.chromium.org/372343002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@281889 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoFixes for re-enabling more MSVC level 4 warnings: net/spdy/ edition
pkasting@chromium.org [Tue, 8 Jul 2014 23:41:04 +0000 (23:41 +0000)]
Fixes for re-enabling more MSVC level 4 warnings: net/spdy/ edition

This contains fixes for the following sorts of issues:
* Signedness mismatch
* Octal escape sequence terminated by decimal number

BUG=81439
TEST=none

Review URL: https://codereview.chromium.org/375773002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@281887 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agonet: add (*.)code-poets.co.uk to HSTS preloaded.
agl@chromium.org [Tue, 8 Jul 2014 23:33:30 +0000 (23:33 +0000)]
net: add (*.)code-poets.co.uk to HSTS preloaded.

git-svn-id: http://src.chromium.org/svn/trunk/src/net@281883 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoFixes for re-enabling more MSVC level 4 warnings: net/ edition
pkasting@chromium.org [Tue, 8 Jul 2014 23:22:43 +0000 (23:22 +0000)]
Fixes for re-enabling more MSVC level 4 warnings: net/ edition

This contains fixes for the following sorts of issues:
* Octal escape sequence terminated by decimal number
* Possibly-uninitialized local variable
* Assignment inside conditional
* Signedness mismatch

This also contains a very small number of other cleanups to nearby code.

BUG=81439
TEST=none
R=rch@chromium.org

Review URL: https://codereview.chromium.org/374033002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@281875 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoFixes for re-enabling more MSVC level 4 warnings: net/quic/ edition
pkasting@chromium.org [Tue, 8 Jul 2014 23:15:14 +0000 (23:15 +0000)]
Fixes for re-enabling more MSVC level 4 warnings: net/quic/ edition

This contains fixes for the following sorts of issues:
* Signedness mismatch
* Possibly-uninitialized local variable

This also contains one cleanup change (to remove an extra set of parens).

BUG=81439
TEST=none
R=rch@chromium.org

Review URL: https://codereview.chromium.org/371213002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@281870 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoMove logging.h's definitions of operator<< into namespace std.
jyasskin@chromium.org [Tue, 8 Jul 2014 23:03:06 +0000 (23:03 +0000)]
Move logging.h's definitions of operator<< into namespace std.

See the bug for a more detailed discussion of the problem when we don't make
this accessible through ADL.

BUG=391117

Review URL: https://codereview.chromium.org/367063006

git-svn-id: http://src.chromium.org/svn/trunk/src/net@281864 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoReenable UpdateDynamicPKPMaxAge0 test.
palmer@chromium.org [Tue, 8 Jul 2014 23:02:26 +0000 (23:02 +0000)]
Reenable UpdateDynamicPKPMaxAge0 test.

BUG=375538

Review URL: https://codereview.chromium.org/293253002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@281863 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoAdd a probability to Alternate-Protocol support. Can be enabled either via a field...
rch@chromium.org [Tue, 8 Jul 2014 23:01:00 +0000 (23:01 +0000)]
Add a probability to Alternate-Protocol support. Can be enabled either via a field trial or a command line flag.

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=281777

Review URL: https://codereview.chromium.org/339663010

git-svn-id: http://src.chromium.org/svn/trunk/src/net@281861 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agonet: block NIC certificates in source code.
agl@chromium.org [Tue, 8 Jul 2014 20:26:30 +0000 (20:26 +0000)]
net: block NIC certificates in source code.

This block is enforced by serial number in the CRLSet already. This reflects it
in the source code. See
http://googleonlinesecurity.blogspot.com/2014/07/maintaining-digital-certificate-security.html

NIC has three certificates, one from each of India CCA's three roots. The
certificates being blocked are included below:

2007:

-----BEGIN CERTIFICATE-----
MIIENjCCAx6gAwIBAgICJ4MwDQYJKoZIhvcNAQEFBQAwOjELMAkGA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GhEbGR/C2ZeFiWATwtPWKoVGwx/ksUO9YPM
zf0wh6fDIuyBJIs/nuN93+L2ib+TS5viNky+HrR3XyqE0z43W5bbzMbido3lbwgr
drMWD6hCNSZs888L0Se4rn2ei0aPmHmxjDjbExF3NF6m2uYC/wAR4cVIzMvvptFY
n+SAdG/pwkKHaMVncB/cxxEWiKzOxVpjBsM4N19lpxp2RU/n+x7xRK3WTQvNAZdU
7pcAYmZIXPu/ES9qpK4f
-----END CERTIFICATE-----

BUG=392251
R=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/372383002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@281819 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoRevert of Add a probability to Alternate-Protocol support. (https://codereview.chromi...
samuong@chromium.org [Tue, 8 Jul 2014 19:49:38 +0000 (19:49 +0000)]
Revert of Add a probability to Alternate-Protocol support. (https://codereview.chromium.org/339663010/)

Reason for revert:
causes sizes step to fail on linux x64 due to extra static initializers:

http://build.chromium.org/p/chromium/builders/Linux%20x64/builds/67438

Original issue's description:
> Add a probability to Alternate-Protocol support. Can be enabled either via a field trial or a command line flag.
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=281777

TBR=rch@chromium.org
NOTRY=true
NOTREECHECKS=true

Review URL: https://codereview.chromium.org/377063002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@281796 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoAdd a probability to Alternate-Protocol support. Can be enabled either via a field...
rch@chromium.org [Tue, 8 Jul 2014 18:59:31 +0000 (18:59 +0000)]
Add a probability to Alternate-Protocol support. Can be enabled either via a field trial or a command line flag.

Review URL: https://codereview.chromium.org/339663010

git-svn-id: http://src.chromium.org/svn/trunk/src/net@281777 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agosimplify posix MappedFile::Init and add useful logs
mostynb@opera.com [Tue, 8 Jul 2014 14:33:22 +0000 (14:33 +0000)]
simplify posix MappedFile::Init and add useful logs

This ancient CL suggested a simplication in mapped_file_posix.cc:
https://codereview.chromium.org/160288

After hitting this DCHECK on an embedded device where using a debugger
is difficult, I decided to make the suggested change and add some useful
logging while I was at it.

BUG=391937

Review URL: https://codereview.chromium.org/372113003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@281747 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoFix uninitialized member of URLRequestBuilder.
mmenke@chromium.org [Tue, 8 Jul 2014 14:00:18 +0000 (14:00 +0000)]
Fix uninitialized member of URLRequestBuilder.

This landed in revision 281638 (https://codereview.chromium.org/354693004/)

BUG=388836

Review URL: https://codereview.chromium.org/372163007

git-svn-id: http://src.chromium.org/svn/trunk/src/net@281741 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoRevert of Separate client and server pushed streams limits. (https://codereview.chrom...
machenbach@chromium.org [Tue, 8 Jul 2014 10:14:40 +0000 (10:14 +0000)]
Revert of Separate client and server pushed streams limits. (https://codereview.chromium.org/367963003/)

Reason for revert:
[Sheriff] This breaks asan:
http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Tests%20%281%29/builds/3768
http://build.chromium.org/p/chromium.memory/builders/Mac%20ASan%20Tests%20%282%29/builds/3271

Original issue's description:
> Separate client and server pushed streams limits.
> Reject push streams which exceed the limit.
>
> For now, the browser will send RST_STREAM with REFUSED_STREAM status.
> This mimics mod_spdy behavior.
>
> BUG=170544, 377538
>
> R=jgraettinger@chromium.org
>
> TEST=SpdySessionTest.PushedStreamShouldNotCountToClientConcurrencyLimit
>      SpdySessionTest.RejectPushedStreamExceedingConcurrencyLimit
>      SpdySessionTest.IgnoreReservedRemoteStreamsCount
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=281698

TBR=jgraettinger@chromium.org,baranovich@yandex-team.ru
NOTREECHECKS=true
NOTRY=true
BUG=170544, 377538

Review URL: https://codereview.chromium.org/377903002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@281705 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoSeparate client and server pushed streams limits.
baranovich@yandex-team.ru [Tue, 8 Jul 2014 08:53:55 +0000 (08:53 +0000)]
Separate client and server pushed streams limits.
Reject push streams which exceed the limit.

For now, the browser will send RST_STREAM with REFUSED_STREAM status.
This mimics mod_spdy behavior.

BUG=170544, 377538

R=jgraettinger@chromium.org

TEST=SpdySessionTest.PushedStreamShouldNotCountToClientConcurrencyLimit
     SpdySessionTest.RejectPushedStreamExceedingConcurrencyLimit
     SpdySessionTest.IgnoreReservedRemoteStreamsCount

Review URL: https://codereview.chromium.org/367963003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@281698 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoMake HTTPS SDCH dictionaries invalid to use over HTTP.
rdsmith@chromium.org [Tue, 8 Jul 2014 02:35:49 +0000 (02:35 +0000)]
Make HTTPS SDCH dictionaries invalid to use over HTTP.

BUG=None

Review URL: https://codereview.chromium.org/373893003

git-svn-id: http://src.chromium.org/svn/trunk/src/net@281639 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoSwitch to using URLRequestContextBuilder to create some contexts.
mmenke@chromium.org [Tue, 8 Jul 2014 02:33:53 +0000 (02:33 +0000)]
Switch to using URLRequestContextBuilder to create some contexts.

Also add missing functionality to URLRequestContextBuilder to fit
their needs. This is intended to simplify code to initialize the
network stack, and make it easier to refactor network stack
initialization.

BUG=388836

Review URL: https://codereview.chromium.org/354693004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@281638 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoRemove unused SyncProxyServiceHelper.
mmenke@chromium.org [Tue, 8 Jul 2014 01:45:33 +0000 (01:45 +0000)]
Remove unused SyncProxyServiceHelper.

This used to be used in webkit/test_shell's request context, about
5 years ago.  It's no longer being used by anything anymore.

BUG=none

Review URL: https://codereview.chromium.org/365743002

git-svn-id: http://src.chromium.org/svn/trunk/src/net@281624 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

2 weeks agoFragment headers payloads at smaller boundaries.
jgraettinger@chromium.org [Mon, 7 Jul 2014 21:13:56 +0000 (21:13 +0000)]
Fragment headers payloads at smaller boundaries.

BUG=345769

Review URL: https://codereview.chromium.org/370453004

git-svn-id: http://src.chromium.org/svn/trunk/src/net@281586 4ff67af0-8c30-449e-8e8b-ad334ec8d88c