chromium/src/net.git
13 hours agoRefactoring: Create per-connection packet writers in QuicDispatcher. master
wtc@chromium.org [Fri, 22 Aug 2014 01:58:06 +0000 (01:58 +0000)]
Refactoring: Create per-connection packet writers in QuicDispatcher.

To make porting the QUIC EndToEndTest to Chromium possible with fewer
Chromium-specific parts in shared code, I've made QuicDispatcher expose
and accept a QuicDispatcher::PacketWriterFactory which it uses to create
a new packet writer wrapper for every QuicConnection. I also changed
QuicConnection to accept a QuicConnection::PacketWriterFactory (a second
new type of factory) rather than the writer itself in its constructor,
since the per-connection packet writers need to be created with the
connection already existing.

Merge internal CL: 73064412

Written by Daniel Ziegler <dmziegler@chromium.org>
Original review URL: https://codereview.chromium.org/467963002/

R=rch@chromium.org,wtc@chromium.org
BUG=

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

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

14 hours agoAdd QUIC tests for chunked uploads where the FIN frame has no body data.
mmenke@chromium.org [Fri, 22 Aug 2014 00:57:25 +0000 (00:57 +0000)]
Add QUIC tests for chunked uploads where the FIN frame has no body data.

This is part of work to allow embedders to send a chunk when they do
not yet know whether it is the final chunk.

BUG=405678

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

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

14 hours agoRoll BoringSSL.
davidben@chromium.org [Fri, 22 Aug 2014 00:48:56 +0000 (00:48 +0000)]
Roll BoringSSL.

This picks up the following changes:

5213df4 Prefer AES-GCM when hardware support is available.
92909a6 Remove MS SGC support on the the server.
b52e3dd Move common code between two branches.
422d3a4 Remove some unused state and code.
fd00303 Don't scan libfoo_error.c for error codes.
a7d1363 Prune removed key types from SSL_PKEY_*.
ef2116d Remove DSA-based cipher suites and client auth.
cff6472 Mark some more globals as const.
0da0e18 Remove ECDH_RSA, ECDH_ECDSA, DH_RSA, and DH_DSS.
bd30f8e Remove support on both sides for *_fixed_(ec)dh client auth.
d0639af Remove single-DES cipher suites.
ebf42b5 Remove remnants of now-removed cipher suites.
f6faa4b Export some extra functions and values.
e7bf281 Fix (harmless) memory leak in the test harness.
389e3f0 Fix minor comment typos.
66c249c Remove some dead code.
ede973a Tidy up cipher ordering.
6bc658d Split off private_transform function in RSA.
214cd44 Export BN_num_bits_word.
e712778 Remove rsa_md5, md5, and sha1 fields from SSL_CTX.
b7725cf Include Windows.h in some source files.
8bc38f5 DTLS version negotiation doesn't happen at HelloVerifyRequest.
f2fedef Simplify HelloVerifyRequest processing.
cc23df5 Remove SSL_OP_CISCO_ANYCONNECT.
6f26001 Mark all SSL_CIPHERs as const.
fb4ea28 Tidy DTLS cookie callback types.
f450134 Remove default_timeout hook.
5216a93 Increase minimum required cmake version

BUG=405091,396787

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

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

16 hours agoAllow chunked SPDY POSTs to be terminated by an empty FIN data frame.
mmenke@chromium.org [Thu, 21 Aug 2014 22:58:03 +0000 (22:58 +0000)]
Allow chunked SPDY POSTs to be terminated by an empty FIN data frame.

This allows embedders to send a chunk when they do not yet know if it is
the final chunk or not.

BUG=405678

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

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

17 hours agoRework UMAHistogramHelper and StatisticsDeltaReader into [Chrome]HistogramTester.
mlerman@chromium.org [Thu, 21 Aug 2014 22:00:38 +0000 (22:00 +0000)]
Rework UMAHistogramHelper and StatisticsDeltaReader into [Chrome]HistogramTester.

Design Doc (Googlers Only):
https://docs.google.com/a/google.com/document/d/1RUY0BcxBppdkwFP3T8qbQmQStBRFGsLmuR4WuIXhiCA/edit

BUG=384011
TBR=timsteele@chromium.org

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

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

18 hours agoChange the lifespan of SSlConnectJobMessengers so that they are created
wtc@chromium.org [Thu, 21 Aug 2014 21:30:50 +0000 (21:30 +0000)]
Change the lifespan of SSlConnectJobMessengers so that they are created
only when needed, and deleted as soon as they are no longer necessary.

Add methods to SSLClientSocketPool that are passed to the SSLConnectJob
and SSLConnectJobMessenger as callbacks. These allow the SSLConnectJob
to tell the SSLClientSocketPool to create a messenger for the job when
appropriate, and the SSLConnectJobMessenger to tell the
SSLCLientSocketPool to remove a messenger when appropriate. An
SSLConnectJob will now only create an SSLConnectJobMessenger if its
socket's session is not already in the session cache. The messenger
will then ask to be removed when there are no remaining pending or
connecting sockets in the messenger.

Written by Mackenzie Shelley <mshelley@chromium.org>
Original review URL: https://codereview.chromium.org/384873002/

R=rsleevi@chromium.org
TBR=mek@chromium.org
BUG=398967

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

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

19 hours agoHTTP2 draft 14 support
bnc@chromium.org [Thu, 21 Aug 2014 20:17:38 +0000 (20:17 +0000)]
HTTP2 draft 14 support

This master CL lands recent SPDY changes through 73573949, extending them
with Chromium-specific updates to constants and enums, protocol negotiation
tokens, and tests.  This CL is intended to be commited but not reviewed, and is
the union of the following changes, which in turn are intended to be reviewed
but not commited.  (Most recent on top, oldest on bottom.)

Fix bug in HTTP/2 frame size limits.  This lands server change 73573949.
https://crrev.com/478903004

Update npn/alpn tokens to HTTP2-draft14.
https://crrev.com/486493003

Add kSpdyMaxControlFrameSize and kControlFrameSizeLimit constants.  This lands
server change 73427537.
https://crrev.com/486873002

Add TODO.  This lands server change 73426819.
https://crrev.com/479313002

Add an extra byte to the length field for HTTP/2 frame headers.  This lands
server change 73424406.
https://crrev.com/479303002

Change order of tests.
https://crrev.com/483863002

Remove reference set and exchange header and static table in HPACK.  This lands
server change 73299534.
https://crrev.com/480573003

Add new settings to SPDY4 for h2-14.  This lands server change 72726557.
https://crrev.com/480183002

Add kHttp2VersionString.  This lands server change 72173526.
https://crrev.com/485813002

HTTP2 draft 13: support unknown frame types and settings types as extensions.
This lands server change 70895882.
https://crrev.com/483843004

Allow unrecognized error codes as part of HTTP/2 extensions.  This lands server
change 70873693.
https://crrev.com/475043002

BUG=400336

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

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

21 hours agoRefactor HttpStreamFactoryImpl::Job::DoCreateStream() for handling WebSocket correctly
tyoshino@chromium.org [Thu, 21 Aug 2014 18:07:33 +0000 (18:07 +0000)]
Refactor HttpStreamFactoryImpl::Job::DoCreateStream() for handling WebSocket correctly

