chromium/src/net.git
9 hours agonet: Fix compilation errors in net_util.cc master
tfarina@chromium.org [Wed, 16 Apr 2014 06:39:56 +0000 (06:39 +0000)]
net: Fix compilation errors in net_util.cc

../../net/base/net_util.cc:615:16: error: use of undeclared identifier
'gethostname'; did you mean 'gethostbyname2'?
  int result = gethostname(buffer, sizeof(buffer));
                 ^~~~~~~~~~~
                            gethostbyname2
/usr/include/netdb.h:156:24: note: 'gethostbyname2' declared here
extern struct hostent *gethostbyname2 (__const char *__name, int __af);
^

I think this might have started after
https://codereview.chromium.org/220253002/ - which touched net_util.cc
recently.

BUG=None
TEST=projects links again
R=eroman@chromium.org
NOTRY=true

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

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

12 hours agoAdd yhirano@chromium.org and ricea@chromium.org to OWNERS of net/websockets
tyoshino@chromium.org [Wed, 16 Apr 2014 04:25:32 +0000 (04:25 +0000)]
Add yhirano@chromium.org and ricea@chromium.org to OWNERS of net/websockets

I think they meet the criteria listed here.
http://dev.chromium.org/developers/owners-files

Also remove people who are no longer actively working on
this component for now.

BUG=none
R=ricea@chromium.org, yhirano@chromium.org

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

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

12 hours agoRemove inactive developers from net/socket_stream/OWNERS for now
tyoshino@chromium.org [Wed, 16 Apr 2014 04:22:12 +0000 (04:22 +0000)]
Remove inactive developers from net/socket_stream/OWNERS for now

BUG=none
R=yhirano@chromium.org

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

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

14 hours agoRemove net_log.h from net_util, as it's no longer needed by net_log.h.
mmenke@chromium.org [Wed, 16 Apr 2014 01:54:21 +0000 (01:54 +0000)]
Remove net_log.h from net_util, as it's no longer needed by net_log.h.

Also fix a large number of other files that were depending on this
include.

BUG=none
TBR=gene@chromium.org, sky@chromium.org

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

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

17 hours agoReplace '\0' with "%00" for logging in HostPortPair::HostForURL.
mef@chromium.org [Tue, 15 Apr 2014 23:24:21 +0000 (23:24 +0000)]
Replace '\0' with "%00" for logging in HostPortPair::HostForURL.

BUG=359823

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

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

18 hours agoRefactor HttpStreamParser to move state transition logic out of its DoLoop.
mmenke@chromium.org [Tue, 15 Apr 2014 22:13:17 +0000 (22:13 +0000)]
Refactor HttpStreamParser to move state transition logic out of its DoLoop.

This is how most other network objects result, and makes for cleaner
code.  This is done in preparation to implement trying to read from
sockets after connection resets on uploads (See bug).

BUG=357631

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

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

19 hours agoLand Recent QUIC Changes
rtenneti@chromium.org [Tue, 15 Apr 2014 21:06:49 +0000 (21:06 +0000)]
Land Recent QUIC Changes

Add reordering statistics and min_rtt to QuicConnectionStats.

Merge internal change: 64582035
https://codereview.chromium.org/231733008/

Add a slowstart packets lost stat to allow QUIC to track how many
packets are lost when exiting slowstart.

Merge internal change: 64548567
https://codereview.chromium.org/231833004/

Added hooks to QUIC time wait list manager so that internal server
specific code could be separated.

Merge internal change: 64500752
https://codereview.chromium.org/231863006/

Cleanup changes found while merging the privacy mode changes into
the internal source tree.

Merge internal change: 64377731
https://codereview.chromium.org/232433002/

Add test-only MakeAckFrame method to quic_test_utils, and remove the
test-only QuicAckFrame constructor which was not using the 2nd argument.

Used MakeAckFrame method in chrome specific code also.

Merge internal change: 64373111
https://codereview.chromium.org/231863005/

Set the send and receive buffers for the QuicClient and QuicServer to
the default receive window for QUIC's TCP Sender.

QUIC cleanup to create SetSendBufferSize and SetReceiveBufferSize in
QuicSocketUtils.

Merge internal change: 6435807864380825
https://codereview.chromium.org/232243003/

Added writer() helper method to QuicConnection.
Made CreateQuicConnection of QuicDispatcher a virtual method and added
helper methods for helper, writer and initial_flow_control_window_bytes.

Merge internal change: 64357422
https://codereview.chromium.org/232013005/

When multiple streams have pending writes in QUICSession, bundle them
into as few packets as possible rather.

Previously the header stream and the body stream were always written in
separate packets.

Fixed chrome specific unit tests to accept extra ack frame.

Merge internal change: 64304809
https://codereview.chromium.org/232013005/

QUIC refactor to use the congestion window directly when calculating the
packet sequence number length, instead of calculating the window
indirectly.

Merge internal change: 64295053
https://codereview.chromium.org/232003003/

Refactor to isolate the PRR logic from the rest of TCPCubicSender.

Merge internal change: 64210335
https://codereview.chromium.org/232173002/

R=rch@chromium.org

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

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

20 hours agoRevert 263948 "HttpServer: allows sending raw response data for ..."
fischman@chromium.org [Tue, 15 Apr 2014 19:39:03 +0000 (19:39 +0000)]
Revert 263948 "HttpServer: allows sending raw response data for ..."

Reason for revert: broke http://build.chromium.org/p/chromium.memory/builders/Mac%20ASan%2064%20Tests%20%282%29/builds/647/

> HttpServer: allows sending raw response data for nontypical responses.
>
> BUG=347770
> R=rsleevi@chromium.org,lcwu@chromium.org,byungchul@chromium.org
>
> Review URL: https://codereview.chromium.org/212683006

TBR=gunsch@chromium.org

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

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

21 hours agoImplement net in GN build.
brettw@chromium.org [Tue, 15 Apr 2014 19:26:44 +0000 (19:26 +0000)]
Implement net in GN build.

This does the net target. I started doing some more that are commented out at the bottom, and there are a few more after that do do. The deps of these targets started to build up to an unreasonable level and this should be a good checkpoint.

Fix grit rule.

Fix SSL dependent configs

Add TLD cleanup

Add gconf and gio targets for Linux.

