summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-11 13:36:57 +0000
committerrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-11 13:36:57 +0000
commitd6ce2eb2dfaf06f5effc46c2a4e0b652a983c6b4 (patch)
tree597c28d453271358397bd6c9800b5726c8418430 /net
parent251cd6e5ad67c1054e0e82d0a27c59ce4d0d4666 (diff)
downloadchromium_src-d6ce2eb2dfaf06f5effc46c2a4e0b652a983c6b4.zip
chromium_src-d6ce2eb2dfaf06f5effc46c2a4e0b652a983c6b4.tar.gz
chromium_src-d6ce2eb2dfaf06f5effc46c2a4e0b652a983c6b4.tar.bz2
Land Recent QUIC changes.
QUIC: support for rotating QUIC server configs. In the limit, we would want to rotate QUIC server configs in the same fashion as we rotate TLS SessionTicket keys because the initial client application data isn't forward secure. Merge internal change: 47706026 QUIC: fix flakey test. Once in every 256 test runs, the first byte of the box would actually be 'X'. Merge internal change: 47653885 Disabling LargePostFEC test until b/9295090 is Fixed. Remaining flakiness should be fixed by rch's pending changes. Merge internal change: 47649448 Merging changes from chromium CL - 16256017 Merge internal change: 47608845 Changing reliable quic stream's Readv and users from int to size_t to avoid potential size mismatch issues. Merge internal change: 47475275 R=rch@chromium.org Review URL: https://chromiumcodereview.appspot.com/16747002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205531 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/quic/crypto/crypto_secret_boxer_test.cc2
-rw-r--r--net/quic/quic_framer.cc2
-rw-r--r--net/quic/reliable_quic_stream.cc6
-rw-r--r--net/quic/reliable_quic_stream.h2
-rw-r--r--net/tools/quic/end_to_end_test.cc7
5 files changed, 12 insertions, 7 deletions
diff --git a/net/quic/crypto/crypto_secret_boxer_test.cc b/net/quic/crypto/crypto_secret_boxer_test.cc
index 11797c3..427d052 100644
--- a/net/quic/crypto/crypto_secret_boxer_test.cc
+++ b/net/quic/crypto/crypto_secret_boxer_test.cc
@@ -33,7 +33,7 @@ TEST(CryptoSecretBoxerTest, BoxAndUnbox) {
EXPECT_FALSE(boxer.Unbox(string(1, 'X') + box, &storage, &result));
EXPECT_FALSE(boxer.Unbox(box.substr(1, string::npos), &storage, &result));
EXPECT_FALSE(boxer.Unbox(string(), &storage, &result));
- EXPECT_FALSE(boxer.Unbox(string(1, 'X') + box.substr(1, string::npos),
+ EXPECT_FALSE(boxer.Unbox(string(1, box[0]^0x80) + box.substr(1, string::npos),
&storage, &result));
}
diff --git a/net/quic/quic_framer.cc b/net/quic/quic_framer.cc
index 96daa47b..6db37c4 100644
--- a/net/quic/quic_framer.cc
+++ b/net/quic/quic_framer.cc
@@ -1403,7 +1403,7 @@ bool QuicFramer::AppendPacketSequenceNumber(
QuicDataWriter* writer) {
// Ensure the entire sequence number can be written.
if (writer->capacity() - writer->length() <
- static_cast<size_t>( sequence_number_length)) {
+ static_cast<size_t>(sequence_number_length)) {
return false;
}
switch (sequence_number_length) {
diff --git a/net/quic/reliable_quic_stream.cc b/net/quic/reliable_quic_stream.cc
index 144c908..24bacf1 100644
--- a/net/quic/reliable_quic_stream.cc
+++ b/net/quic/reliable_quic_stream.cc
@@ -103,7 +103,7 @@ void ReliableQuicStream::Close(QuicRstStreamErrorCode error) {
}
}
-int ReliableQuicStream::Readv(const struct iovec* iov, size_t iov_len) {
+size_t ReliableQuicStream::Readv(const struct iovec* iov, size_t iov_len) {
if (headers_decompressed_ && decompressed_headers_.empty()) {
return sequencer_.Readv(iov, iov_len);
}
@@ -111,8 +111,8 @@ int ReliableQuicStream::Readv(const struct iovec* iov, size_t iov_len) {
size_t iov_index = 0;
while (iov_index < iov_len &&
decompressed_headers_.length() > bytes_consumed) {
- int bytes_to_read = min(iov[iov_index].iov_len,
- decompressed_headers_.length() - bytes_consumed);
+ size_t bytes_to_read = min(iov[iov_index].iov_len,
+ decompressed_headers_.length() - bytes_consumed);
char* iov_ptr = static_cast<char*>(iov[iov_index].iov_base);
memcpy(iov_ptr,
decompressed_headers_.data() + bytes_consumed, bytes_to_read);
diff --git a/net/quic/reliable_quic_stream.h b/net/quic/reliable_quic_stream.h
index 279c0bf..0ac87a4 100644
--- a/net/quic/reliable_quic_stream.h
+++ b/net/quic/reliable_quic_stream.h
@@ -85,7 +85,7 @@ class NET_EXPORT_PRIVATE ReliableQuicStream : public
// This block of functions wraps the sequencer's functions of the same
// name. These methods return uncompressed data until that has
// been fully processed. Then they simply delegate to the sequencer.
- virtual int Readv(const struct iovec* iov, size_t iov_len);
+ virtual size_t Readv(const struct iovec* iov, size_t iov_len);
virtual int GetReadableRegions(iovec* iov, size_t iov_len);
virtual bool IsHalfClosed() const;
virtual bool IsClosed() const;
diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc
index 64279a0..2ba1a22 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -417,7 +417,12 @@ TEST_F(EndToEndTest, LargePost) {
EXPECT_EQ(kFooResponseBody, client_->SendCustomSynchronousRequest(request));
}
-TEST_F(EndToEndTest, LargePostFEC) {
+// TODO(ianswett): Enable once b/9295090 is fixed.
+TEST_F(EndToEndTest, DISABLED_LargePostFEC) {
+ // FLAGS_fake_packet_loss_percentage = 30;
+ ASSERT_TRUE(Initialize());
+ client_->options()->max_packets_per_fec_group = 6;
+
// TODO(rtenneti): Delete this when NSS is supported.
if (!Aes128Gcm12Encrypter::IsSupported()) {
LOG(INFO) << "AES GCM not supported. Test skipped.";