This function is long and sophisticated. Factor out the code creating
and setting |stream_| and reorganize if-clauses.

Then, this CL adds for_websockets_ checks where it's missing.

R=jgraettinger,rch
BUG=394434

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

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

23 hours agoAllow URLRequests from one context to have different NetworkDelegates.
mmenke@chromium.org [Thu, 21 Aug 2014 16:32:19 +0000 (16:32 +0000)]
Allow URLRequests from one context to have different NetworkDelegates.

This is a prerequisite to allowing a URLRequestJob to transparently wrap
a URLRequest, so AppCache can override the response for failing and
redirected requests without the NetworkDelegate or URLRequest::Delegate
being aware of the underlying request.

Also consolidate the URLRequest constructors, and make most code create
URLRequests through the URLRequestContext's CreateRequest function,
rather than through its constructor.

TBR=battre@chromium.org
BUG=161547

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

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

27 hours agoFix mapping of weak DH key and remove unused error codes.
haavardm@opera.com [Thu, 21 Aug 2014 12:07:21 +0000 (12:07 +0000)]
Fix mapping of weak DH key and remove unused error codes.

None of these error codes are actually reported back by BoringSSL.

SSL_R_WRONG_NUMBER_OF_KEY_BITS is changed to the proper
error code SSL_R_BAD_DH_P_LENGTH.

Test DH issue by loading https://demo.cmrg.net/

BUG=353579

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

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

30 hours agoparameterize http response header tests
mostynb@opera.com [Thu, 21 Aug 2014 08:51:58 +0000 (08:51 +0000)]
parameterize http response header tests

Followup to https://codereview.chromium.org/391763002 to allow this
to build on more compilers (which can fail when using structs defined
in funtions in arraysize calls- as mentioned in base/macros.h).

By refactoring to use TEST_P we can skip the manual loop entirely.

BUG=348877
TEST=net_unittests --gtest_filter=Http*

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

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

31 hours agoRemove unused UploadElement class.
mmenke@chromium.org [Thu, 21 Aug 2014 08:01:39 +0000 (08:01 +0000)]
Remove unused UploadElement class.

It used to be used to pass upload information between Blink and
the browser process, but has not been used for some time.

BUG=none

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

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

32 hours agoRevert 291007 "Set response headers for data URL."
tyoshino@chromium.org [Thu, 21 Aug 2014 07:26:18 +0000 (07:26 +0000)]
Revert 291007 "Set response headers for data URL."

> Set response headers for data URL.
>
> Resources represented by a data URL will stay being considered to be
> unique origin resource but are changed to allow cross origin access by
> the Access-Control-Allow-Origin header.
>
> We take this approach mainly because we want scripts in an iframe with
> a data URL specified to its src attribute to be executed as a script on
> a unique origin resource, not on the parent frame.
>
> We can choose to treat "loading" of data URL specially as same origin
> while execution as different origin. But such an approach complicates
> security policy checking algorithm.
>
> Grammar checking code is added to ensure we emit a valid content-type.
>
> Blink side CL https://codereview.chromium.org/54173002/ will be landed
> first to temporarily disable layout tests that will break, and then
> this CL will be landed.
>
> BUG=308768
>
> Review URL: https://codereview.chromium.org/294193002

TBR=tyoshino@chromium.org

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

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

34 hours agoAdd new histograms for tracking the reasons that QUIC sessions discard packets.
rch@chromium.org [Thu, 21 Aug 2014 05:28:20 +0000 (05:28 +0000)]
Add new histograms for tracking the reasons that QUIC sessions discard packets.

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

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

34 hours agoSet response headers for data URL.
tyoshino@chromium.org [Thu, 21 Aug 2014 04:55:27 +0000 (04:55 +0000)]
Set response headers for data URL.

Resources represented by a data URL will stay being considered to be
unique origin resource but are changed to allow cross origin access by
the Access-Control-Allow-Origin header.

We take this approach mainly because we want scripts in an iframe with
a data URL specified to its src attribute to be executed as a script on
a unique origin resource, not on the parent frame.

We can choose to treat "loading" of data URL specially as same origin
while execution as different origin. But such an approach complicates
security policy checking algorithm.

Grammar checking code is added to ensure we emit a valid content-type.

Blink side CL https://codereview.chromium.org/54173002/ will be landed
first to temporarily disable layout tests that will break, and then
this CL will be landed.

BUG=308768

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

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

35 hours agoReplace usages of MessageLoopProxy with SequencedTaskRunner in the disk cache
rsleevi@chromium.org [Thu, 21 Aug 2014 04:19:55 +0000 (04:19 +0000)]
Replace usages of MessageLoopProxy with SequencedTaskRunner in the disk cache

This replaces most places where a MessageLoopProxy is passed around in
the disk cache to instead pass a SequencedTaskRunner. As a knock-on
effect, users of the disk cache have also been updated.

BUG=391045

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

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

38 hours agoAlso declare the transport_security_state_ member as const.
wtc@chromium.org [Thu, 21 Aug 2014 01:24:51 +0000 (01:24 +0000)]
Also declare the transport_security_state_ member as const.

R=rch@chromium.org
BUG=399457

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

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

43 hours agoLanding Recent QUIC Changes.
rtenneti@chromium.org [Wed, 20 Aug 2014 19:42:44 +0000 (19:42 +0000)]
Landing Recent QUIC Changes.

Add pending_timer_transmission_count_ to QuicSentPacketManager, to
ensure that crypto and TLP packets are retransmitted even if congestion
blocked.

Seems to completely fix rare flake in b/16979022
(EndToEndTest.LargePostZeroRTTFailure\*).

Prior to this CL would fail ~6 times (out of 3000), now 0 failures.

Enabled EndToEndTest::LargePostZeroRTTFailure unittest.

Merge internal change: 73541149
https://codereview.chromium.org/487423002/

Remove FLAGS_enable_quic_pacing.

Merge internal change: 73538379
https://codereview.chromium.org/490673003/

Delete unimplemented constructor.

Merge internal change: 73532475
https://codereview.chromium.org/480563007/

Add the "Ms" suffix to the "kMaxDelayedAckTime" constant name to suggest
the time unit.

Merge internal change: 73424693
https://codereview.chromium.org/470803005/

net/tools/quic/quic_dispatcher.h use forward declarations instead of
including net/tools/quic/quic_dispatcher.h.

Merging of forward declarations CL. Deleted unused forward declaration.

Merge internal change: 73326621
https://codereview.chromium.org/472823004/

R=rch@chromium.org

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

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

2 days agoImprove testing for SDCH.
rdsmith@chromium.org [Tue, 19 Aug 2014 19:56:22 +0000 (19:56 +0000)]
Improve testing for SDCH.

Added some end-to-end browser tests, and added a bit of extra checking
for the filter.

The extra files for encoding dictionaries from sdch/open-vcdiff were
added so that the tests could create an SDCH dictionary when run.
IMO, this is more flexible for future tests and clearer to read and
maintain than just hard-coding a dictionary inline in the tests.