Add sources filtering for ChromeOS, .rc, and .mm files. Remove built-in code that removes .rc and .mm files (this wasn't quite complete so causes problems).

BUG=
R=scottmg@chromium.org

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

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

21 hours agoMove broken alternate protocol expiration logic from QuicStreamFactory
rch@chromium.org [Tue, 15 Apr 2014 19:10:38 +0000 (19:10 +0000)]
Move broken alternate protocol expiration logic from QuicStreamFactory
to HttpServerPropertiesImpl.

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

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

21 hours agoHttpServer: allows sending raw response data for nontypical responses.
gunsch@chromium.org [Tue, 15 Apr 2014 18:48:33 +0000 (18:48 +0000)]
HttpServer: allows sending raw response data for nontypical responses.

BUG=347770
R=rsleevi@chromium.org,lcwu@chromium.org,byungchul@chromium.org

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

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

25 hours agoOnly allow certain files in net to depend on icu.
mmenke@chromium.org [Tue, 15 Apr 2014 14:48:31 +0000 (14:48 +0000)]
Only allow certain files in net to depend on icu.
Also split out functions that depend on icu from net_util.cc.

This is a first step in allowing net/ to be build without icu,
using platform functions instead, to get binary site down when
used as a library on mobile.

BUG=362608
R=mef@chromium.org

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

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

31 hours agoSync PRESUBMIT files with latest CQ changes
phajdan.jr@chromium.org [Tue, 15 Apr 2014 09:32:43 +0000 (09:32 +0000)]
Sync PRESUBMIT files with latest CQ changes

BUG=none
R=maruel@chromium.org

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

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

41 hours agoAdd SSL support to the GN build
brettw@chromium.org [Mon, 14 Apr 2014 23:25:13 +0000 (23:25 +0000)]
Add SSL support to the GN build

This moves files from the secondary tree to the main one, and renames the "meta" one to //crypto:ssl. It also adds the crypto unit tests.

R=rsleevi@chromium.org

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

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

43 hours agoMoved data reduction proxy chrome code to component
bengr@chromium.org [Mon, 14 Apr 2014 21:23:42 +0000 (21:23 +0000)]
Moved data reduction proxy chrome code to component

Platform-inspecific code was moved from
chrome/browser/net/spdyproxy to components/data_reduction_proxy.
Names that include variations on SpdyProxyAuth have been changed to
DataReductionProxy.

Significant changes include: (1) InitChromeProxySettings now
takes |PrefService|s and a URLRequestContextGetter. (2)
All switches and prefs have been moved to
components/data_reduction_proxy/common.
(3) data_reduction_proxy_settings_unittest.[cc,h] was split into
itself and data_reduction_proxy_settings_test_util.[cc,h]. (4) proxy
configuration via prefs is embedded.

BUG=359340

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

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

45 hours agoRevert 259370 "Mark tests in NetworkChangeNotifierWinTest as flaky."
pauljensen@chromium.org [Mon, 14 Apr 2014 18:53:41 +0000 (18:53 +0000)]
Revert 259370 "Mark tests in NetworkChangeNotifierWinTest as flaky."
The flake was fixed in r262496.

> Mark tests in NetworkChangeNotifierWinTest as flaky.
>
> BUG=356401
> TBR=mmenke@chromium.org
>
> Review URL: https://codereview.chromium.org/211543004

BUG=356401
R=mmenke@chromium.org
TEST=net_unittests --gtest_filter=NetworkChangeNotifierWinTest.NetChangeWin*

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

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

46 hours agoUpdate SPDY4/HTTP2 identifiers/flags/NPN tokens.
jgraettinger@chromium.org [Mon, 14 Apr 2014 17:50:46 +0000 (17:50 +0000)]
Update SPDY4/HTTP2 identifiers/flags/NPN tokens.

SPDY4 will not be a separate specification. It has instead become an
alias for the upcoming HTTP/2 standard. The next differentiated SPDY
protocol will be SPDY/5.

Chromium will primarily refer to HTTP/2 as 'SPDY4', purely because it is
more consistent naming in the context of Chromium's codebase. This CL removes
the separate 'HTTP2Draft04' protocol identifer, and renames 'SPDY4a2' to
simply 'SPDY4'. Flags are similarly updated.

The SPDY4 NPN token has been changed to 'h2-11', which is the next
interop HTTP/2 draft which Chromium will target.

BUG=345769

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

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

2 days agonet: add a batch of HSTS preload entries.
agl@chromium.org [Mon, 14 Apr 2014 16:09:28 +0000 (16:09 +0000)]
net: add a batch of HSTS preload entries.

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

2 days agoStop using VLOG() in WebSocketChannel.
ricea@chromium.org [Mon, 14 Apr 2014 06:22:25 +0000 (06:22 +0000)]
Stop using VLOG() in WebSocketChannel.

Use DVLOG() instead so that the messages are not included in release builds.

BUG=
TEST=net_unittests

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

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

2 days agoAdd experiment to measure time to hash extension content as we read it
asargent@chromium.org [Mon, 14 Apr 2014 00:43:23 +0000 (00:43 +0000)]
Add experiment to measure time to hash extension content as we read it

This required adding 2 new methods to URLRequestFileJob to let
subclasses get notified when seeks and reads complete, so that our
URLRequestExtensionJob class is able to compute the hash of the content
read and know what bytes from the file those correspond to (e.g. if there
was a Range specified and we didn't read all the bytes).

BUG=360909

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

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

3 days agoRevert 263348 "Add False Start tests"
zhaoqin@google.com [Sat, 12 Apr 2014 20:44:39 +0000 (20:44 +0000)]
Revert 263348 "Add False Start tests"
BUG=362920
TBR=davidben@chromium.org

> Add False Start tests
>
> Tests both that False Start occurs when it should and doesn't
> when it shouldn't.
>
> BUG=354132
>
> Review URL: https://codereview.chromium.org/208293002

TBR=davidben@chromium.org

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

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

4 days agoMove the larger blocks of net sources into net.gypi.
brettw@chromium.org [Sat, 12 Apr 2014 05:18:55 +0000 (05:18 +0000)]
Move the larger blocks of net sources into net.gypi.

This will allow the main file lists to be shared with the GN build.

BUG=

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

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

4 days agoMove all remaining appcache unittests from webkit/ to content/
pilgrim@chromium.org [Sat, 12 Apr 2014 05:10:24 +0000 (05:10 +0000)]
Move all remaining appcache unittests from webkit/ to content/

BUG=338338
TBR=darin@chromium.org

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

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

4 days agoRemove MapSystemErrorWithDefault.
wtc@chromium.org [Sat, 12 Apr 2014 03:15:14 +0000 (03:15 +0000)]
Remove MapSystemErrorWithDefault.

On the "Mac 10.6 Tests (dbg)(4)" bot, gcm_unit_test did not emit the
"OS Error was not set meaningfully" warning message, so there is no
evidence that setsockopt doesn't set errno on failure.

R=jar@chromium.org
BUG=355222

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

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

4 days agoAdd a histogram Net.AlternateProtocolBrokenLocation
rch@chromium.org [Fri, 11 Apr 2014 23:00:28 +0000 (23:00 +0000)]
Add a histogram Net.AlternateProtocolBrokenLocation
for tracking where SetBrokenAlternateProtocol is called, in practice.

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

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

4 days agoAdd False Start tests
davidben@chromium.org [Fri, 11 Apr 2014 20:49:33 +0000 (20:49 +0000)]
Add False Start tests

Tests both that False Start occurs when it should and doesn't
when it shouldn't.

BUG=354132

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

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

4 days agoAdd a new Net.AlternateProtocolUsage for tracking usage of Alternate-Protocol.
rch@chromium.org [Fri, 11 Apr 2014 18:51:39 +0000 (18:51 +0000)]
Add a new Net.AlternateProtocolUsage for tracking usage of Alternate-Protocol.

BUG=

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

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

4 days agoChange the base of the QUIC duplicate stream frame histograms from
rch@chromium.org [Fri, 11 Apr 2014 18:42:06 +0000 (18:42 +0000)]
Change the base of the QUIC duplicate stream frame histograms from
per 100 to per 1000.

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

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

5 days agoAdd DHE_RSA support to tlslite.
davidben@chromium.org [Fri, 11 Apr 2014 07:20:26 +0000 (07:20 +0000)]
Add DHE_RSA support to tlslite.

Needed for our test server to be able to False Start.

BUG=354132

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

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

5 days agoChange ssl_padding_xtn to the IANA-assigned value 21.
wtc@chromium.org [Fri, 11 Apr 2014 07:19:00 +0000 (07:19 +0000)]
Change ssl_padding_xtn to the IANA-assigned value 21.

R=agl@chromium.org,davidben@chromium.org,rsleevi@chromium.org
BUG=361311

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

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

5 days agoCompile src/net for PNaCl
sergeyu@chromium.org [Thu, 10 Apr 2014 20:31:37 +0000 (20:31 +0000)]
Compile src/net for PNaCl

The new net_nacl target builds net code for PNaCl. It will be used for
remoting client, and so it excludes parts that are not used in the
remoting, e.g. net/disk_cache, net/proxy, net/spdy, net/quic.

BUG=276739

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

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

5 days agonet: add (*.)googletagservices.com for Google pins.
agl@chromium.org [Thu, 10 Apr 2014 18:25:57 +0000 (18:25 +0000)]
net: add (*.)googletagservices.com for Google pins.

BUG=362144

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

5 days agoUpdate tlslite to 0.4.6.
davidben@chromium.org [Thu, 10 Apr 2014 17:56:44 +0000 (17:56 +0000)]
Update tlslite to 0.4.6.

This lets us get drop many of our patches. It also adds NPN support for free.
On the downside, it introduces a handful of new bugs that need additional
patches.

BUG=115301

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

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

6 days agonet: two additions to the HSTS preloaded list.
agl@chromium.org [Thu, 10 Apr 2014 16:21:56 +0000 (16:21 +0000)]
net: two additions to the HSTS preloaded list.

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

6 days agonet/ compile fixes for for chromeos use_openssl=1 build.
mattm@chromium.org [Thu, 10 Apr 2014 05:10:58 +0000 (05:10 +0000)]
net/ compile fixes for for chromeos use_openssl=1 build.

BUG=338888

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

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

6 days agoMove cronet from //net into //components.
mef@chromium.org [Thu, 10 Apr 2014 00:27:42 +0000 (00:27 +0000)]
Move cronet from //net into //components.

BUG=354143

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

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

6 days agoDefined a enum for network interface types and added a field to
mallinath@chromium.org [Wed, 9 Apr 2014 23:19:18 +0000 (23:19 +0000)]
Defined a enum for network interface types and added a field to
net::NetworkInterface.

This CL doesn't attempt to find network interface type, all are initialized
to UNKNOWN type. Subsequence CL's will have platform specific code
which will gather network interface type information.

BUG=
R=agl@chromium.org
TBR=gene@chromium.org, justinlin@chromium.org

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

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

6 days agoAdd Net.CertVerifier_First_Job_Latency metric.
davidben@chromium.org [Wed, 9 Apr 2014 21:13:43 +0000 (21:13 +0000)]
Add Net.CertVerifier_First_Job_Latency metric.

Specifically counts only the first CertVerifer job in order to capture any
initialization costs.

BUG=361166

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

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

6 days agonet: add a batch of HSTS preload entries.
agl@chromium.org [Wed, 9 Apr 2014 20:06:46 +0000 (20:06 +0000)]
net: add a batch of HSTS preload entries.

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

6 days agonet: Remove unused FileStream methods
hashimoto@chromium.org [Wed, 9 Apr 2014 17:28:56 +0000 (17:28 +0000)]
net: Remove unused FileStream methods

Remove synchronous FileStream methods (OpenSync, CloseSync, SeekSync, Available, ReadSync, ReadUntilComplete, WriteSync, Truncate, FlushSync).
Remove EnableErrrorStatistics() and SetBoundNetLogSource() whose only user was download::BaseFile.
Remove FileStream::Context::async_ because we are always async.

BUG=356979
TEST=git cl try

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

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

6 days agoSave net internals event log into a file using UrlRequestContext methods startNetLogT...
mef@chromium.org [Wed, 9 Apr 2014 16:57:25 +0000 (16:57 +0000)]
Save net internals event log into a file using UrlRequestContext methods startNetLogToFile and stopNetLog.

Initialize and get net statistics using UrlRequestContext methods InitializeStatistics and GetStatisticsJSON.

BUG=354143

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

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

7 days agomake SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of...
jar@chromium.org [Wed, 9 Apr 2014 12:21:15 +0000 (12:21 +0000)]
make SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of bools)

Previously committed as https://src.chromium.org/viewvc/chrome?view=rev&revision=261966 but then reverted when it broke the Mac 10.6 build.

TBR=sergeyu,yzshen,yurys,zea
R=wtc
BUG=355222

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

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

7 days agonet: yet more pinning debugging.
agl@chromium.org [Wed, 9 Apr 2014 12:13:38 +0000 (12:13 +0000)]
net: yet more pinning debugging.

The last round was delayed while the dev channel was releasing from the M35
branch rather than trunk. However, it didn't turn up anything.

This change seeks to try and figure out exactly which test is failing in the
pinning checks since the pins appear to be fine. I'm wondering whether
the domain state is getting altered by malware rather than the static pins
themselves.

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

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

7 days agoAdd net/base/filename_util.h.
sergeyu@chromium.org [Wed, 9 Apr 2014 04:05:28 +0000 (04:05 +0000)]
Add net/base/filename_util.h.

Moved some filename-related functions from net_util.h to the new
filename_util.h .

BUG=276739
R=piman@chromium.org, rsleevi@chromium.org
TBR=kalman@chromium.org, piman@chromium.org, sky@chromium.org

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

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

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

7 days agoMove mock_appcache_policy and some unit tests from webkit/ to content/
pilgrim@chromium.org [Wed, 9 Apr 2014 00:00:23 +0000 (00:00 +0000)]
Move mock_appcache_policy and some unit tests from webkit/ to content/

BUG=338338
TBR=darin@chromium.org

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

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

7 days agoMake net use v8 through gin
jochen@chromium.org [Tue, 8 Apr 2014 23:58:15 +0000 (23:58 +0000)]
Make net use v8 through gin

- no longer try to use the default isolate (we want to remove it from v8)
- add the option to gin to manage an isolate in non-strict mode

BUG=359977
R=eroman@chromium.org,abarth@chromium.org

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

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

7 days agoNotifyObserversOfIPAddressChange on iOS when device is switched to Airplane mode.
mef@chromium.org [Tue, 8 Apr 2014 23:23:14 +0000 (23:23 +0000)]
NotifyObserversOfIPAddressChange on iOS when device is switched to Airplane mode.

BUG=356907

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

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

7 days agoRemove known root detection logic on Android.
davidben@chromium.org [Tue, 8 Apr 2014 22:18:56 +0000 (22:18 +0000)]
Remove known root detection logic on Android.

The implementation has a high startup overhead. Remove it for now and default
the value to false; this disables the intranet name detector since we cannot
distinguish private CAs from public ones.

BUG=361166

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

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

7 days agoRevert 262487 "Add net/base/filename_util.h."
sergeyu@chromium.org [Tue, 8 Apr 2014 20:35:10 +0000 (20:35 +0000)]
Revert 262487 "Add net/base/filename_util.h."

> Add net/base/filename_util.h.
>
> Moved some filename-related functions from net_util.h to the new
> filename_util.h .
>
> BUG=276739
> R=piman@chromium.org, rsleevi@chromium.org
> TBR=kalman@chromium.org, piman@chromium.org, sky@chromium.org
>
> Review URL: https://codereview.chromium.org/220253002

TBR=sergeyu@chromium.org

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

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

7 days agoDelay starting NetworkChangeNotifierWin's DNS configuration-watching
pauljensen@chromium.org [Tue, 8 Apr 2014 20:10:42 +0000 (20:10 +0000)]
Delay starting NetworkChangeNotifierWin's DNS configuration-watching
thread until WatchForAddressChangeInternal() for two reasons:
1. We shouldn't be doing work like this in the constructor.
2. This places more stress on the racy uses of g_network_change_notifier
   which may be leading to crashes during unit-testing when we quickly
   setup and then shutdown the NetworkChangeNotifierWin.  The unit-tests
   mock out WatchForAddressChangeInternal().  We don't want the
   unit-tests watching for real address changes.

BUG=356401

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

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

7 days agoAdd net/base/filename_util.h.
sergeyu@chromium.org [Tue, 8 Apr 2014 19:55:01 +0000 (19:55 +0000)]
Add net/base/filename_util.h.

Moved some filename-related functions from net_util.h to the new
filename_util.h .

BUG=276739
R=piman@chromium.org, rsleevi@chromium.org
TBR=kalman@chromium.org, piman@chromium.org, sky@chromium.org

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

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

8 days agoFix: canPlayType() gives false positive for */ogg and audio/x-wav
amogh.bihani@samsung.com [Tue, 8 Apr 2014 11:44:05 +0000 (11:44 +0000)]
Fix: canPlayType() gives false positive for */ogg and audio/x-wav

Adding the following mime types and their codecs in format_codec_mappings[].
This will prevent the browser from giving wrong result for "canPlayType()" query
for these mime types:

audio/ogg
video/ogg
application/ogg
audio/x-wav

Adding unit test for checking StrictMediaMimeType() method

BUG=53193

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

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

8 days agoAdd new histogram Net.QuicSession.DuplicateStreamFramePercent
rch@chromium.org [Tue, 8 Apr 2014 04:52:01 +0000 (04:52 +0000)]
Add new histogram Net.QuicSession.DuplicateStreamFramePercent
for reporting the number of duplicate QUIC stream frames
received.

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

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

8 days agoRemove all uses of GG_LONGLONG and GG_ULONGLONG.
viettrungluu@chromium.org [Tue, 8 Apr 2014 04:00:36 +0000 (04:00 +0000)]
Remove all uses of GG_LONGLONG and GG_ULONGLONG.

123LL and 123ULL now work everywhere. You can also use INT64_C and
UINT64_C (from <stdint.h>) in Chromium code (we force-define
__STDC_CONSTANT_MACROS). (And sometimes you can just use
static_cast<(u)int64_t>.)

Don't remove their definitions yet, because some macros that are
multiply-defined (in an identical way) rely on them. D'oh.

R=brettw@chromium.org
TBR=sky@chromium.org,satorux@chromium.org,vrk@chromium.org,rch@chromium.org,shess@chromium.org

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

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

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

8 days agoMore attempts to fix the crash in QuicConnection::CanWrite.
rch@chromium.org [Mon, 7 Apr 2014 20:34:07 +0000 (20:34 +0000)]
More attempts to fix the crash in QuicConnection::CanWrite.

BUG=354669

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

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

8 days agoFix -Wunused-local-typedefs errors with GCC 4.7+
fdegans@chromium.org [Mon, 7 Apr 2014 19:07:31 +0000 (19:07 +0000)]
Fix -Wunused-local-typedefs errors with GCC 4.7+

BUG=321833

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

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

8 days agoRevert 262147 "Remove all uses of GG_LONGLONG and GG_ULONGLONG."
scottmg@chromium.org [Mon, 7 Apr 2014 18:35:10 +0000 (18:35 +0000)]
Revert 262147 "Remove all uses of GG_LONGLONG and GG_ULONGLONG."

> Remove all uses of GG_LONGLONG and GG_ULONGLONG.
>
> 123LL and 123ULL now work everywhere. You can also use INT64_C and
> UINT64_C (from <stdint.h>) in Chromium code (we force-define
> __STDC_CONSTANT_MACROS). (And sometimes you can just use
> static_cast<(u)int64_t>.)
>
> Don't remove their definitions yet, because some macros that are
> multiply-defined (in an identical way) rely on them. D'oh.
>
> R=brettw@chromium.org
> TBR=sky@chromium.org,satorux@chromium.org,vrk@chromium.org,rch@chromium.org,shess@chromium.org
>
> Review URL: https://codereview.chromium.org/218953003

TBR=viettrungluu@chromium.org

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

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

8 days agoRemove all uses of GG_LONGLONG and GG_ULONGLONG.
viettrungluu@chromium.org [Mon, 7 Apr 2014 17:35:10 +0000 (17:35 +0000)]
Remove all uses of GG_LONGLONG and GG_ULONGLONG.

123LL and 123ULL now work everywhere. You can also use INT64_C and
UINT64_C (from <stdint.h>) in Chromium code (we force-define
__STDC_CONSTANT_MACROS). (And sometimes you can just use
static_cast<(u)int64_t>.)

Don't remove their definitions yet, because some macros that are
multiply-defined (in an identical way) rely on them. D'oh.

R=brettw@chromium.org
TBR=sky@chromium.org,satorux@chromium.org,vrk@chromium.org,rch@chromium.org,shess@chromium.org

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

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

9 days agosimple cache: testing: AddDelay() between evictable entry sets
pasko@chromium.org [Mon, 7 Apr 2014 02:38:00 +0000 (02:38 +0000)]
simple cache: testing: AddDelay() between evictable entry sets

We switched to very coarse-grained timestamps in the backend. This requires
adding synthetic delays in tests to make different timestamps for different
subsets of entries. We added one delay in the test, but forgot about the other.

This change separates the last two entries from the rest with a delay. With the
delay the current eviction algorithm (i.e. sort by timestamp, evict down to the
low watermark), should not evict these two last entries.

BUG=234776
TBR=gavinp@chromium.org

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

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

10 days agoPost SpdyProxyClientSocket write callbacks.
jgraettinger@chromium.org [Sun, 6 Apr 2014 16:27:15 +0000 (16:27 +0000)]
Post SpdyProxyClientSocket write callbacks.

Callbacks are observed to have deeply nested chains, which occasionally
violate the write callback assumption SpdyStream makes of it's delegates
(namely, that |this| isn't closed).

Post callbacks to allow the callstack to unwind.

BUG=355511

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

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

10 days agoSPDY4/HTTP2 header handling: :version & :authority
jgraettinger@chromium.org [Sun, 6 Apr 2014 16:26:39 +0000 (16:26 +0000)]
SPDY4/HTTP2 header handling: :version & :authority

:version is not a meaningful header for HTTP2, and shouldn't be carried.
The :host header has also been renamed :authority, but is semantically
equivalent. This CL updates spdy_http_utils.cc to accomodate SPDY4 handling
of these headers.

The :version header is extensively baked into unit tests, as is :host to
a lesser degree. Update those tests which require it, incrementally
shifting towards using SPDY intermediate representations to synthesize
frame fixtures.

BUG=345769

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

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

10 days agoRevert of Attempting to resolve a race condition with PowerMonitor (https://coderevie...
scottmg@chromium.org [Sat, 5 Apr 2014 18:55:57 +0000 (18:55 +0000)]
Revert of Attempting to resolve a race condition with PowerMonitor (https://codereview.chromium.org/179923006/)

Reason for revert:
Failing interactive_ui_tests dbg:

http://build.chromium.org/p/chromium.win/builders/Interactive%20Tests%20(dbg)/builds/47083/steps/interactive_ui_tests/logs/stdio

Original issue's description:
> Attempting to resolve a race condition with PowerMonitor.
>
> ThreadSanitizer caught multiple instances where PowerMonitor::Get or PowerMonitor::Add/RemoveObserver were being called concurrently with the PowerMonitor constructor in the main thread. These functions access a process-global PowerMontior instance (g_power_monitor), which was not thread safe.
>
> This change adds locks around PowerMonitor creation and deletion, and forces Add/RemoveObserver to be called in a threadsafe manner. It also removes the need to call PowerMonitor::Get.
>
> BUG=268924
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=262018

TBR=mattm@chromium.org,jyasskin@chromium.org,kbr@chromium.org,bradnelson@chromium.org,brettw@chromium.org,bradchen@chromium.org,willchan@chromium.org,jam@chromium.org,jochen@chromium.org,timurrrr@chromium.org,glider@chromium.org,acolwell@chromium.org,scherkus@chromium.org,bajones@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=268924

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

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

10 days agoAttempting to resolve a race condition with PowerMonitor.
bajones@chromium.org [Sat, 5 Apr 2014 17:28:39 +0000 (17:28 +0000)]
Attempting to resolve a race condition with PowerMonitor.

ThreadSanitizer caught multiple instances where PowerMonitor::Get or PowerMonitor::Add/RemoveObserver were being called concurrently with the PowerMonitor constructor in the main thread. These functions access a process-global PowerMontior instance (g_power_monitor), which was not thread safe.

This change adds locks around PowerMonitor creation and deletion, and forces Add/RemoveObserver to be called in a threadsafe manner. It also removes the need to call PowerMonitor::Get.

BUG=268924

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

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

11 days agoRevert 261966 "make SetReceiveBufferSize and SetSendBufferSize r..."
jschuh@chromium.org [Sat, 5 Apr 2014 13:11:54 +0000 (13:11 +0000)]
Revert 261966 "make SetReceiveBufferSize and SetSendBufferSize r..."

Appears to have broken the following gcm_unit_tests on Mac:

DeviceCredentials
AckOnLogin
AckWhenLimitReachedWithHeartbeat
ExpiredTTLOnRestart
InitializeExisting
SendMessageRMQAckOnReconnect
SendMessageRMQOnRestart
SendMessageRMQPartialAckOnReconnect
SendMessageRMQWithStreamAck

http://build.chromium.org/p/chromium.mac/builders/Mac%2010.6%20Tests%20%28dbg%29%284%29/builds/39860

> make SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of bools)
>
> TBR=sergeyu,yzshen
> R=wtc
> BUG=355222
>
> Review URL: https://codereview.chromium.org/217573002

TBR=jar@chromium.org

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

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

11 days agomake SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of...
jar@chromium.org [Sat, 5 Apr 2014 03:52:22 +0000 (03:52 +0000)]
make SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of bools)

TBR=sergeyu,yzshen
R=wtc
BUG=355222

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

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

11 days agoGet rid of all component builds specific .isolate.
maruel@chromium.org [Fri, 4 Apr 2014 21:06:46 +0000 (21:06 +0000)]
Get rid of all component builds specific .isolate.

The status quo was unmaintainable.  These 'component build specific .isolate
files' are superseeded by tools/isolate_driver.py which packages dynamic
libraries automatically.

The new way is much more sane and dynamic, isolate_driver.py is currently very
crude but 'does the job', the expected way to make it work is to read the .ninja
files to extract all the dynamic libraries marked as a dependency to the main
target being executed.

TBR=csharp@chromium.org
BUG=333473

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

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

11 days agoTest only change to restore an expectation that no packets are lost by
rtenneti@chromium.org [Fri, 4 Apr 2014 20:59:56 +0000 (20:59 +0000)]
Test only change to restore an expectation that no packets are lost by
QUIC when packet loss is set to 0.

Merge internal change: 64075611

Set the send and receive buffers for the QuicClient and
QuicServer to the default receive window for QUIC's TCP
Sender.

R=rch@chromium.org

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

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

11 days agoUse jni_generators to generate UrlRequest_jni.h and UrlRequestContext_jni.h.
mef@chromium.org [Fri, 4 Apr 2014 18:54:14 +0000 (18:54 +0000)]
Use jni_generators to generate UrlRequest_jni.h and UrlRequestContext_jni.h.
Explicitly pass native peer object pointer to jni calls.
Use java_cpp_template to generate UrlRequestError and UrlRequestPriority constants shared between C++ and Java code.

BUG=354143

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

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

12 days agoUpdate QuicClientSession::GetSSLInfo to report QUIC as the protocol
wtc@chromium.org [Fri, 4 Apr 2014 16:18:35 +0000 (16:18 +0000)]
Update QuicClientSession::GetSSLInfo to report QUIC as the protocol
version and handle the new AEAD algorithm kCC12 (ChaCha20).

Fix a bug that kAESG (AES-GCM) was reported as 256 bits. QUIC uses
128-bit AES keys.

MockCryptoClientStream::CryptoConnect needs to mock the negotiated
aead parameter.

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

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

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

12 days agoAdd Net.WebSocket.HandshakeResult UMA entry to the new WebSocket impl.
yhirano@chromium.org [Fri, 4 Apr 2014 16:18:04 +0000 (16:18 +0000)]
Add Net.WebSocket.HandshakeResult UMA entry to the new WebSocket impl.

BUG=359926
R=ricea@chromium.org

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

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

12 days agoRemoved unused forward declarations.
wtc@chromium.org [Fri, 4 Apr 2014 13:49:41 +0000 (13:49 +0000)]
Removed unused forward declarations.

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

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

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

12 days agoTest for WebSocketJob being deleted on the stack
ricea@chromium.org [Fri, 4 Apr 2014 08:30:55 +0000 (08:30 +0000)]
Test for WebSocketJob being deleted on the stack

SocketStreamDispatcherHost can delete the WebSocketJob while it is still
on the stack. Add tests to ensure that WebSocketJob does not attempt to
access its own members after being deleted.

Also fix two cases where WebSocketJob attempted to access its members after
being deleted.

BUG=358038
TEST=net_unittests --gtest_filter=WebSocketJobDeleteTest*

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

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

12 days agoAdd a wrapper script which modifies the .isolate on the fly.
maruel@chromium.org [Fri, 4 Apr 2014 03:44:03 +0000 (03:44 +0000)]
Add a wrapper script which modifies the .isolate on the fly.

This tool will ultimately process the .ninja files, in the meantime it archives
all the DLLs. It's cheezy but this will unblock the component build short term.
This is very crude but this will get folks going. This means once it's done, we
can remove all the .isolate representing the dynamic libraries.

Remove swarming_client/ as a dependency in the .isolate files, it's not needed
anymore.

R=vadimsh@chromium.org
BUG=333473

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

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

12 days agoLand Recent QUIC Changes
rtenneti@chromium.org [Fri, 4 Apr 2014 00:43:59 +0000 (00:43 +0000)]
Land Recent QUIC Changes

Set the delayed ack timer to 0ms intstead of 100ms for crypto handshake
packets.

This both provides a more accurate RTT estimate early on in a connection
and gives the server confidence the handshake has completed and it's
safe to increase the CWND further.

Merge internal change: 64134758
https://codereview.chromium.org/221373005/

Making framer capable of handling stream frame headers in packets
correctly when using FEC. Stream frame length is always written, even
for the last stream frame with FEC, to avoid boundary condition and
padding issues in the framer.

These changes are working towards getting FEC up and running correctly.

Merge internal change: 64080142
https://codereview.chromium.org/212223011/

Change to QUIC's TLP timer to set it based on the last pending packet,
even when that packet has no retransmittable frames.

Merge internal change: 64059923
https://codereview.chromium.org/220163008/

QUIC - cleanup changes fixed while sync'ing with internal source tree.

https://codereview.chromium.org/212523003/

R=rch@chromium.org

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

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

12 days agoNet: Remove CreatePlatformFile from the disk cache.
rvargas@chromium.org [Thu, 3 Apr 2014 22:44:09 +0000 (22:44 +0000)]
Net: Remove CreatePlatformFile from the disk cache.

BUG=322664

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

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

12 days agoRemove PlatformFile from resource_loader_unittest
rvargas@chromium.org [Thu, 3 Apr 2014 18:33:58 +0000 (18:33 +0000)]
Remove PlatformFile from resource_loader_unittest

BUG=322664

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

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

12 days agoSync various changes to QuicTestClient.
rch@chromium.org [Thu, 3 Apr 2014 18:32:05 +0000 (18:32 +0000)]
Sync various changes to QuicTestClient.

R=rtennet@chromium.org
BUG=

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

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

13 days agoDo not copy reference fragments for overridden redirects.
rob@robwu.nl [Thu, 3 Apr 2014 15:36:14 +0000 (15:36 +0000)]
Do not copy reference fragments for overridden redirects.

If a network delegates sets a redirect URL (in BeforeRequest or HeadersReceived), then it should get full
control over the target URL.
In particular, data:-URIs should remain unchanged because Chrome does not interpret # as a delimiter for reference fragments.

BUG=354653
TEST=net_unittests:
URLRequestTestHTTP.RedirectWithReferenceFragment:URLRequestTestHTTP.RedirectJobWithReferenceFragment (tests new behavior)
URLRequestTestHTTP.RedirectWithReferenceFragmentAndUnrelatedUnsafeUrl:URLRequestTestHTTP.Redirect302PreserveReferenceFragment (regression test)

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

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

13 days agonet: add (*.)passwordbox.com to HSTS preloaded.
agl@chromium.org [Thu, 3 Apr 2014 15:03:10 +0000 (15:03 +0000)]
net: add (*.)passwordbox.com to HSTS preloaded.

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

13 days agoVarious cleanups in crypto code discovered while syncing recent changes.
rch@chromium.org [Thu, 3 Apr 2014 08:02:01 +0000 (08:02 +0000)]
Various cleanups in crypto code discovered while syncing recent changes.

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

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

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

13 days agonet: fix regression exluding file_posix from iOS
rvargas@chromium.org [Thu, 3 Apr 2014 07:15:44 +0000 (07:15 +0000)]
net: fix regression exluding file_posix from iOS

r254474 regressed removing file_posix.cc from the disk cache for iOS.
This CL corrects the file path.

BUG=330074
R=huey@chromium.org

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

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

2 weeks agoBackout SpdySettingsID implicit renumbering.
jgraettinger@chromium.org [Wed, 2 Apr 2014 01:21:36 +0000 (01:21 +0000)]
Backout SpdySettingsID implicit renumbering.

Renumbering was introduced in https://codereview.chromium.org/202383002/
SpdyConstants (added in that CL) is now responsible for mapping settings
to protocol-specific wire values. SpdySettingsIds was absolved of
responsibility for capturing wire settings ID's, and the removal of
explicit enum values was cosmetic.

However it's interacting poorly with settings persistence, which is caching
setting ID's keyed on the enumeration values. So back it out.

BUG=358677

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

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

2 weeks agoRevert of Various cleanups in crypto code discovered while syncing recent changes...
rlarocque@chromium.org [Wed, 2 Apr 2014 01:17:35 +0000 (01:17 +0000)]
Revert of Various cleanups in crypto code discovered while syncing recent changes. (https://codereview.chromium.org/217653003/)

Reason for revert:
Seems to be related to a tree-closing failure.

http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%2BLSan%20Tests%20%281%29/builds/984

See bug for more details.

BUG=358919

Original issue's description:
> Various cleanups in crypto code discovered while syncing recent changes.
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=260979

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

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

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

2 weeks agoMore "fixes" for the QUIC crash bug.
rch@chromium.org [Wed, 2 Apr 2014 00:24:41 +0000 (00:24 +0000)]
More "fixes" for the QUIC crash bug.

BUG=336459

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

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

2 weeks agoVarious cleanups in crypto code discovered while syncing recent changes.
rch@chromium.org [Tue, 1 Apr 2014 23:16:39 +0000 (23:16 +0000)]
Various cleanups in crypto code discovered while syncing recent changes.

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

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

2 weeks agoFor WebRTC select IPv6 address which has least valid lifetime. This is
mallinath@chromium.org [Tue, 1 Apr 2014 21:24:08 +0000 (21:24 +0000)]
For WebRTC select IPv6 address which has least valid lifetime. This is
to make sure we don't expose a permanent IPv6 address which has infinite
valid lifetime.

This code change belongs to Windows specific platform.

R=agl@chromium.org

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

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

2 weeks agoInclude subdomains for AppEngine preloaded HSTS/pinning.
palmer@chromium.org [Tue, 1 Apr 2014 19:15:33 +0000 (19:15 +0000)]
Include subdomains for AppEngine preloaded HSTS/pinning.

BUG=358571
R=agl@chromium.org

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

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

2 weeks agoAdd ChunkedWritableByteChannelTest to CronetSampleTest.
mef@chromium.org [Tue, 1 Apr 2014 18:13:47 +0000 (18:13 +0000)]
Add ChunkedWritableByteChannelTest to CronetSampleTest.

BUG=354143

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

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

2 weeks agoMove appcache_interceptor from webkit/ to content/
pilgrim@chromium.org [Tue, 1 Apr 2014 16:08:03 +0000 (16:08 +0000)]
Move appcache_interceptor from webkit/ to content/

BUG=338338
TBR=darin@chromium.org

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

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

2 weeks agoMove Preload() code to MappedFile
bratell@opera.com [Tue, 1 Apr 2014 11:37:14 +0000 (11:37 +0000)]
Move Preload() code to MappedFile

To heat up the file system caches we load the disk cache index
into RAM when starting the browser. To make it more obvious
what we're doing, move that to a method named Preload().

BUG=None
R=rvargas@chromium.org

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

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

2 weeks agoLand Recent QUIC Changes.
rtenneti@chromium.org [Tue, 1 Apr 2014 09:15:37 +0000 (09:15 +0000)]
Land Recent QUIC Changes.

Refactor hybrid slow start in QUIC to create a simpler interface between
it an TCPCubicSender.

In preparation for BBR.
Merge internal change: 64031462
https://codereview.chromium.org/218993002/

Don't log decryption errors in AeadBaseDecrypter::Decrypt.

Instead, have QuicFramer::DecryptPayload log a warning message if both
trial decryptions fail.

Merge internal change: 63977728
https://codereview.chromium.org/218983002/

QUIC refactor to remove a return value which was always true.

Merge internal change: 63977684
https://codereview.chromium.org/218913003/

Simplify the bytes_consumed computation
in QuicPacketCreator::CreateStreamFrame. Does not change behavior.

Merge internal change: 63900899
https://codereview.chromium.org/218873003/

Fixing a broken test for quic.  cr/63542972 added the proxy flag on
outbound packets.  Unfortunately, this broke our tests using the magic
header. This CL provides hooks for clearing that bit of data.

Adding a virtual function to quic client so we can fix a test.

Merge internal change: 63898585
https://codereview.chromium.org/218963003/

+ Use QuicServerKey tuple (host, port, is_https) instead of
  server_hostname, while creating QuicClientSession,
  QuicCryptoClientStream, QuicCryptoClientConfig, QuicClient,
  QuicTestClient, etc objects.

+ QuicServerKey is used as the key to access QUIC server
  config information from all caches.

+ Added couple of new unit tests for HostPortPair class.

+ Added unit tests for QuicServerId for privacy mode
  combination with host, port, is_https.

Merge internal change: 63891842
https://codereview.chromium.org/218923002/

R=rch@chromium.org

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

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

2 weeks agoTemplatize IntResultCookieCallback and BoolResultCookieCallback
tyoshino@chromium.org [Tue, 1 Apr 2014 08:46:44 +0000 (08:46 +0000)]
Templatize IntResultCookieCallback and BoolResultCookieCallback

StringResultCookieCallback is left un-merged since introducing
a template class with const-ref tweaking is overkilling and rather
complicating.

This change was suggested in
https://codereview.chromium.org/15380003#msg2

BUG=none

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

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

2 weeks agoFix race-conditions during NetworkChangeNotifier shutdown by
pauljensen@chromium.org [Tue, 1 Apr 2014 01:44:43 +0000 (01:44 +0000)]
Fix race-conditions during NetworkChangeNotifier shutdown by
properly shutting down HistogramWatcher and
NetworkChangeCalculator. Observers must be unregistered to
avoid use-after-free's when an event is posted to a deleted
object. Unregistering observers must take place on the same
thread the observer was registered on to have any effect.
NetworkChangeNotifier observers must be unregistered prior
to calling ~NetworkChangeNotifier() so
g_network_change_notifier is non-NULL.

BUG=357320

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

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

2 weeks agoRename PrivateMode enum values:
rch@chromium.org [Tue, 1 Apr 2014 01:28:53 +0000 (01:28 +0000)]
Rename PrivateMode enum values:

kPrivacyModeDisabled => PRIVACY_MODE_DISABLED
kPrivacyModeEnabled  => PRIVACY_MODE_ENABLED

To match the chromium style guide:

Though the Google C++ Style Guide now says to use kConstantNaming for enums,
Chromium was written using MACRO_STYLE naming.  Continue to use this style for consistency.

R=mef@chromium.org

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

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

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

2 weeks agoLand Recent QUIC Changes.
rtenneti@chromium.org [Mon, 31 Mar 2014 23:17:14 +0000 (23:17 +0000)]
Land Recent QUIC Changes.

Add a QUIC flag to enable time based loss detection as the default.

Merge internal change: 63942432
(this CL was merged in https://codereview.chromium.org/217133004/
added  FLAGS_quic_use_time_loss_detection to quic_flags.cc
and made the change to quic_connection.cc also).

Now that we have a default send window, no need to send WINDOW_UPDATE to
ensure streams are not flow control blocked

Merge internal change: 63887815
https://codereview.chromium.org/217003005/

Changing the max stream delta to allow for all open streams in a given
direction.  Previously, we allowed 100 streams (200 even/odd stream ids)
but an insufficient delta of 100.

Allowing a slightly larger stream delta for QUIC.

Merge internal change: 63880428
https://codereview.chromium.org/212063006/

UDP proxy session for QUIC. This is not production ready. Major issues
include the sharding issue and the time wait list.

Merge internal change: 63878878
https://codereview.chromium.org/216943004/

Don't try and close a QUIC connection twice while processing a single
incoming packet.

Merge internal change: 63878490
https://codereview.chromium.org/217053004/

Added missing OVERRIDE.

Add the ability to negotiate the QUIC loss detection algorithm in the
crypto handshake.

Added FLAGS_quic_congestion_control_inter_arrival and
FLAGS_quic_use_time_loss_detection. They default to false.

Merge internal change: 63874474
https://codereview.chromium.org/217133004/

Send BLOCKED frame directly from ReliableQuicStream.

Merge internal change: 63808643
https://codereview.chromium.org/216423006/

Simplified ReliableQuicStream::IsFlowControlBlocked.

Merge internal change: 63807857
https://codereview.chromium.org/217103003/

Track the sent_time for ack packets so the RTT is updated when ack
packets are acked as the largest observed.

Merge internal change: 63806273
https://codereview.chromium.org/216423005/

R=rch@chromium.org

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

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

2 weeks agoHttpAuthCache: add eviction histograms.
ttuttle@chromium.org [Mon, 31 Mar 2014 22:46:24 +0000 (22:46 +0000)]
HttpAuthCache: add eviction histograms.

Add histograms to measure how often realms and paths are evicted from
the HTTP auth cache, along with the time since creation and last use
for evicted realms.

BUG=354187
TEST=HttpAuthCacheTest.* in net_unittests still passes

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

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

2 weeks agoAvoid calling any Windows networking functions during unit-testing.
pauljensen@chromium.org [Mon, 31 Mar 2014 21:48:54 +0000 (21:48 +0000)]
Avoid calling any Windows networking functions during unit-testing.
It is important to avoid this as some of these functions have
proven themselves to not be thread-safe, see http://crbug.com/324913.
This creeped back into the unit-test with r239024.

BUG=356401
TEST=net_unittests --gtest_filter=NetChangeWinFail*

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

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

2 weeks agoLand Recent QUIC Changes
rtenneti@chromium.org [Mon, 31 Mar 2014 20:36:04 +0000 (20:36 +0000)]
Land Recent QUIC Changes

Remove a LOG_IF(DFATAL) for retransmitting packets which were never
given a sent time.

This DCHECK was firing on Chrome when Windows buffered a packet and
before the callback for the packet being sent, Chrome received a server
reject and had to change crypto context and retransmit all unacked
packets.

Merge internal change: 63686840
https://codereview.chromium.org/214413009/

Rename of QUIC flow control member variables to be more explicit (prefix
flow_control) and more descriptive ("max" instead of "initial").

Merge internal change: 63599012
https://codereview.chromium.org/215423003/

Change comment in QuicSessionTest to be more accurate, and add another
expectation to ensure stream is not flow control blocked before sending
any data.

Merge internal change: 63604321

Fixed compilation warnings in quic_sent_packet_manager_test.cc.

https://codereview.chromium.org/214823010/

Added UseWriter changes to QuicTestClient while porting internal
code that handles the client side of unwinding UDP proxied QUIC changes.

Merge internal change: 63542972
https://codereview.chromium.org/214083003/

Change to QUIC's SendAlgorithmInterface to remove IsHandshake from
TimeUntilSend.

Changed QuicSentPacketManager to ensure it always retransmitted crypto
handshake packets before other retransmissions.

Merge internal change: 63540663
https://codereview.chromium.org/214923003/

Removing TransmissionType from QUIC's TimeUntilSend method.

The only real user was was TcpCubicSender for tail loss probe, and TLP
is better fully contained within the SentPacketManager.

Merge internal change: 63501475
https://codereview.chromium.org/214083002/

Removed unnecessary transmission_type from Quic's send algorithm
interface.

The few remaining uses were improper, so there is a minor change in
behavior.

Merge internal change: 63480011
https://codereview.chromium.org/211693004/

Introduce QUIC_VERSION_17: per-stream flow control. Default send window
is 16 KB, and the client/server can specify higher values in their
CHLO/SHLO messages. WINDOW_UPDATE frames are sent when the receiver has
consumed more than half of their receive window (behavior copied from
SPDY), and BLOCKED frames are sent if a write is attempted while flow
control blocked.

Protected behind FLAGS_enable_quic_stream_flow_control.

Merge internal change: 63474251
https://codereview.chromium.org/211743005/

Adding an accessor to quic dispatcher.

Merge internal change: 63470311
https://codereview.chromium.org/208273008/

R=rch@chromium.org

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

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

2 weeks agoFix UMA reporting of data reduction proxy bypass reasons
bengr@chromium.org [Mon, 31 Mar 2014 17:54:55 +0000 (17:54 +0000)]
Fix UMA reporting of data reduction proxy bypass reasons

5xx responses from the proxy that should induce proxy bypass were previously reported as bypassing due to a missing via header value, because such responses often also are missing that header value. This change fixes that reporting.

BUG=356445

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

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

2 weeks agoDo not use QUIC for requests that are through a proxy.
rch@chromium.org [Mon, 31 Mar 2014 04:34:15 +0000 (04:34 +0000)]
Do not use QUIC for requests that are through a proxy.

BUG=357483
TEST=QuicNetworkTransactionTest.ZeroRTTWithProxy
R=rtenneti@chromium.org

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

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