Landing Recent QUIC changes until Sat Feb 9 03:43:24 2019.

No flag change

Make QuicSpdyStream only reports ack on body, excluding headers bytes acked. Protected by version 99.

Merge internal change: 233167078

https://chromium-review.googlesource.com/c/1471111/

Add |frame_len| argument to HttpDecoder::Visitor::OnHeadersFrameEnd().

This will be used in cr/231494986.  That one is a quite large CL, so I'm trying
to carve out pieces of it for easier review.

Also, change HttpDecoder member and argument and return value and local variable types from size_t or uint64_t to QuicByteCount wherever it expresses number of bytes.

n/a.  Change types in class used in QUIC v99 only.  Not flag protected.

Merge internal change: 233149295

https://chromium-review.googlesource.com/c/1470999/

Create a QuartcEndpoint abstraction which creates sessions asynchronously.

For now, this is just a wrapper around QuartcFactory.  It creates sessions
asynchronously by scheduling a callback on a QuicAlarm.

The only point to this construct is to force users to wait for a callback.

QuartcEndpoint will serve a greater purpose in the future:  it will own
session/dispatcher dependencies that the caller doesn't need, serve as a unified
API for both client and server perspectives (useful because Quartc is
peer-to-peer and application layer code is the same on both perspectives), and
handle session establishment.

We will start by migrating users from calling QuartcFactory directly to calling
QuartcEndpoint instead, then replace QuartcFactory with an implementation of
QuicDispatcher (for server-side version negotiation) or a version negotiation
agent (for the client).  QuartcFactory will eventually cease to exist.

Creating QuartcEndpoint and migrating callers away from QuartcFactory first
makes it significantly easier to cannibalize the parts of the factory that
handle connection and session creation without breaking callers.  These pieces
need to be reorganized to allow use from the dispatcher.

n/a (Quartc only)

Merge internal change: 233082878

https://chromium-review.googlesource.com/c/1468263/

Remove unused ack_listener argument from QuicSpdyStream::WriteOrBufferBody. No functional change expected, not protected.

Merge internal change: 233065023

https://chromium-review.googlesource.com/c/1468262/

Change a LOG(ERROR) to LOG(WARNING) in QuicPacketReader, and add a histogram for the size of dropped packets. Log & stats only, not protected.

Merge internal change: 233055771

https://chromium-review.googlesource.com/c/1468023/

Add a new method to allow QuicClientBase to change local ports to simulate NAT rebinding and add a command line arg, --num_requests, to QuicClientBin to use it.

n/a (Test only tools)

Merge internal change: 233054987

https://chromium-review.googlesource.com/c/1468003/

Simplify the implementation of QuicFramer::BuildConnectivityProbingPacket(). Protected by FLAGS_quic_reloadable_flag_quic_simplify_build_connectivity_probing_packet

Merge internal change: 232996256

https://chromium-review.googlesource.com/c/1467981/

Remove QuicFramer::BuildIetfDataPacket and make BuildDataPacket do the needful. Rename the guts of BuildIetfDataPacket to AddIetfFrame().

n/a - Moving code around. No functional change.

Merge internal change: 232985714

https://chromium-review.googlesource.com/c/1467668/

Split QuicConnectionHelperInterface from QuartcFactory.  Required for QuicDispatcher/QuartcEndpoint.

When we adopt QuicDispatcher for server-side version negotiation, it needs to
own its own instance of QuicConnectionHelperInterface.  The factory will
eventually go away, so it can no longer serve as the connection helper for
Quartc.  Instead, the factory will own a separate implementation of the
connection helper interface, which can be used without the factory in the near
future.

n/a (Quartc only)

Merge internal change: 232965722

https://chromium-review.googlesource.com/c/1467381/

Deprecate FLAGS_quic_reloadable_flag_quic_fix_last_packet_is_ietf_quic.

Remove unused last_header_form_ from QuicFramer.

Merge internal change: 232921237

https://chromium-review.googlesource.com/c/1465982/

Deprecate FLAGS_quic_reloadable_flag_quic_fix_mark_for_loss_retransmission.

Merge internal change: 232913254

https://chromium-review.googlesource.com/c/1466864/

In QUIC, move ack_listener_ from QuicStream to QuicSpdyStream. No functional change expected. Not protected.

Merge internal change: 232900726

https://chromium-review.googlesource.com/c/1464114/

Deprecate FLAGS_quic_reloadable_flag_quic_disallow_peer_ack_0.

Merge internal change: 232899487

https://chromium-review.googlesource.com/c/1464452/

Initialize server address in QUIC tests.  Previously, GetProof would sometimes get called with an uninitialized server address.

n/a (test only code)

Merge internal change: 232559024

https://chromium-review.googlesource.com/c/1464356/

In QUIC, fix a potential BUILD error because of trying to get min of different types.

Merge internal change: 232551850

https://chromium-review.googlesource.com/c/1464133/

Disable QUIC v39. Protected by BLOCKED FLAGS_quic_reloadable_flag_quic_disable_version_39.

Merge internal change: 232527607

https://chromium-review.googlesource.com/c/1464447/

Rename QuicSimpleServerStreamPeer to TestStream and make it not a peer.

n/a (test-only change)

QuicSimpleServerStreamPeer is kind of a regular peer class: it is friend of QuicSimpleServerStream, and has static methods taking a QuicSimpleServerStream* argument.  At the same time, it is also a subclass of QuicSimpleServerStream, and has non-static methods that operate on base class members.  I find this confusing.

This CL turns QuicSimpleServerStreamPeer into a regular derived class:
no static methods, no friendship.  It also renames it accordingly.

Merge internal change: 232526479

https://chromium-review.googlesource.com/c/1464350/

Add serializer/deserializer for IETF MAX_STREAMS and STREAMS_BLOCKED frames

These replace the MAX_STREAM_ID and STREAM_ID_BLOCKED frames.
The serializer/deserializer converts between the internal QuicMaxStreamIdFrame
and QuicStreamIdBlockedFrame objects, which use absolute stream IDs, and the
wire form of the new frames, which uses stream ID counts. The translation
between the two is simple and straight forward.

A number of tests have been changed to accomodate the new formats and
logic -- in particular, dealing with the stream ID formats for  uni- &
bi-directional streams and server- & client- initiated streams.

A follow on CL will replace teh Quic..Frame objects with new ones
for the new frames, with associated logic changes.

N/A all code is V99 only and protected by the V99 flag.

Merge internal change: 232523736

https://chromium-review.googlesource.com/c/1464132/

Change QuicDispatcher to take a pointer to QuicConfig.

The constructor currently binds the config to a reference member.  This means
the caller is required to keep the referred-to object alive for the lifetime of
the QuicDispatcher.

This behavior tripped me up when trying to adopt QuicDispatcher in Quartc, as I
assumed QuicDispatcher would create a copy of the config.

Changing this to a pointer conforms with advice from go/totw/116.  It makes it
clearer that the caller is responsible for ensuring that the config outlives the
dispatcher.

Merge internal change: 232516491

https://chromium-review.googlesource.com/c/1464446/

(n/a) Deprecate FLAGS_quic_reloadable_flag_quic_aggregate_acked_stream_frames_2.

Merge internal change: 232511987

https://chromium-review.googlesource.com/c/1464107/

R=rch@chromium.org

Change-Id: I7f982c27514d17bc6947f420d42a0ed7b569002f
Reviewed-on: https://chromium-review.googlesource.com/c/1471234
Reviewed-by: Ryan Hamilton <rch@chromium.org>
Commit-Queue: Dan Zhang <danzh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#631975}
75 files changed