BUG=None
R=mef@chromium.org

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

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

2 days agonet: add HSTS for login.corp.google.com
agl@chromium.org [Tue, 19 Aug 2014 19:15:38 +0000 (19:15 +0000)]
net: add HSTS for login.corp.google.com

BUG=none
R=palmer@chromium.org

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

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

2 days agoAdd PDBs to .isolate files so that tests show stack traces.
jam@chromium.org [Tue, 19 Aug 2014 18:06:09 +0000 (18:06 +0000)]
Add PDBs to .isolate files so that tests show stack traces.

BUG=405074
R=scottmg@chromium.org
TBR=brettw, davidben

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

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

2 days agonet: a batch of manual HSTS preloads.
agl@chromium.org [Tue, 19 Aug 2014 17:24:44 +0000 (17:24 +0000)]
net: a batch of manual HSTS preloads.

This includes the removal of an entry at the request of the site. I've
confirmed that the entry didn't make it into the M38 branch.

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

3 days agoRefactor pooling logic into a helper method
rch@chromium.org [Tue, 19 Aug 2014 05:22:15 +0000 (05:22 +0000)]
Refactor pooling logic into a helper method
Disable pooling when there are cert errors.
Disable pooling when pinning does not match for the new host.

BUG=398925

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

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

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

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

3 days agoHttp Cache: Relax DCHECK to account for an entry waiting on the message loop.
rvargas@chromium.org [Tue, 19 Aug 2014 00:55:48 +0000 (00:55 +0000)]
Http Cache: Relax DCHECK to account for an entry waiting on the message loop.

HttpCache::DoomEntry has a DCHECK to verify that the ActiveEntry being doomed
looks fine. However, if the entry is being closed because the writer is done
and there are no readers, there is a small window when that DCHECK will fire,
while the task to process the pending queue goes through the message loop.

This CL accounts for that window.

BUG=404607
R=michaeln@chromium.org

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

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

3 days agoRevert 290320 "Refactor pooling logic into a helper method"
viettrungluu@chromium.org [Mon, 18 Aug 2014 22:47:00 +0000 (22:47 +0000)]
Revert 290320 "Refactor pooling logic into a helper method"

Leaks (see bug).

Actually reverting the re-land this time.

BUG=404833

> Refactor pooling logic into a helper method
> Disable pooling when there are cert errors.
> Disable pooling when pinning does not match for the new host.
>
> BUG=398925
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=289433
>
> Review URL: https://codereview.chromium.org/425803014

TBR=rch@chromium.org

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

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

3 days agoRevert 290384 "Revert 289433 "Refactor pooling logic into a help..."
viettrungluu@chromium.org [Mon, 18 Aug 2014 22:45:03 +0000 (22:45 +0000)]
Revert 290384 "Revert 289433 "Refactor pooling logic into a help..."

Oops, reverted the original land, not the re-land.

> Revert 289433 "Refactor pooling logic into a helper method"
>
> (Test-only?) leaks (see bug). The lsan suppressions file tells me to
> revert, not suppress.
>
> BUG=404833
>
> > Refactor pooling logic into a helper method
> > Disable pooling when there are cert errors.
> > Disable pooling when pinning does not match for the new host.
> >
> > BUG=398925
> >
> > Review URL: https://codereview.chromium.org/425803014
>
> TBR=rch@chromium.org
>
> Review URL: https://codereview.chromium.org/483043002

TBR=viettrungluu@chromium.org

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

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

3 days agoRevert 289433 "Refactor pooling logic into a helper method"
viettrungluu@chromium.org [Mon, 18 Aug 2014 22:40:49 +0000 (22:40 +0000)]
Revert 289433 "Refactor pooling logic into a helper method"

(Test-only?) leaks (see bug). The lsan suppressions file tells me to
revert, not suppress.

BUG=404833

> Refactor pooling logic into a helper method
> Disable pooling when there are cert errors.
> Disable pooling when pinning does not match for the new host.
>
> BUG=398925
>
> Review URL: https://codereview.chromium.org/425803014

TBR=rch@chromium.org

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

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

3 days agoUse a qualified path for grit/net_resources.h
thakis@chromium.org [Mon, 18 Aug 2014 22:36:01 +0000 (22:36 +0000)]
Use a qualified path for grit/net_resources.h

BUG=401588
R=thestig@chromium.org
TBR=darin

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

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

3 days agoEnable and fix CRLSet and remoting tests on non-Android OpenSSL.
davidben@chromium.org [Mon, 18 Aug 2014 20:02:30 +0000 (20:02 +0000)]
Enable and fix CRLSet and remoting tests on non-Android OpenSSL.

We need CRLSets to work on Mac and the remoting tests can run now that
SSLServerSocketOpenSSL is implemented.

BUG=338885

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

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

3 days agoRefactor pooling logic into a helper method
rch@chromium.org [Mon, 18 Aug 2014 19:15:58 +0000 (19:15 +0000)]
Refactor pooling logic into a helper method
Disable pooling when there are cert errors.
Disable pooling when pinning does not match for the new host.

BUG=398925

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

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

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

3 days agonet: add a batch of HSTS preload sites.
agl@chromium.org [Mon, 18 Aug 2014 18:12:53 +0000 (18:12 +0000)]
net: add a batch of HSTS preload sites.

Also remove accelerated.de by request of the site.

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

4 days ago[gcc 4.8] Explicitly initialize net_error in ProxyRetryInfo to fix build failure
vivek.vg@samsung.com [Mon, 18 Aug 2014 12:34:37 +0000 (12:34 +0000)]
[gcc 4.8] Explicitly initialize net_error in ProxyRetryInfo to fix build failure

gcc 4.8 reports build failure as net_error is not explicitly initialized. The error
thrown is as below -

net/proxy/proxy_retry_info.h: In member function
‘virtual void net::{anonymous}::ProxyListTest_DeprioritizeBadProxies_Test::TestBody()’:
net/proxy/proxy_retry_info.h:15:8: error: ‘proxy_retry_info.net::ProxyRetryInfo::net_error’
is used uninitialized in this function [-Werror=uninitialized]

R=kundaji@chromium.org, rsleevi@chromium.org

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

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

6 days agoAdd new histograms to confirm that PINGs are outstanding when a QUIC connection times...
rch@chromium.org [Sat, 16 Aug 2014 06:18:54 +0000 (06:18 +0000)]
Add new histograms to confirm that PINGs are outstanding when a QUIC connection times out with open streams.

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

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

6 days agoLand Recent QUIC Changes.
rtenneti@chromium.org [Sat, 16 Aug 2014 06:11:45 +0000 (06:11 +0000)]
Land Recent QUIC Changes.

Slight improvement to QUIC version negotation debug logging.

Merge internal change: 73319950
https://codereview.chromium.org/477813003/

Improve QUIC's SentEntropyManagerTest and removing a test from
QuicConnectionTest that tests no code in QuicConnection.

Merge internal change: 73298415
https://codereview.chromium.org/479463002/

quic_session.h doesn't need to include util/gtl/linked_hash_map.h.

