Land Recent QUIC changes.


Changing priority so it's unidirectional. It's a bit hacky to do this
without a version bump but given that it hasn't made a GFE MPM or a
chrome daily build it's "safe enough".

Merge internal change: 51263000

Removing a check causing the encrypter to return NULL when packets were
serialized out of sequence number order and added NULL checks where the
encrypter is used to ensure if this occurred again, it would not be a
fatal error.

Merge internal change: 51212615

Removing a DCHECK and associated comments about looping forever.

Merge internal change: 51211309

A regression test for the gmail multi-stream timeout bug.

Merge internal change: 51201046

Fixed the tests in CL 51179724

Merge internal change: 51185931

Q009: now sending a uint32 priority as the first data on a stream.
This priority is not yet used: it's stashed in the stream and ignored.

Merge internal change: 51179724

[email protected]

Reuploading the CL https://codereview.chromium.org/23005020/ plus
unidirectional priority changes.

Review URL: https://chromiumcodereview.appspot.com/23455003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219945 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/quic/quic_http_stream_test.cc b/net/quic/quic_http_stream_test.cc
index 7d107cb..2c49bcb9 100644
--- a/net/quic/quic_http_stream_test.cc
+++ b/net/quic/quic_http_stream_test.cc
@@ -203,7 +203,7 @@
     headers[":path"] = path;
     headers[":scheme"] = "http";
     headers[":version"] = "HTTP/1.1";
-    request_data_ = SerializeHeaderBlock(headers);
+    request_data_ = SerializeHeaderBlock(headers, true);
   }
 
   void SetResponseString(const std::string& status, const std::string& body) {
@@ -211,11 +211,15 @@
     headers[":status"] = status;
     headers[":version"] = "HTTP/1.1";
     headers["content-type"] = "text/plain";
-    response_data_ = SerializeHeaderBlock(headers) + body;
+    response_data_ = SerializeHeaderBlock(headers, false) + body;
   }
 
-  std::string SerializeHeaderBlock(const SpdyHeaderBlock& headers) {
+  std::string SerializeHeaderBlock(const SpdyHeaderBlock& headers,
+                                   bool write_priority) {
     QuicSpdyCompressor compressor;
+    if (framer_.version() >= QUIC_VERSION_9 && write_priority) {
+      return compressor.CompressHeadersWithPriority(0, headers);
+    }
     return compressor.CompressHeaders(headers);
   }