Merge internal change: 73256287
https://codereview.chromium.org/477863003/

Fix comment for QUIC handshake message tag COPT.

Merge internal change: 73256108
https://codereview.chromium.org/474133002/

Not used in production. Add InRecovery() method to QUIC send algorithm
interface, and pass slow start bool to bandwidth recorder.

We still want to generate bandwidth estimates while in slow start, and
include this information in the STK proto. We also need to know when we
are in recovery mode so we can avoid calculating estimates.

Merge internal change: 73239536
https://codereview.chromium.org/479443002/

Add a flag to enable QUIC's BBR congestion control by default instead of
Cubic in order to test and gather logs on internal servers.

Merge internal change: 73146298
https://codereview.chromium.org/477863002/

Add a QuicSustainedBandwidthEstimator class. Not yet used.

Followup change list in progress (not ready for review, but in case you
want to see intended usage) which does the following:

1) Use this in the QuicSentPacketManager.
2) Detect substantial differences between subsequent sustained bandwidth
   estimates.
3) Send estimates to client in server config update.

internal change list: 72831442

Merge internal change: 73132177
https://codereview.chromium.org/477053002/

Re-add the QUIC DCHECK to ensure packets are always sent in the order of
increasing sequence number.

Merge internal change: 73128051
https://codereview.chromium.org/469383004/

Change to optimize QUIC's RetransmittableFrames::HasCryptoHandshake by
storing it once when the crypto frame is added to RetransmittableFrames.

Merge internal change: 73125935
https://codereview.chromium.org/467263003/

Add an Update method on QuicAlarm which contains a granularity.  Also
change the idle network timeout to be 1 second shorter on the client and
1 second longer on the server.

Change saves ~2% of CPU according to an EndToEndTest profile.

Merge internal change: 73125905
https://codereview.chromium.org/471313002/

R=rch@chromium.org

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

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

6 days agoAdding extension/mime mapping for HLS streams
qinmin@chromium.org [Sat, 16 Aug 2014 05:51:16 +0000 (05:51 +0000)]
Adding extension/mime mapping for HLS streams

This change adds a mapping between m3u8 extension and its mime type.
For android, we need to handle HLS streams separately later on

BUG=400145

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

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

6 days agoDisplay quic-connection-options passed in the command line in QUIC tab
rtenneti@chromium.org [Sat, 16 Aug 2014 05:49:25 +0000 (05:49 +0000)]
Display quic-connection-options passed in the command line in QUIC tab
of net-internals page. connection-options also includes enable-pacing
argument which is displayed as PACE.

Fixes the rch's comments in https://codereview.chromium.org/471613002/

R=rch@chromium.org, thestig@chromium.org

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

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

6 days agoKeep track of network error in ProxyRetryInfo.
kundaji@chromium.org [Fri, 15 Aug 2014 23:50:17 +0000 (23:50 +0000)]
Keep track of network error in ProxyRetryInfo.

Use it to log error type in BypassOneNetworkError UMA.
This fixes DataReductionProxy.BypassOnNetworkError UMA recording bug.

BUG=395769

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

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

6 days agoRevert of Move sqlite_channel_id_store from chrome/browser/net to net/extras. (patchs...
miu@chromium.org [Fri, 15 Aug 2014 23:02:30 +0000 (23:02 +0000)]
Revert of Move sqlite_channel_id_store from chrome/browser/net to net/extras. (patchset #26 of https://codereview.chromium.org/381073002/)

Reason for revert:
Closed the tree on failing net_unittests:

http://build.chromium.org/p/chromium.linux/buildstatus?builder=Linux%20Tests%20%28dbg%29%281%29&number=32912

Original issue's description:
> Move sqlite_channel_id_store from chrome/browser/net to net/extras.
> Application of special storage policy is split out into chrome/browser/net/quota_policy_channel_id_store.
>
> TEST=net_unittests --gtest_filter=SQLiteChannelIDStoreTest*
> TEST=unit_tests --gtest_filter=QuotaPolicyChannelIDStore*
>
> BUG=397545
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=289996

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

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

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

6 days agoLanding Recent QUIC Changes.
rtenneti@chromium.org [Fri, 15 Aug 2014 21:38:46 +0000 (21:38 +0000)]
Landing Recent QUIC Changes.

Change how QUIC negotiates pacing from congestion feedback to QUIC
connection option.

Merge internal change: 73061068
https://codereview.chromium.org/471613002/

Add max_bandwidth and max_bandwidth_timestamp to QUIC source address
token.

Merge internal change: 73055131
https://codereview.chromium.org/463093003/

Don't print (SCUP) in log message, the DebugString that follows contains
this already.

Merge internal change: 73054570
https://codereview.chromium.org/464893003/

Do not support Quic timestamp feedback type in the framer.

Merge internal change: 72905602
https://codereview.chromium.org/467893002/

Change QUIC's delayed ack timer from 100ms to 25ms.

Rationale: This delay kicks in when the receiver is waiting for a second
data packet before sending an ack, and 100ms seems inordinately long for
this wait. The timer fires per-packet in low-bandwidth network paths
(BW < ~384 kbps), where more frequent acks helps with (i) ack clocking,
and (ii) better bw estimation for BBR.

Merge internal change: 72788368
https://codereview.chromium.org/461183002/

QUIC - clean up changes to keep in sync with internal source tree.
https://codereview.chromium.org/454263002/

R=rch@chromium.org
TBR=thestig@chromium.org

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

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

6 days agoPlumb redirect info out of net, through content, and into child processes.
davidben@chromium.org [Fri, 15 Aug 2014 20:49:59 +0000 (20:49 +0000)]
Plumb redirect info out of net, through content, and into child processes.

This saves the logic in PluginURLFetcher and WebURLLoader that has to replicate
the method-munging, referrer-munging, and first-party-URL-munging logic that is
already done in net/.

BUG=384609

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

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

6 days agoMove sqlite_channel_id_store from chrome/browser/net to net/extras.
mef@chromium.org [Fri, 15 Aug 2014 20:21:29 +0000 (20:21 +0000)]
Move sqlite_channel_id_store from chrome/browser/net to net/extras.
Application of special storage policy is split out into chrome/browser/net/quota_policy_channel_id_store.

TEST=net_unittests --gtest_filter=SQLiteChannelIDStoreTest*
TEST=unit_tests --gtest_filter=QuotaPolicyChannelIDStore*

BUG=397545

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

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

6 days agoRename Chromium-Resource-Freshness header
ricea@chromium.org [Fri, 15 Aug 2014 19:29:07 +0000 (19:29 +0000)]
Rename Chromium-Resource-Freshness header

The "Resource-Freshness" header was temporarily named
"Chromium-Resource-Freshness" during development.

Since Chrome policy is to avoid using vendor prefixes, we should not
ship the browser to stable with this header name.

Rename the header to "Resource-Freshness".

TEST=net_unittests
BUG=348877

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

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

6 days agoMark two inner classes in net/ exported
hwennborg@google.com [Fri, 15 Aug 2014 19:27:22 +0000 (19:27 +0000)]
Mark two inner classes in net/ exported

The inner class needs to be exported in case any uses in inline methods
or vtable of the outer class causes it to potentially be referenced across
a shared library boundary.

On non-Windows, the visibility attribute is already inherited by nested
classes, but on Windows, they must be marked explicitly.

BUG=82385
R=thakis@chromium.org, willchan@chromium.org

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

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

6 days agonet: add a batch of HSTS preloads.
agl@chromium.org [Fri, 15 Aug 2014 19:00:17 +0000 (19:00 +0000)]
net: add a batch of HSTS preloads.

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

6 days agoRaise memory limit for SDCH for mobile.
rdsmith@chromium.org [Fri, 15 Aug 2014 18:26:38 +0000 (18:26 +0000)]
Raise memory limit for SDCH for mobile.

R=mef@chromium.org
BUG=374917

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

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

6 days agoRevert 289433 "Refactor pooling logic into a helper method"
rch@chromium.org [Fri, 15 Aug 2014 18:09:27 +0000 (18:09 +0000)]
Revert 289433 "Refactor pooling logic into a helper method"

Reason for revert:
Causes crashes in canary.

> Refactor pooling logic into a helper method
> Disable pooling when there are cert errors.
> Disable pooling when pinning does not match for the new host.
>
> BUG=398925
>
> Review URL: https://codereview.chromium.org/425803014

TBR=rch@chromium.org

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

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

7 days agoSupport intermediate certificates for OpenSSL client auth.
davidben@chromium.org [Fri, 15 Aug 2014 09:38:27 +0000 (09:38 +0000)]
Support intermediate certificates for OpenSSL client auth.

Change the client auth callback to the 'cert_cb' callback which leaves the
callback in charge of installing the certificate, private key, etc. This lets
us attach a certificate chain.

BUG=393323

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

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

8 days agoFix proxy action name.
sgurun@chromium.org [Thu, 14 Aug 2014 14:32:49 +0000 (14:32 +0000)]
Fix proxy action name.

BUG=398612

The value of proxy action name also changes from K to L release. Fix it.

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

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

8 days agoUse data reduction proxy when managed proxy config returns direct
bengr@chromium.org [Thu, 14 Aug 2014 11:45:54 +0000 (11:45 +0000)]
Use data reduction proxy when managed proxy config returns direct

Adds the configured data reduction proxies if any to the proxy info
for a request, if the data reduction proxy is enabled, the data
reduction proxies are not bypassed, and the proxy server returned
by the proxy info if the request is direct.

This change makes it possible for the data reduction proxy to
coexist with managed proxy configurations, instead of being
overwritten by them. The data reduction proxy may be disabled
via managed prefs if this behavior is not desired.

BUG=339237,339258

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

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

8 days agoRemove manual CRYPTO_add calls.
davidben@chromium.org [Thu, 14 Aug 2014 09:31:04 +0000 (09:31 +0000)]
Remove manual CRYPTO_add calls.

Use X509_chain_up_ref, EVP_PKEY_dup, and newly-added X509_up_ref
instead. Also RAII OpenSSLClientKeyStore.

BUG=none

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

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

8 days agoRefactor pooling logic into a helper method
rch@chromium.org [Thu, 14 Aug 2014 01:00:11 +0000 (01:00 +0000)]
Refactor pooling logic into a helper method
Disable pooling when there are cert errors.
Disable pooling when pinning does not match for the new host.

BUG=398925

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

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

8 days agoPerform dynamic pin checks even when the build is not timely.
rch@chromium.org [Wed, 13 Aug 2014 21:53:28 +0000 (21:53 +0000)]
Perform dynamic pin checks even when the build is not timely.

BUG=391032

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

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

8 days agonet: add a set of HSTS preload sites.
agl@chromium.org [Wed, 13 Aug 2014 20:53:53 +0000 (20:53 +0000)]
net: add a set of HSTS preload sites.

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

8 days agoAdded stats on why blacklisted requests were blacklisted.
rdsmith@chromium.org [Wed, 13 Aug 2014 19:10:39 +0000 (19:10 +0000)]
Added stats on why blacklisted requests were blacklisted.

BUG=None
R=jar@chromium.org

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

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

8 days agoUpdates state order of DiskBasedCertCache::WriteWorker.
brandonsalmon@chromium.org [Wed, 13 Aug 2014 19:07:51 +0000 (19:07 +0000)]
Updates state order of DiskBasedCertCache::WriteWorker.

It makes more sense to try to open the entries first rather than create them, since they will usually only not exist the first time.

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

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

8 days agoRevert 289312 "Move StringToUpperASCII and LowerCaseEqualsASCII ..."
brettw@chromium.org [Wed, 13 Aug 2014 16:48:41 +0000 (16:48 +0000)]
Revert 289312 "Move StringToUpperASCII and LowerCaseEqualsASCII ..."

> Move StringToUpperASCII and LowerCaseEqualsASCII to the base namespace
>
> Convert LowerCaseEqualsASCII to take StringPiece. In the current patch this is
> generally a NOP but will allow me to delete the other 4 variants in a followup
> (wanted to do that separately since that will require more review, since
> callsites will be changed in nontrivial ways).
>
> In some cases, LowerCaseEqualsASCII is called with a WebString, which no
> longer is implicitly converted. I added base::string16(...) around such
> calls to force the right conversion. It happened in these files:
>   window_container_type.cc
>   savable_resources.cc
>   render_view_impl.cc
>   blink_ax_tree_source.cc
>   password_form_conversion_utils.cc
>   translate_helper.cc
>   chrome_render_view_observer.cc
>   dom_serializer_browsertest.cc
>
> R=jamesr@chromium.org
>
> Review URL: https://codereview.chromium.org/448143008

TBR=brettw@chromium.org

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

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

8 days agoGetting rid of net::LOAD_ENABLE_LOAD_CONTENT.
ljagielski@opera.com [Wed, 13 Aug 2014 16:40:08 +0000 (16:40 +0000)]
Getting rid of net::LOAD_ENABLE_LOAD_CONTENT.

There are too many load flags. This one is only used by loader code.

BUG=

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

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

8 days agoMove StringToUpperASCII and LowerCaseEqualsASCII to the base namespace
brettw@chromium.org [Wed, 13 Aug 2014 16:23:25 +0000 (16:23 +0000)]
Move StringToUpperASCII and LowerCaseEqualsASCII to the base namespace

Convert LowerCaseEqualsASCII to take StringPiece. In the current patch this is
generally a NOP but will allow me to delete the other 4 variants in a followup
(wanted to do that separately since that will require more review, since
callsites will be changed in nontrivial ways).

In some cases, LowerCaseEqualsASCII is called with a WebString, which no
longer is implicitly converted. I added base::string16(...) around such
calls to force the right conversion. It happened in these files:
  window_container_type.cc
  savable_resources.cc
  render_view_impl.cc
  blink_ax_tree_source.cc
  password_form_conversion_utils.cc
  translate_helper.cc
  chrome_render_view_observer.cc
  dom_serializer_browsertest.cc

R=jamesr@chromium.org

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

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

9 days agoUpdate presubmit files to send windows tryjobs to swarming bots, now that the CQ...
jam@chromium.org [Wed, 13 Aug 2014 02:04:16 +0000 (02:04 +0000)]
Update presubmit files to send windows tryjobs to swarming bots, now that the CQ has switched over.

R=avi@chromium.org

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

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

9 days agonet: add a batch of HSTS preloads.
agl@chromium.org [Wed, 13 Aug 2014 00:44:34 +0000 (00:44 +0000)]
net: add a batch of HSTS preloads.

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

9 days agoExport URLRequestContextBuilder::SchemeFactory
hans@chromium.org [Tue, 12 Aug 2014 22:42:54 +0000 (22:42 +0000)]
Export URLRequestContextBuilder::SchemeFactory

The inner class needs to be exported in case any uses in inline methods
or vtable of the outer class causes it to potentially be referenced across
a shared library boundary.

On non-Windows, the visibility attribute is already inherited by nested
classes, but on Windows, they must be marked explicitly.

BUG=82385

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

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

9 days agonet: set a batch of HSTS preloads.
agl@chromium.org [Tue, 12 Aug 2014 20:13:14 +0000 (20:13 +0000)]
net: set a batch of HSTS preloads.

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

9 days agoUse ARRAYSIZE_UNSAFE when using types defined in a function
mostynb@opera.com [Tue, 12 Aug 2014 19:39:23 +0000 (19:39 +0000)]
Use ARRAYSIZE_UNSAFE when using types defined in a function

Small followup from https://codereview.chromium.org/423333002

This allows the test to compile on a greater range of toolchains (some
of which break when using types defined in a function with arraysize).

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

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

9 days agoGN: Make content_shell and webkit_unit_tests work in component build
jamesr@chromium.org [Tue, 12 Aug 2014 17:07:12 +0000 (17:07 +0000)]
GN: Make content_shell and webkit_unit_tests work in component build

Except for webrtc, this produces content_shell and webkit_unit_tests
binaries that link and run successfully on linux.

R=brettw@chromium.org

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

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

10 days agoRefresh Public Suffix List to the latest version
rsleevi@chromium.org [Tue, 12 Aug 2014 14:50:09 +0000 (14:50 +0000)]
Refresh Public Suffix List to the latest version

This updates to the following revision: aedf1212d667 2014-08-05 11:00 -0400

It includes changes from revision 131f3403a484 (2014-06-12 07:56 -0400) to
revision aedf1212d667 (2014-08-05 11:00 -0400), listed at
http://hg.mozilla.org/mozilla-central/log/aedf1212d667/netwerk/dns/effective_tld_names.dat

R=pkasting@chromium.org
BUG=37436

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

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

10 days agoThis CL adds unit tests for false start connections.
mshelley@chromium.org [Tue, 12 Aug 2014 14:30:38 +0000 (14:30 +0000)]
This CL adds unit tests for false start connections.

R=wtc@chromium.org,rsleevi@chromium.org,mmenke@chromium.org

BUG=398967

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

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

10 days agoMake DSCP work for UDP sockets on windows
hubbe@chromium.org [Tue, 12 Aug 2014 03:07:08 +0000 (03:07 +0000)]
Make DSCP work for UDP sockets on windows

This uses the QWAVE library to set DSCP flags on outgoing UDP packets.
QWAVE is supported on Windows Vista and later, which is why we need to
use LoadLibrary to access it.

BUG=277022

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

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

10 days agoRevert 288761 "GN: Fix up various targets in component build"
luken@chromium.org [Mon, 11 Aug 2014 19:44:54 +0000 (19:44 +0000)]
Revert 288761 "GN: Fix up various targets in component build"

> GN: Fix up various targets in component build
>
> This fixes various missing deps that show up in the component build.
>
> R=brettw@chromium.org
>
> Review URL: https://codereview.chromium.org/423023002

TBR=jamesr@chromium.org

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

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

10 days agoGN: Fix up various targets in component build
jamesr@chromium.org [Mon, 11 Aug 2014 19:28:42 +0000 (19:28 +0000)]
GN: Fix up various targets in component build

This fixes various missing deps that show up in the component build.

R=brettw@chromium.org

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

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

10 days agonet: add pinning for two more Google domains.
agl@chromium.org [Mon, 11 Aug 2014 17:15:09 +0000 (17:15 +0000)]
net: add pinning for two more Google domains.

BUG=none
R=palmer@chromium.org

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

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

11 days agoSimpleCache: Add doom event to netlog
pasko@chromium.org [Mon, 11 Aug 2014 01:16:15 +0000 (01:16 +0000)]
SimpleCache: Add doom event to netlog

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

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

12 days agoRemoved data compression UMA from ProxyService
bengr@chromium.org [Sun, 10 Aug 2014 01:21:39 +0000 (01:21 +0000)]
Removed data compression UMA from ProxyService

This change removes logic specific to the data reduction proxy
from net::ProxyService and net::ProxyServer. To do so, it introduces
a new method, net::NetworkDelegate::OnProxyFallback.

BUG=396699

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

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

13 days agoAdd pinning support to OpenSSL.
rch@chromium.org [Sat, 9 Aug 2014 14:49:17 +0000 (14:49 +0000)]
Add pinning support to OpenSSL.

BUG=391035

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

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

13 days agonet: add a couple of domain to HSTS list.
agl@chromium.org [Fri, 8 Aug 2014 22:47:10 +0000 (22:47 +0000)]
net: add a couple of domain to HSTS list.

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

13 days agoBreak labels apart in preloaded list.
agl@chromium.org [Fri, 8 Aug 2014 21:47:08 +0000 (21:47 +0000)]
Break labels apart in preloaded list.

Since the hosts are stored in DNS wire format (with length-prefixed labels),
any labels that start with a digit cause an escape like "\0071..." (that's
length=7, first byte of the label = "1"). But this causes a warning in Visual
Studio and breaks the build.

This change splits the length bytes from the labels so that this warning
doesn't happen.

BUG=none
R=palmer@chromium.org

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

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

13 days agoCentralize the logic for checking public key pins from ClientSocketNSS
rch@chromium.org [Fri, 8 Aug 2014 21:22:45 +0000 (21:22 +0000)]
Centralize the logic for checking public key pins from ClientSocketNSS
and ProofVerifierChromium to TransportSecurityState::CheckPublicKeyPins.
This required adding an is_issued_by_known_root argument to this method.

In addition, CheckPublicKeyPins now only checks static pins if the
TransportSecurityState's enable_static_pins_ member is true. This defaults
to true only for official desktop builds. This also means that dynamic
pins are now checked on mobile and on non-official builds.

BUG=398925,391033

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

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

13 days agoFix Java object leaks in net_string_util_icu_alternatives_android.cc.
mmenke@chromium.org [Fri, 8 Aug 2014 17:17:33 +0000 (17:17 +0000)]
Fix Java object leaks in net_string_util_icu_alternatives_android.cc.

BUG=401769

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

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

2 weeks agoEscape non-ASCII response headers.
ellyjones@chromium.org [Fri, 8 Aug 2014 14:37:16 +0000 (14:37 +0000)]
Escape non-ASCII response headers.

Response headers that are not valid UTF-8 can't be stored in a
base::StringValue, which is always a UTF-8 string, so escape any non-ASCII
values to be safe. This prevents a DCHECK when dev tools' network request
inspector is open and we receive these headers.

BUG=299880

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

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

2 weeks agoLand Recent QUIC Changes.
rtenneti@chromium.org [Fri, 8 Aug 2014 11:13:49 +0000 (11:13 +0000)]
Land Recent QUIC Changes.

A fix to QUIC's test only SendAlgorithmSimulator to ensure it treats
lost packets correctly.

Merge internal change: 72754445
https://codereview.chromium.org/450043002/

Check return value of GetStringPiece for (optional) kCCRT/kCCS in
QuicCryptoServerConfig.

Merge internal change: 72727018
https://codereview.chromium.org/453693002/

Store client cert hashes as strings instead of StringPieces.

Avoids use-after-free (detected by ASAN) when the CHLO callback deletes
the CHLO request, and subsequently we try to access the stored
StringPieces.

Bug introduced in CL: https://codereview.chromium.org/449273002/

Merge internal change: 72724874
https://codereview.chromium.org/453663002/

Deprecate rolled out flag: FLAGS_quic_allow_port_migration.

Merge internal change: 72668120
https://codereview.chromium.org/451903002/

Along with sending the SCUP message, this CL includes small fixes which
allow messages to be sent on the crypto stream after handshake has
completed. This includes disabling HANDSHAKE_MODE in the sent packet
manager after the handshake is confirmed, and stopping processing of
handshake packets once we switch to forward secure and can no longer
decrypt them in crypto_test_utils.

Without a version bump, out of date clients will tear down the
connection if they get a SCUP message from the server.

QUIC_VERSION_22. Send a new source-address token when crypto handshake
completes.

Merge internal change: 72652054
https://codereview.chromium.org/449273002/

Trigger internal QUIC "trace graph" trace dumping also in cases where
connection termination is initiated by the server. Protected by existing
debug flag.

This CL adds a new OnConnectionClosed method to the
ConnectionDebugVisitor interface, which is called when the connection is
closed irrespective of how the connection is closed.

Merge internal change: 72571464
https://codereview.chromium.org/454563002/

Close a QUIC connection if there are too many unfinished streams being
tracked in the locally closed map. Protected behind
FLAGS_close_quic_connection_unfinished_streams (defaults to false).

Merge internal change: 72561976
https://codereview.chromium.org/448973002/

Remove unused version argument from QuicFramerTest's
GetMinStreamFrameSize.

Merge internal change: 72559549
https://codereview.chromium.org/447103002/

Fix typo in comment in QuicFramer. creation_time_ is the creation time
of the framer, not the frames.

Comment only change.

Merge internal change: 72558804
https://codereview.chromium.org/444323002/

Deprecate rolled out FLAGS_enable_quic_connection_flow_control_2.

Merge internal change: 72345333
https://codereview.chromium.org/444313002/

R=rch@chromium.org

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

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

2 weeks agoWire 'blink::Platform::isHostnameReservedIPAddress()' to 'net::IsReservedIPAddress()'.
mkwst@chromium.org [Fri, 8 Aug 2014 11:04:37 +0000 (11:04 +0000)]
Wire 'blink::Platform::isHostnameReservedIPAddress()' to 'net::IsReservedIPAddress()'.

This is a fairly straightforward patch which wires up the Blink platform
API over to the network stack.

BUG=378566

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

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

2 weeks agoThis CL is a follow up to https://codereview.chromium.org/416683002/.
mshelley@chromium.org [Fri, 8 Aug 2014 09:39:26 +0000 (09:39 +0000)]
This CL is a follow up to https://codereview.chromium.org/416683002/.

It updates several comments and renames member variables to increase clarity and
better match the style guide.

R=wtc@chromium.org

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

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

2 weeks agoThis CL is a follow up to https://codereview.chromium.org/353713005.
mshelley@chromium.org [Fri, 8 Aug 2014 09:29:57 +0000 (09:29 +0000)]
This CL is a follow up to https://codereview.chromium.org/353713005.

It removes the transport connect states from MockSSLCLientSocket Connect()
and renames some member variables for clarity.

R=wtc@chromium.org,rsleevi@chromium.org

BUG=398967

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

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

2 weeks agoSupports DevTools socket access authentication based on Android permissions.
serya@chromium.org [Fri, 8 Aug 2014 09:17:41 +0000 (09:17 +0000)]
Supports DevTools socket access authentication based on Android permissions.

BUG=399567

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

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

2 weeks agoLand Recent QUIC Changes.
rtenneti@chromium.org [Fri, 8 Aug 2014 08:10:18 +0000 (08:10 +0000)]
Land Recent QUIC Changes.

QUIC: don't keep around state for streams created by a request
w/no body. Waiting for a stream frame w/ FIN that will never arrive, and
the closed stream map grows without bound.  Not flag protected.

Merge internal change: 72338396
https://codereview.chromium.org/447093002/

Default socket receive buffer to 256K bytes and remove unnecessary
CongestionFeedbackFrames from tests.

Merge internal change: 72338299
https://codereview.chromium.org/447083002/

Include the socket receive buffer in the connection handshake.
PRESENCE_OPTIONAL

The goal is to eventually remove the TcpCongestionFeedbackFrame.
Currently this sends the same value for every packet. All it contains is
the tcp_receive_window (now called socket_receive_buffer) which is fixed
at 256000. So it can be sent in the connection establishment and then
never retransmitted.

Because only one type of CongestionFeedbackFrame can be sent with an
ack, this frees up space for a TimestampFrame which is the motivation
for removing the TcpCongestionFeedbackFrame.

Merge internal change: 72334240
https://codereview.chromium.org/446283002/

Improve QUIC's SendAlgorithmSimulator to allow setting the delayed ack
timer and add a new test of a second BBR flow starting after a first
flow has stabilized.

Merge internal change: 72332690
https://codereview.chromium.org/449713002/

QUIC congestion option that forces ICWND to 10.  Not flag protected.

Merge internal change: 72323017
https://codereview.chromium.org/446253002/

Allow receiving a QUIC CongestionFeedbackFrame that is not kTCP.

Currently the only congestion feedback frames that are sent are TCP, but
I want to send timestamp packets in the next version, so the send
algorithms should not assume that the incoming congestion feedback frame
is kTCP.

Merge internal change: 72322097
https://codereview.chromium.org/443313002/

QUIC - minor cleanup to match internal source tree.

* Formatting cleanup and .get() != NULL changes.

Merge internal change: 72204223
https://codereview.chromium.org/447973004/

Bring back InterArrivalReceiver and rename it to TimestampeReceiver.
This is not in production.

Merge internal change: 72170964
https://codereview.chromium.org/449693002/

Move Quic AppendTimestampFrame method out of AppendCongestionFrame.
Also, remove obsolete TODO's and rename InterArrival to Timestamp.
Not used in production.

Merge internal change: 72148809
https://codereview.chromium.org/446063005/

R=rch@chromium.org

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

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

2 weeks agoMove file_util_icu to base::i18n namespace
brettw@chromium.org [Thu, 7 Aug 2014 23:59:15 +0000 (23:59 +0000)]
Move file_util_icu to base::i18n namespace

TBR=sky

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

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

2 weeks agoMove the rest of test_file_util to base namespace.
brettw@chromium.org [Thu, 7 Aug 2014 22:57:11 +0000 (22:57 +0000)]
Move the rest of test_file_util to base namespace.

R=rvargas@chromium.org

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

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

2 weeks agoRemove obsolete comment.
ricea@chromium.org [Thu, 7 Aug 2014 22:51:16 +0000 (22:51 +0000)]
Remove obsolete comment.

url_request_http_job.cc contains a TODO comment for WebSocket
throttling. Since this was landed in
https://codereview.chromium.org/240873003 the comment is no longer
needed. Remove it.

BUG=343107
TEST=net_unittests

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

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

2 weeks agoFix crash when trying to connect to an IPv6 IP via a SOCKS4 proxy.
mmenke@chromium.org [Thu, 7 Aug 2014 21:33:48 +0000 (21:33 +0000)]
Fix crash when trying to connect to an IPv6 IP via a SOCKS4 proxy.

The socks client socket correctly requests the HostResolver only
give it IPv4 addresses, but the HostResolver ignored that flag when
passed IPs directly.  This fixes that behavior.

BUG=379031

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

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

2 weeks agoReturn ERR_NOT_IMPLEMENTED when we reach SPDY stream creation code in a factory for...
tyoshino@chromium.org [Thu, 7 Aug 2014 19:44:30 +0000 (19:44 +0000)]
Return ERR_NOT_IMPLEMENTED when we reach SPDY stream creation code in a factory for WebSocket

BUG=394434

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

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

2 weeks agoMove StringToLowerASCII to base namespace
brettw@chromium.org [Thu, 7 Aug 2014 16:55:42 +0000 (16:55 +0000)]
Move StringToLowerASCII to base namespace

TBR=sky

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

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

2 weeks agoRemove wstring file path helpers from test_file_util.
brettw@chromium.org [Thu, 7 Aug 2014 16:53:01 +0000 (16:53 +0000)]
Remove wstring file path helpers from test_file_util.

These were only used by one test file, so I moved the implementation there. I
considered updating the test, but the way the test uses wstrings seems
reasonable.

R=rvargas@chromium.org, rvargas

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

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

2 weeks agoRemove redundant mapping of net errors to strings.
mmenke@chromium.org [Thu, 7 Aug 2014 16:12:06 +0000 (16:12 +0000)]
Remove redundant mapping of net errors to strings.

The new list does not have the leading "net::ERR_", to slightly reduce
the size of net when compiled.  This reduces the size of libcronet.so
by about 8k, with symbols stripped.

Also add a function to get network error strings without the leading,
"net::" as a number of consumers were removing it with duplicated code.

This CL slight breaks NetLog loading functionality - loading old logs
in new versions  will result in error codes missing the leading "ERR_",
and the other direction results in error codes having an extra leading
"ERR_".

BUG=399025

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

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

2 weeks agoUpdate manually triggered try jobs to use swarming for ChromeOS and Mac since they...
jam@chromium.org [Thu, 7 Aug 2014 15:43:24 +0000 (15:43 +0000)]
Update manually triggered try jobs to use swarming for ChromeOS and Mac since they're switched by CQ already.

TBR=ben

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

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

2 weeks agoThis CL corrects a bug in which the OnHandshakeComplete callback for an ssl session...
mshelley@chromium.org [Thu, 7 Aug 2014 10:07:22 +0000 (10:07 +0000)]
This CL corrects a bug in which the OnHandshakeComplete callback for an ssl session was never
called if that session had an empty session id (i.e. the session wasn't added to the cache).

This CL sets the OpenSSL info_callback such that CheckIfSessionAdded will be run whenever
an OpenSSL session has finished its handshake. Previously, CheckIfSessionAdded was called in
NewSessionCallbackStatic. NewSessionCallbackStatic is only called when a session is
added to the cache. Thus, leading connections with sessions that were not added to the cache would
force their pending jobs to wait indefinitely instead of letting the jobs proceed at the completion
of the leading job's connection.

R=mmenke@chromium.org,rsleevi@chromium.org,wtc@chromium.org, davidben@chromium.org

BUG=398967

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

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

2 weeks agoAdd fake headers to URLRequestRedirectJobs.
mmenke@chromium.org [Wed, 6 Aug 2014 23:44:56 +0000 (23:44 +0000)]
Add fake headers to URLRequestRedirectJobs.

Plugin logic expects redirects to have headers, and gets very confused
when they're missing.

BUG=345160

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

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

2 weeks agoQUIC - Added Net.QuicClientHelloServerConfig.InvalidDuration histogram
rtenneti@chromium.org [Wed, 6 Aug 2014 23:32:02 +0000 (23:32 +0000)]
QUIC - Added Net.QuicClientHelloServerConfig.InvalidDuration histogram
to track server config expiration from 1 minute to 30 days.

Minor cleanup of names and description of server config expiry
and use of inchoate ClientHello.

Fixed wtc's comments for CL:
  https://codereview.chromium.org/413363005/

R=jar@chromium.org

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

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

2 weeks agoRevert 284806 "Disable two recent Channel ID-related CLs to inve..."
wtc@chromium.org [Wed, 6 Aug 2014 21:28:19 +0000 (21:28 +0000)]
Revert 284806 "Disable two recent Channel ID-related CLs to inve..."

The cause of the secure QUIC performance degradation has been
identified and fixed in r286400.

> 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

R=rch@chromium.org
BUG=396185

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

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

2 weeks agoEnable QUIC_VERSION_21.
rch@chromium.org [Wed, 6 Aug 2014 17:33:29 +0000 (17:33 +0000)]
Enable QUIC_VERSION_21.

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

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

2 weeks agoMove construction of flow_controller_ to QuicSession constructor to avoid streams...
rjshade@chromium.org [Wed, 6 Aug 2014 06:12:24 +0000 (06:12 +0000)]
Move construction of flow_controller_ to QuicSession constructor to avoid streams being initialized with a NULL ptr.
BUG=

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

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

2 weeks agoHandle multiple simultanous wss: connections.
ricea@chromium.org [Tue, 5 Aug 2014 16:31:24 +0000 (16:31 +0000)]
Handle multiple simultanous wss: connections.

Previously, multiple simultaneous wss: connections to the same endpoint
did not work because the endpoint lock was not correctly released at the
end of the handshake.

This happened because the socket was wrapped for SSL and so the original socket
address that was passed to RememberSocket() was not the same one passed to
UnlockSocket().

Make releasing of the lock on successful handshake happen using the address
provided by GetPeerAddress() instead of the RememberSocket()
mechanism. This will not work if the socket has already been closed;
however, in that case the socket should be rapidly returned to the pool
anyway at which point UnlockSocket() will be called as normal.

Also add a browser test for multiple simultaneous wss: connections
(WebSocketBrowserTest.SSLConnectionLimit).

BUG=398737
TEST=net_unittests, browser_tests

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

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