diff --git a/depstool/deps/parse_test.go b/depstool/deps/parse_test.go index 2a0ac1dc8..a2a1d3195 100644 --- a/depstool/deps/parse_test.go +++ b/depstool/deps/parse_test.go @@ -38,7 +38,7 @@ http_archive( LastUpdated: "2022-05-18", } if !reflect.DeepEqual(*deps, expected) { - t.Errorf("Parsing returned incorret result, expected:\n %v\n, got:\n %v", expected, *deps) + t.Errorf("Parsing returned incorrect result, expected:\n %v\n, got:\n %v", expected, *deps) } } diff --git a/quiche/balsa/balsa_frame.h b/quiche/balsa/balsa_frame.h index ad42ca2b1..67476c5b1 100644 --- a/quiche/balsa/balsa_frame.h +++ b/quiche/balsa/balsa_frame.h @@ -226,7 +226,7 @@ class QUICHE_EXPORT BalsaFrame : public FramerInterface { } // If enabled, parse the available portion of headers even on a - // HEADERS_TOO_LONG error, so that that portion of headers is available to the + // HEADERS_TOO_LONG error, so that portion of headers is available to the // error handler. Generally results in the last header being truncated. void set_parse_truncated_headers_even_when_headers_too_long(bool set) { parse_truncated_headers_even_when_headers_too_long_ = set; diff --git a/quiche/balsa/balsa_frame_test.cc b/quiche/balsa/balsa_frame_test.cc index 4452ecb1e..46909d652 100644 --- a/quiche/balsa/balsa_frame_test.cc +++ b/quiche/balsa/balsa_frame_test.cc @@ -1709,7 +1709,7 @@ TEST_F(HTTPBalsaFrameTest, "trAnsfer-eNcoding: chunked\r\n" "\r\n"; std::string message_body = - "A chunkjed extension \r\n" + "A chunked extension \r\n" "01234567890 more crud including numbers 123123\r\n" "3f\n" "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n" @@ -1734,7 +1734,7 @@ TEST_F(HTTPBalsaFrameTest, EXPECT_CALL(visitor_mock_, HeaderDone()); EXPECT_CALL(visitor_mock_, OnChunkLength(10)); EXPECT_CALL(visitor_mock_, - OnChunkExtensionInput(" chunkjed extension ")); + OnChunkExtensionInput(" chunked extension ")); EXPECT_CALL(visitor_mock_, OnChunkLength(63)); EXPECT_CALL(visitor_mock_, OnChunkExtensionInput("")); EXPECT_CALL(visitor_mock_, OnChunkLength(0)); @@ -1777,7 +1777,7 @@ TEST_P(HTTPBalsaFrameWithTrailersTest, " \t includes a continuation\n" "\r\n"; std::string message_body = - "A chunkjed extension \r\n" + "A chunked extension \r\n" "01234567890 more crud including numbers 123123\r\n" "3f\n" "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n" @@ -2192,7 +2192,7 @@ TEST_F(HTTPBalsaFrameTest, "trAnsfer-eNcoding: chunked\r\n" "\r\n"; std::string message_body = - "A chunkjed extension \r\n" + "A chunked extension \r\n" "01234567890 more crud including numbers 123123\r\n" "3f\n" "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n" @@ -2254,7 +2254,7 @@ TEST_P(HTTPBalsaFrameWithTrailersTest, "trAnsfer-eNcoding: chunked\r\n" "\r\n"; std::string message_body = - "A chunkjed extension \r\n" + "A chunked extension \r\n" "01234567890 more crud including numbers 123123\r\n" "3f\n" "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n" @@ -2331,7 +2331,7 @@ TEST_P( "trAnsfer-eNcoding: chunked\r\n" "\r\n"; std::string message_body = - "A chunkjed extension \r\n" + "A chunked extension \r\n" "01234567890 more crud including numbers 123123\r\n" "3f\n" "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n" @@ -2414,7 +2414,7 @@ TEST(HTTPBalsaFrame, "trAnsfer-eNcoding: chunked\r\n" "\r\n"; std::string message_body = - "A chunkjed extension \r\n" + "A chunked extension \r\n" "01234567890 more crud including numbers 123123\r\n" "3f\n" "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n" @@ -2510,7 +2510,7 @@ TEST( "trAnsfer-eNcoding: chunked\r\n" "\r\n"; std::string message_body = - "A chunkjed extension \r\n" + "A chunked extension \r\n" "01234567890 more crud including numbers 123123\r\n" "3f\n" "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n" diff --git a/quiche/balsa/balsa_headers.cc b/quiche/balsa/balsa_headers.cc index e6ee93c45..5e7f15a97 100644 --- a/quiche/balsa/balsa_headers.cc +++ b/quiche/balsa/balsa_headers.cc @@ -196,7 +196,7 @@ void BalsaHeaders::ParseTokenList(absl::string_view header_value, // found. marked. const char* nws = start; - // search for next whitspace or separator char. + // search for next whitespace or separator char. while (*start != ',' && static_cast(*start) > ' ') { ++start; if (start == end) { @@ -625,7 +625,7 @@ void BalsaHeaders::RemoveAllOfHeaderInList(const HeaderTokenList& keys) { // This extra copy sacrifices some performance to prevent the possible // mistakes that the caller does not lower case the headers in keys. // Better performance can be achieved by asking caller to lower case - // the keys and RemoveAllOfheaderInlist just does lookup. + // the keys and RemoveAllOfheaderInList just does lookup. absl::flat_hash_set lowercase_keys; for (const auto& key : keys) { MaybeClearSpecialHeaderValues(key); @@ -1102,7 +1102,7 @@ void BalsaHeaders::RemoveLastTokenFromHeaderValue(absl::string_view key) { GetHeaderLinesIterator(key, header_lines_.begin()); if (it == header_lines_.end()) { QUICHE_DLOG(WARNING) - << "Attempting to remove last token from a non-existent " + << "Attempting to remove last token from a nonexistent " << "header \"" << key << "\""; return; } diff --git a/quiche/balsa/balsa_headers.h b/quiche/balsa/balsa_headers.h index 3e1823bab..05867271a 100644 --- a/quiche/balsa/balsa_headers.h +++ b/quiche/balsa/balsa_headers.h @@ -890,7 +890,7 @@ class QUICHE_EXPORT BalsaHeaders : public HeaderApi { absl::string_view response_code() const override { // Note: There is no difference between request_uri() and response_code(). - // They both could be called GetSecondtTokenFromFirstline(), but, as noted + // They both could be called GetSecondTokenFromFirstline(), but, as noted // in an earlier comment, that wouldn't be as descriptive. return request_uri(); } diff --git a/quiche/balsa/balsa_headers_test.cc b/quiche/balsa/balsa_headers_test.cc index d132a5182..16394aeca 100644 --- a/quiche/balsa/balsa_headers_test.cc +++ b/quiche/balsa/balsa_headers_test.cc @@ -2450,7 +2450,7 @@ TEST(BalsaHeaders, SCOPED_TRACE( "This test tests the codepath where the new firstline is" " too large to fit within the space used by the original" - " firstline, but large enuogh to space in the free space" + " firstline, but large enough to space in the free space" " available in both firstline plus the space made available" " with deleted header lines (specifically, the first one"); BalsaHeaders headers = CreateHTTPHeaders( @@ -2523,7 +2523,7 @@ TEST(BalsaHeaders, TestSettingMissingFirstlineElementsAfterBalsaHeadersParsed) { } } -// Here we exersize the codepaths involved in setting a new firstine when the +// Here we exercise the codepaths involved in setting a new firstline when the // previously set firstline is stored in the 'additional_data_stream_' // variable, and the new firstline is larger than the previously set firstline. TEST(BalsaHeaders, @@ -2549,7 +2549,7 @@ TEST(BalsaHeaders, StrEq("HTTP/1.10 2000 REALLY don't need a reason")); } -// Here we exersize the codepaths involved in setting a new firstine when the +// Here we exercise the codepaths involved in setting a new firstline when the // previously set firstline is stored in the 'additional_data_stream_' // variable, and the new firstline is smaller than the previously set firstline. TEST(BalsaHeaders, @@ -3041,7 +3041,7 @@ TEST(BalsaHeaders, TestAppendToHeaderWithCommaAndSpace) { } TEST(BalsaHeaders, TestInitialAppendWithCommaAndSpace) { - // Test that AppendToHeadeWithCommaAndSpace works properly when the + // Test that AppendToHeaderWithCommaAndSpace works properly when the // header did not already exist. BalsaHeaders headers; headers.AppendToHeaderWithCommaAndSpace("foo", "foo_value"); @@ -3051,7 +3051,7 @@ TEST(BalsaHeaders, TestInitialAppendWithCommaAndSpace) { } TEST(BalsaHeaders, TestAppendWithCommaAndSpaceAndRemove) { - // Test that AppendToHeadeWithCommaAndSpace works properly with removing. + // Test that AppendToHeaderWithCommaAndSpace works properly with removing. BalsaHeaders headers; headers.AppendToHeaderWithCommaAndSpace("foo", "foo_value"); EXPECT_THAT(headers.GetHeader("foo"), StrEq("foo_value")); diff --git a/quiche/blind_sign_auth/proto/auth_and_sign.proto b/quiche/blind_sign_auth/proto/auth_and_sign.proto index 36ac8122a..f02d5ffb7 100644 --- a/quiche/blind_sign_auth/proto/auth_and_sign.proto +++ b/quiche/blind_sign_auth/proto/auth_and_sign.proto @@ -80,6 +80,6 @@ message AuthAndSignResponse { // users in the format of "${Region}.${timestamp}.${signature}". string region_token_and_signature = 6; - // The APN type bridge-proxy use to deside which APN to use for connecting. + // The APN type bridge-proxy use to decide which APN to use for connecting. string apn_type = 7; } diff --git a/quiche/common/platform/api/quiche_default_proof_providers.h b/quiche/common/platform/api/quiche_default_proof_providers.h index 9a9dcd76a..239ce448b 100644 --- a/quiche/common/platform/api/quiche_default_proof_providers.h +++ b/quiche/common/platform/api/quiche_default_proof_providers.h @@ -23,7 +23,7 @@ inline std::unique_ptr CreateDefaultProofVerifier( } // Provides a default proof source for CLI-based tools. The actual certificates -// used in the proof source should be confifgurable via command-line flags. +// used in the proof source should be configurable via command-line flags. inline std::unique_ptr CreateDefaultProofSource() { return CreateDefaultProofSourceImpl(); } diff --git a/quiche/common/platform/api/quiche_server_stats.h b/quiche/common/platform/api/quiche_server_stats.h index e8ad499cd..d8d6d87b7 100644 --- a/quiche/common/platform/api/quiche_server_stats.h +++ b/quiche/common/platform/api/quiche_server_stats.h @@ -70,7 +70,7 @@ namespace quiche { // Sample usage: // QUICHE_SERVER_SERVER_HISTOGRAM_CUSTOM_COUNTS("My.Histogram", 1, 100000000, -// 100, "Counters of hitting certian code."); +// 100, "Counters of hitting certain code."); #define QUICHE_SERVER_HISTOGRAM_COUNTS(name, sample, min, max, bucket_count, \ docstring) \ diff --git a/quiche/common/platform/api/quiche_url_utils.h b/quiche/common/platform/api/quiche_url_utils.h index 35904121a..8c8dc85fd 100644 --- a/quiche/common/platform/api/quiche_url_utils.h +++ b/quiche/common/platform/api/quiche_url_utils.h @@ -18,7 +18,7 @@ namespace quiche { // Produces concrete URLs in |target| from templated ones in |uri_template|. // Parameters are URL-encoded. Collects the names of any expanded variables in -// |vars_found|. Returns true if the template was parseable, false if it was +// |vars_found|. Returns true if the template was parsable, false if it was // malformed. inline bool ExpandURITemplate( const std::string& uri_template, diff --git a/quiche/common/platform/default/quiche_platform_impl/quiche_url_utils_impl.h b/quiche/common/platform/default/quiche_platform_impl/quiche_url_utils_impl.h index 45d87e0b1..7f8915c5f 100644 --- a/quiche/common/platform/default/quiche_platform_impl/quiche_url_utils_impl.h +++ b/quiche/common/platform/default/quiche_platform_impl/quiche_url_utils_impl.h @@ -18,7 +18,7 @@ namespace quiche { // Produces concrete URLs in |target| from templated ones in |uri_template|. // Parameters are URL-encoded. Collects the names of any expanded variables in // |vars_found|. Supports level 1 templates as specified in RFC 6570. Returns -// true if the template was parseable, false if it was malformed. +// true if the template was parsable, false if it was malformed. QUICHE_EXPORT bool ExpandURITemplateImpl( const std::string& uri_template, const absl::flat_hash_map& parameters, diff --git a/quiche/common/quiche_circular_deque.h b/quiche/common/quiche_circular_deque.h index 5c8fc1f1f..73a935105 100644 --- a/quiche/common/quiche_circular_deque.h +++ b/quiche/common/quiche_circular_deque.h @@ -29,11 +29,11 @@ namespace quiche { // all elements. At any point in time, either // a) All elements are placed in a contiguous portion of this buffer, like a // c-array, or -// b) Elements are phycially divided into two parts: the first part occupies the +// b) Elements are physically divided into two parts: the first part occupies the // end of the buffer and the second part occupies the beginning of the // buffer. // -// Currently, elements can only be pushed or poped from either ends, it can't be +// Currently, elements can only be pushed or popped from either ends, it can't be // inserted or erased in the middle. // // TODO(wub): Make memory grow/shrink strategies customizable. diff --git a/quiche/common/quiche_data_writer.cc b/quiche/common/quiche_data_writer.cc index 5e7943925..6d52eaa3c 100644 --- a/quiche/common/quiche_data_writer.cc +++ b/quiche/common/quiche_data_writer.cc @@ -214,7 +214,7 @@ bool QuicheDataWriter::WriteVarInt62(uint64_t value) { } return false; } - // Can not encode, high 2 bits not 0 + // Cannot encode, high 2 bits not 0 return false; } diff --git a/quiche/common/quiche_ip_address_family.h b/quiche/common/quiche_ip_address_family.h index 103860ad7..fad58d321 100644 --- a/quiche/common/quiche_ip_address_family.h +++ b/quiche/common/quiche_ip_address_family.h @@ -9,7 +9,7 @@ namespace quiche { -// IP address family type used in QUIC. This hides platform dependant IP address +// IP address family type used in QUIC. This hides platform dependent IP address // family types. enum class IpAddressFamily { IP_V4, diff --git a/quiche/common/structured_headers_generated_test.cc b/quiche/common/structured_headers_generated_test.cc index 7e94e49fc..035d5c4d5 100644 --- a/quiche/common/structured_headers_generated_test.cc +++ b/quiche/common/structured_headers_generated_test.cc @@ -64,7 +64,7 @@ const struct ParameterizedItemTestCase { 2, {{Item("", Item::kByteSequenceType), {}}}, nullptr}, - {"bad paddding", + {"bad padding", ":aGVsbG8:", 9, {{Item("hello", Item::kByteSequenceType), {}}}, diff --git a/quiche/common/structured_headers_test.cc b/quiche/common/structured_headers_test.cc index 73a7ab31b..f122d8401 100644 --- a/quiche/common/structured_headers_test.cc +++ b/quiche/common/structured_headers_test.cc @@ -98,7 +98,7 @@ const ItemTestCase sh09_item_test_cases[] = { {"basic binary", "*aGVsbG8=*", Item("hello", Item::kByteSequenceType), nullptr}, {"empty binary", "**", Item("", Item::kByteSequenceType), nullptr}, - {"bad paddding", "*aGVsbG8*", Item("hello", Item::kByteSequenceType), + {"bad padding", "*aGVsbG8*", Item("hello", Item::kByteSequenceType), "*aGVsbG8=*"}, {"bad end delimiter", "*aGVsbG8=", absl::nullopt, nullptr}, {"extra whitespace", "*aGVsb G8=*", absl::nullopt, nullptr}, @@ -581,8 +581,8 @@ TEST(StructuredHeaderTest, UnserializableDecimals) { // These values cannot be directly parsed from headers, but are valid doubles // which can be serialized as sh-floats (though rounding is expected.) -TEST(StructuredHeaderTest, SerializeUnparseableDecimals) { - struct UnparseableDecimal { +TEST(StructuredHeaderTest, SerializeUnparsableDecimals) { + struct UnparsableDecimal { const char* name; double value; const char* canonical; diff --git a/quiche/http2/adapter/adapter_impl_comparison_test.cc b/quiche/http2/adapter/adapter_impl_comparison_test.cc index aaa2f99f2..29965875b 100644 --- a/quiche/http2/adapter/adapter_impl_comparison_test.cc +++ b/quiche/http2/adapter/adapter_impl_comparison_test.cc @@ -35,7 +35,7 @@ TEST(AdapterImplComparisonTest, ClientHandlesFrames) { oghttp2_visitor.GetEventSequence()); // TODO(b/181586191): Consider consistent behavior for delivering events on - // non-existent streams between nghttp2_adapter and oghttp2_adapter. + // nonexistent streams between nghttp2_adapter and oghttp2_adapter. } TEST(AdapterImplComparisonTest, SubmitWindowUpdateBumpsWindow) { diff --git a/quiche/http2/adapter/header_validator_test.cc b/quiche/http2/adapter/header_validator_test.cc index 60dabbf51..caa892dd2 100644 --- a/quiche/http2/adapter/header_validator_test.cc +++ b/quiche/http2/adapter/header_validator_test.cc @@ -39,7 +39,7 @@ TEST(HeaderValidatorTest, ExceedsMaxSize) { EXPECT_EQ(HeaderValidator::HEADER_OK, status); status = v.ValidateSingleHeader( "name2", - "Antidisestablishmentariansism is supercalifragilisticexpialodocious."); + "Antidisestablishmentariansism is supercalifragilisticexpealidocious."); EXPECT_EQ(HeaderValidator::HEADER_FIELD_TOO_LONG, status); } @@ -432,7 +432,7 @@ TEST(HeaderValidatorTest, WebsocketPseudoHeaders) { } EXPECT_EQ(HeaderValidator::HEADER_OK, v.ValidateSingleHeader(":protocol", "websocket")); - // After allowing the method, `:protocol` is acepted for CONNECT requests. + // After allowing the method, `:protocol` is accepted for CONNECT requests. EXPECT_TRUE(v.FinishHeaderBlock(HeaderType::REQUEST)); } diff --git a/quiche/http2/adapter/mock_http2_visitor.h b/quiche/http2/adapter/mock_http2_visitor.h index 86345d365..2417eb7ff 100644 --- a/quiche/http2/adapter/mock_http2_visitor.h +++ b/quiche/http2/adapter/mock_http2_visitor.h @@ -54,7 +54,7 @@ class QUICHE_NO_EXPORT MockHttp2Visitor : public Http2VisitorInterface { (override)); MOCK_METHOD(bool, OnDataPaddingLength, - (Http2StreamId strema_id, size_t padding_length), (override)); + (Http2StreamId stream_id, size_t padding_length), (override)); MOCK_METHOD(bool, OnBeginDataForStream, (Http2StreamId stream_id, size_t payload_length), (override)); diff --git a/quiche/http2/adapter/nghttp2_adapter_test.cc b/quiche/http2/adapter/nghttp2_adapter_test.cc index 0493c8751..2152182df 100644 --- a/quiche/http2/adapter/nghttp2_adapter_test.cc +++ b/quiche/http2/adapter/nghttp2_adapter_test.cc @@ -247,7 +247,7 @@ TEST(NgHttp2AdapterTest, ClientHandlesFrames) { // Should be 3, but this method only works for server adapters. EXPECT_EQ(0, adapter->GetHighestReceivedStreamId()); - // Even though the client recieved a GOAWAY, streams 1 and 5 are still active. + // Even though the client received a GOAWAY, streams 1 and 5 are still active. EXPECT_TRUE(adapter->want_read()); EXPECT_CALL(visitor, OnFrameHeader(1, 0, DATA, 1)); diff --git a/quiche/http2/adapter/nghttp2_session_test.cc b/quiche/http2/adapter/nghttp2_session_test.cc index f11c49056..33d29e559 100644 --- a/quiche/http2/adapter/nghttp2_session_test.cc +++ b/quiche/http2/adapter/nghttp2_session_test.cc @@ -180,7 +180,7 @@ TEST_F(NgHttp2SessionTest, ClientHandlesFrames) { const int64_t stream_result = session.ProcessBytes(stream_frames); EXPECT_EQ(stream_frames.size(), stream_result); - // Even though the client recieved a GOAWAY, streams 1 and 5 are still active. + // Even though the client received a GOAWAY, streams 1 and 5 are still active. EXPECT_TRUE(session.want_read()); EXPECT_CALL(visitor_, OnFrameHeader(1, 0, DATA, 1)); diff --git a/quiche/http2/adapter/noop_header_validator_test.cc b/quiche/http2/adapter/noop_header_validator_test.cc index 6340c606c..8d60028f6 100644 --- a/quiche/http2/adapter/noop_header_validator_test.cc +++ b/quiche/http2/adapter/noop_header_validator_test.cc @@ -40,7 +40,7 @@ TEST(NoopHeaderValidatorTest, ExceedsMaxSize) { EXPECT_EQ(NoopHeaderValidator::HEADER_OK, status); status = v.ValidateSingleHeader( "name2", - "Antidisestablishmentariansism is supercalifragilisticexpialodocious."); + "Antidisestablishmentariansism is supercalifragilisticexpealidocious."); EXPECT_EQ(NoopHeaderValidator::HEADER_OK, status); } @@ -227,7 +227,7 @@ TEST(NoopHeaderValidatorTest, WebsocketPseudoHeaders) { } EXPECT_EQ(NoopHeaderValidator::HEADER_OK, v.ValidateSingleHeader(":protocol", "websocket")); - // After allowing the method, `:protocol` is acepted for CONNECT requests. + // After allowing the method, `:protocol` is accepted for CONNECT requests. EXPECT_TRUE(v.FinishHeaderBlock(HeaderType::REQUEST)); } diff --git a/quiche/http2/adapter/oghttp2_session.cc b/quiche/http2/adapter/oghttp2_session.cc index fdf308e69..370b76e1c 100644 --- a/quiche/http2/adapter/oghttp2_session.cc +++ b/quiche/http2/adapter/oghttp2_session.cc @@ -36,7 +36,7 @@ const int kSendError = -902; constexpr absl::string_view kHeadValue = "HEAD"; -// TODO(birenroy): Consider incorporating spdy::FlagsSerializionVisitor here. +// TODO(birenroy): Consider incorporating spdy::FlagsSerializationVisitor here. class FrameAttributeCollector : public spdy::SpdyFrameVisitor { public: FrameAttributeCollector() = default; @@ -1158,7 +1158,7 @@ void OgHttp2Session::OnStreamPadLength(spdy::SpdyStreamId stream_id, void OgHttp2Session::OnStreamPadding(spdy::SpdyStreamId /*stream_id*/, size_t /*len*/) { // Flow control was accounted for in OnStreamPadLength(). - // TODO(181586191): Pass padding to the visitor? + // TODO(b/181586191): Pass padding to the visitor? } spdy::SpdyHeadersHandlerInterface* OgHttp2Session::OnHeaderFrameStart( @@ -1473,7 +1473,7 @@ void OgHttp2Session::OnWindowUpdate(spdy::SpdyStreamId stream_id, LatchErrorAndNotify(Http2ErrorCode::PROTOCOL_ERROR, ConnectionError::kWrongFrameSequence); } - // Do not inform the visitor of a WINDOW_UPDATE for a non-existent stream. + // Do not inform the visitor of a WINDOW_UPDATE for a nonexistent stream. return; } else { if (streams_reset_.contains(stream_id)) { diff --git a/quiche/http2/adapter/oghttp2_session.h b/quiche/http2/adapter/oghttp2_session.h index 96b50e9b0..adf5d968b 100644 --- a/quiche/http2/adapter/oghttp2_session.h +++ b/quiche/http2/adapter/oghttp2_session.h @@ -353,7 +353,7 @@ class QUICHE_EXPORT OgHttp2Session : public Http2Session, }; using ProcessBytesResult = absl::variant; - // Attempts to process `bytes` and returns the number of bytes proccessed on + // Attempts to process `bytes` and returns the number of bytes processed on // success or the processing error on failure. ProcessBytesResult ProcessBytesImpl(absl::string_view bytes); diff --git a/quiche/http2/decoder/http2_frame_decoder.cc b/quiche/http2/decoder/http2_frame_decoder.cc index 14b34308f..f22349114 100644 --- a/quiche/http2/decoder/http2_frame_decoder.cc +++ b/quiche/http2/decoder/http2_frame_decoder.cc @@ -107,7 +107,7 @@ DecodeStatus Http2FrameDecoder::StartDecodingPayload(DecodeBuffer* db) { // The decode buffer can extend across many frames. Make sure that the // buffer we pass to the start method that is specific to the frame type - // does not exend beyond this frame. + // does not extend beyond this frame. DecodeBufferSubset subset(db, header.payload_length); DecodeStatus status; switch (header.type) { @@ -179,7 +179,7 @@ DecodeStatus Http2FrameDecoder::StartDecodingPayload(DecodeBuffer* db) { DecodeStatus Http2FrameDecoder::ResumeDecodingPayload(DecodeBuffer* db) { // The decode buffer can extend across many frames. Make sure that the // buffer we pass to the start method that is specific to the frame type - // does not exend beyond this frame. + // does not extend beyond this frame. size_t remaining = frame_decoder_state_.remaining_total_payload(); QUICHE_DCHECK_LE(remaining, frame_header().payload_length); DecodeBufferSubset subset(db, remaining); diff --git a/quiche/http2/decoder/http2_frame_decoder.h b/quiche/http2/decoder/http2_frame_decoder.h index 3d8f1ac82..05932b7e6 100644 --- a/quiche/http2/decoder/http2_frame_decoder.h +++ b/quiche/http2/decoder/http2_frame_decoder.h @@ -8,7 +8,7 @@ // Http2FrameDecoder decodes the available input until it reaches the end of // the input or it reaches the end of the first frame in the input. // Note that Http2FrameDecoder does only minimal validation; for example, -// stream ids are not checked, nor is the sequence of frames such as +// stream ids are not checked, neither is the sequence of frames such as // CONTINUATION frame placement. // // Http2FrameDecoder enters state kError once it has called the listener's diff --git a/quiche/http2/decoder/http2_frame_decoder_test.cc b/quiche/http2/decoder/http2_frame_decoder_test.cc index cd408805d..3a420546f 100644 --- a/quiche/http2/decoder/http2_frame_decoder_test.cc +++ b/quiche/http2/decoder/http2_frame_decoder_test.cc @@ -108,7 +108,7 @@ class Http2FrameDecoderTest : public RandomDecoderTest { // Decode one frame's payload and confirm that the listener recorded the // expected FrameParts instance, and only one FrameParts instance. The - // payload will be decoded several times with different partitionings + // payload will be decoded several times with different partitions // of the payload, and after each the validator will be called. AssertionResult DecodePayloadAndValidateSeveralWays( absl::string_view payload, const FrameParts& expected) { diff --git a/quiche/http2/decoder/payload_decoders/altsvc_payload_decoder_test.cc b/quiche/http2/decoder/payload_decoders/altsvc_payload_decoder_test.cc index f41934cbb..c3def7d1e 100644 --- a/quiche/http2/decoder/payload_decoders/altsvc_payload_decoder_test.cc +++ b/quiche/http2/decoder/payload_decoders/altsvc_payload_decoder_test.cc @@ -31,7 +31,7 @@ class AltSvcPayloadDecoderPeer { static constexpr Http2FrameType FrameType() { return Http2FrameType::ALTSVC; } // Returns the mask of flags that affect the decoding of the payload (i.e. - // flags that that indicate the presence of certain fields or padding). + // flags that indicate the presence of certain fields or padding). static constexpr uint8_t FlagsAffectingPayloadDecoding() { return 0; } }; diff --git a/quiche/http2/decoder/payload_decoders/continuation_payload_decoder_test.cc b/quiche/http2/decoder/payload_decoders/continuation_payload_decoder_test.cc index e7aec65b7..b75790e47 100644 --- a/quiche/http2/decoder/payload_decoders/continuation_payload_decoder_test.cc +++ b/quiche/http2/decoder/payload_decoders/continuation_payload_decoder_test.cc @@ -31,7 +31,7 @@ class ContinuationPayloadDecoderPeer { } // Returns the mask of flags that affect the decoding of the payload (i.e. - // flags that that indicate the presence of certain fields or padding). + // flags that indicate the presence of certain fields or padding). static constexpr uint8_t FlagsAffectingPayloadDecoding() { return 0; } }; diff --git a/quiche/http2/decoder/payload_decoders/data_payload_decoder_test.cc b/quiche/http2/decoder/payload_decoders/data_payload_decoder_test.cc index bbd49135b..49d0d65c3 100644 --- a/quiche/http2/decoder/payload_decoders/data_payload_decoder_test.cc +++ b/quiche/http2/decoder/payload_decoders/data_payload_decoder_test.cc @@ -32,7 +32,7 @@ class DataPayloadDecoderPeer { static constexpr Http2FrameType FrameType() { return Http2FrameType::DATA; } // Returns the mask of flags that affect the decoding of the payload (i.e. - // flags that that indicate the presence of certain fields or padding). + // flags that indicate the presence of certain fields or padding). static constexpr uint8_t FlagsAffectingPayloadDecoding() { return Http2FrameFlag::PADDED; } diff --git a/quiche/http2/decoder/payload_decoders/goaway_payload_decoder_test.cc b/quiche/http2/decoder/payload_decoders/goaway_payload_decoder_test.cc index 78f44d12e..108a0bd2c 100644 --- a/quiche/http2/decoder/payload_decoders/goaway_payload_decoder_test.cc +++ b/quiche/http2/decoder/payload_decoders/goaway_payload_decoder_test.cc @@ -28,7 +28,7 @@ class GoAwayPayloadDecoderPeer { static constexpr Http2FrameType FrameType() { return Http2FrameType::GOAWAY; } // Returns the mask of flags that affect the decoding of the payload (i.e. - // flags that that indicate the presence of certain fields or padding). + // flags that indicate the presence of certain fields or padding). static constexpr uint8_t FlagsAffectingPayloadDecoding() { return 0; } }; diff --git a/quiche/http2/decoder/payload_decoders/headers_payload_decoder_test.cc b/quiche/http2/decoder/payload_decoders/headers_payload_decoder_test.cc index f6f9af150..d76ab0835 100644 --- a/quiche/http2/decoder/payload_decoders/headers_payload_decoder_test.cc +++ b/quiche/http2/decoder/payload_decoders/headers_payload_decoder_test.cc @@ -30,7 +30,7 @@ class HeadersPayloadDecoderPeer { } // Returns the mask of flags that affect the decoding of the payload (i.e. - // flags that that indicate the presence of certain fields or padding). + // flags that indicate the presence of certain fields or padding). static constexpr uint8_t FlagsAffectingPayloadDecoding() { return Http2FrameFlag::PADDED | Http2FrameFlag::PRIORITY; } diff --git a/quiche/http2/decoder/payload_decoders/ping_payload_decoder_test.cc b/quiche/http2/decoder/payload_decoders/ping_payload_decoder_test.cc index dba03b143..6dac425c1 100644 --- a/quiche/http2/decoder/payload_decoders/ping_payload_decoder_test.cc +++ b/quiche/http2/decoder/payload_decoders/ping_payload_decoder_test.cc @@ -26,7 +26,7 @@ class PingPayloadDecoderPeer { static constexpr Http2FrameType FrameType() { return Http2FrameType::PING; } // Returns the mask of flags that affect the decoding of the payload (i.e. - // flags that that indicate the presence of certain fields or padding). + // flags that indicate the presence of certain fields or padding). static constexpr uint8_t FlagsAffectingPayloadDecoding() { return 0; } }; diff --git a/quiche/http2/decoder/payload_decoders/priority_payload_decoder_test.cc b/quiche/http2/decoder/payload_decoders/priority_payload_decoder_test.cc index 573433b49..49bdcdc30 100644 --- a/quiche/http2/decoder/payload_decoders/priority_payload_decoder_test.cc +++ b/quiche/http2/decoder/payload_decoders/priority_payload_decoder_test.cc @@ -28,7 +28,7 @@ class PriorityPayloadDecoderPeer { } // Returns the mask of flags that affect the decoding of the payload (i.e. - // flags that that indicate the presence of certain fields or padding). + // flags that indicate the presence of certain fields or padding). static constexpr uint8_t FlagsAffectingPayloadDecoding() { return 0; } }; diff --git a/quiche/http2/decoder/payload_decoders/priority_update_payload_decoder_test.cc b/quiche/http2/decoder/payload_decoders/priority_update_payload_decoder_test.cc index 14f3557b2..acaf8afbd 100644 --- a/quiche/http2/decoder/payload_decoders/priority_update_payload_decoder_test.cc +++ b/quiche/http2/decoder/payload_decoders/priority_update_payload_decoder_test.cc @@ -30,7 +30,7 @@ class PriorityUpdatePayloadDecoderPeer { } // Returns the mask of flags that affect the decoding of the payload (i.e. - // flags that that indicate the presence of certain fields or padding). + // flags that indicate the presence of certain fields or padding). static constexpr uint8_t FlagsAffectingPayloadDecoding() { return 0; } }; diff --git a/quiche/http2/decoder/payload_decoders/push_promise_payload_decoder_test.cc b/quiche/http2/decoder/payload_decoders/push_promise_payload_decoder_test.cc index 2ea5e62e1..e8b2162c3 100644 --- a/quiche/http2/decoder/payload_decoders/push_promise_payload_decoder_test.cc +++ b/quiche/http2/decoder/payload_decoders/push_promise_payload_decoder_test.cc @@ -32,7 +32,7 @@ class PushPromisePayloadDecoderPeer { } // Returns the mask of flags that affect the decoding of the payload (i.e. - // flags that that indicate the presence of certain fields or padding). + // flags that indicate the presence of certain fields or padding). static constexpr uint8_t FlagsAffectingPayloadDecoding() { return Http2FrameFlag::PADDED; } diff --git a/quiche/http2/decoder/payload_decoders/rst_stream_payload_decoder_test.cc b/quiche/http2/decoder/payload_decoders/rst_stream_payload_decoder_test.cc index 999d7d07f..a6832cd09 100644 --- a/quiche/http2/decoder/payload_decoders/rst_stream_payload_decoder_test.cc +++ b/quiche/http2/decoder/payload_decoders/rst_stream_payload_decoder_test.cc @@ -29,7 +29,7 @@ class RstStreamPayloadDecoderPeer { } // Returns the mask of flags that affect the decoding of the payload (i.e. - // flags that that indicate the presence of certain fields or padding). + // flags that indicate the presence of certain fields or padding). static constexpr uint8_t FlagsAffectingPayloadDecoding() { return 0; } }; diff --git a/quiche/http2/decoder/payload_decoders/settings_payload_decoder_test.cc b/quiche/http2/decoder/payload_decoders/settings_payload_decoder_test.cc index 3533fd4f8..4ac7606af 100644 --- a/quiche/http2/decoder/payload_decoders/settings_payload_decoder_test.cc +++ b/quiche/http2/decoder/payload_decoders/settings_payload_decoder_test.cc @@ -31,7 +31,7 @@ class SettingsPayloadDecoderPeer { } // Returns the mask of flags that affect the decoding of the payload (i.e. - // flags that that indicate the presence of certain fields or padding). + // flags that indicate the presence of certain fields or padding). static constexpr uint8_t FlagsAffectingPayloadDecoding() { return Http2FrameFlag::ACK; } diff --git a/quiche/http2/decoder/payload_decoders/unknown_payload_decoder_test.cc b/quiche/http2/decoder/payload_decoders/unknown_payload_decoder_test.cc index 47f89b7dd..6fb06152e 100644 --- a/quiche/http2/decoder/payload_decoders/unknown_payload_decoder_test.cc +++ b/quiche/http2/decoder/payload_decoders/unknown_payload_decoder_test.cc @@ -33,7 +33,7 @@ class UnknownPayloadDecoderPeer { static Http2FrameType FrameType() { return g_unknown_frame_type; } // Returns the mask of flags that affect the decoding of the payload (i.e. - // flags that that indicate the presence of certain fields or padding). + // flags that indicate the presence of certain fields or padding). static constexpr uint8_t FlagsAffectingPayloadDecoding() { return 0; } }; diff --git a/quiche/http2/decoder/payload_decoders/window_update_payload_decoder_test.cc b/quiche/http2/decoder/payload_decoders/window_update_payload_decoder_test.cc index 6dd82059e..22c262cc2 100644 --- a/quiche/http2/decoder/payload_decoders/window_update_payload_decoder_test.cc +++ b/quiche/http2/decoder/payload_decoders/window_update_payload_decoder_test.cc @@ -28,7 +28,7 @@ class WindowUpdatePayloadDecoderPeer { } // Returns the mask of flags that affect the decoding of the payload (i.e. - // flags that that indicate the presence of certain fields or padding). + // flags that indicate the presence of certain fields or padding). static constexpr uint8_t FlagsAffectingPayloadDecoding() { return 0; } }; diff --git a/quiche/http2/hpack/decoder/hpack_entry_collector_test.cc b/quiche/http2/hpack/decoder/hpack_entry_collector_test.cc index 8512ce085..304061b48 100644 --- a/quiche/http2/hpack/decoder/hpack_entry_collector_test.cc +++ b/quiche/http2/hpack/decoder/hpack_entry_collector_test.cc @@ -40,8 +40,8 @@ TEST(HpackEntryCollectorTest, Clear) { QUICHE_VLOG(1) << collector; } -// EXPECT_FATAL_FAILURE can not access variables in the scope of a test body, -// including the this variable so can not access non-static members. So, we +// EXPECT_FATAL_FAILURE cannot access variables in the scope of a test body, +// including the this variable so cannot access non-static members. So, we // define this test outside of the test body. void IndexedHeaderErrorTest() { HpackEntryCollector collector; diff --git a/quiche/http2/hpack/huffman/hpack_huffman_decoder.cc b/quiche/http2/hpack/huffman/hpack_huffman_decoder.cc index 3727557d2..46799a799 100644 --- a/quiche/http2/hpack/huffman/hpack_huffman_decoder.cc +++ b/quiche/http2/hpack/huffman/hpack_huffman_decoder.cc @@ -460,7 +460,7 @@ bool HpackHuffmanDecoder::Decode(absl::string_view input, std::string* output) { bit_buffer_.ConsumeBits(prefix_info.code_length); continue; } - // Encoder is not supposed to explicity encode the EOS symbol. + // Encoder is not supposed to explicitly encode the EOS symbol. QUICHE_DLOG(ERROR) << "EOS explicitly encoded!\n " << bit_buffer_ << "\n " << prefix_info; return false; diff --git a/quiche/http2/hpack/huffman/hpack_huffman_decoder.h b/quiche/http2/hpack/huffman/hpack_huffman_decoder.h index 910aba592..bdf7fcbe5 100644 --- a/quiche/http2/hpack/huffman/hpack_huffman_decoder.h +++ b/quiche/http2/hpack/huffman/hpack_huffman_decoder.h @@ -112,7 +112,7 @@ class QUICHE_EXPORT HpackHuffmanDecoder { bool Decode(absl::string_view input, std::string* output); // Is what remains in the bit_buffer_ valid at the end of an encoded string? - // Call after passing the the final portion of a Huffman string to Decode, + // Call after passing the final portion of a Huffman string to Decode, // and getting true as the result. bool InputProperlyTerminated() const { return bit_buffer_.InputProperlyTerminated(); diff --git a/quiche/http2/hpack/varint/hpack_varint_decoder.h b/quiche/http2/hpack/varint/hpack_varint_decoder.h index af998a245..a6ef0b1d7 100644 --- a/quiche/http2/hpack/varint/hpack_varint_decoder.h +++ b/quiche/http2/hpack/varint/hpack_varint_decoder.h @@ -66,7 +66,7 @@ class QUICHE_EXPORT HpackVarintDecoder { // The caller has already determined that the encoding requires multiple // bytes, i.e. that the 3 to 8 low-order bits (the number determined by - // |prefix_length|) of the first byte are are all 1. |db| is the rest of the + // |prefix_length|) of the first byte are all 1. |db| is the rest of the // buffer, that is, not including the first byte. DecodeStatus StartExtended(uint8_t prefix_length, DecodeBuffer* db); diff --git a/quiche/http2/test_tools/http2_random.h b/quiche/http2/test_tools/http2_random.h index b4ec61883..ac4c0c75b 100644 --- a/quiche/http2/test_tools/http2_random.h +++ b/quiche/http2/test_tools/http2_random.h @@ -38,9 +38,9 @@ class QUICHE_NO_EXPORT Http2Random { // Returns a random 64-bit value. uint64_t Rand64(); - // Return a uniformly distrubted random number in [0, n). + // Return a uniformly distributed random number in [0, n). uint32_t Uniform(uint32_t n) { return Rand64() % n; } - // Return a uniformly distrubted random number in [lo, hi). + // Return a uniformly distributed random number in [lo, hi). uint64_t UniformInRange(uint64_t lo, uint64_t hi) { return lo + Rand64() % (hi - lo); } diff --git a/quiche/http2/test_tools/payload_decoder_base_test_util.h b/quiche/http2/test_tools/payload_decoder_base_test_util.h index 9f7a5f3a3..19793ed7b 100644 --- a/quiche/http2/test_tools/payload_decoder_base_test_util.h +++ b/quiche/http2/test_tools/payload_decoder_base_test_util.h @@ -81,7 +81,7 @@ class QUICHE_NO_EXPORT PayloadDecoderBaseTest : public RandomDecoderTest { DecodeStatus ResumeDecoding(DecodeBuffer* db) final; // Given the specified payload (without the common frame header), decode - // it with several partitionings of the payload. + // it with several partitions of the payload. ::testing::AssertionResult DecodePayloadAndValidateSeveralWays( absl::string_view payload, Validator validator); @@ -165,7 +165,7 @@ class QUICHE_NO_EXPORT AbstractPayloadDecoderTest // Returns random flags, but only those valid for the frame type, yet not // those that the DecoderPeer says will affect the decoding of the payload - // (e.g. the PRIORTY flag on a HEADERS frame or PADDED on DATA frames). + // (e.g. the PRIORITY flag on a HEADERS frame or PADDED on DATA frames). uint8_t RandFlags() { return Random().Rand8() & KnownFlagsMaskForFrameType(DecoderPeer::FrameType()) & @@ -188,7 +188,7 @@ class QUICHE_NO_EXPORT AbstractPayloadDecoderTest // Decode one frame's payload and confirm that the listener recorded the // expected FrameParts instance, and only FrameParts instance. The payload - // will be decoded several times with different partitionings of the payload, + // will be decoded several times with different partitions of the payload, // and after each the validator will be called. AssertionResult DecodePayloadAndValidateSeveralWays( absl::string_view payload, const FrameParts& expected) { @@ -204,7 +204,7 @@ class QUICHE_NO_EXPORT AbstractPayloadDecoderTest // Decode one frame's payload, expecting that the final status will be // kDecodeError, and that OnFrameSizeError will have been called on the // listener. The payload will be decoded several times with different - // partitionings of the payload. The type WrappedValidator is either + // partitions of the payload. The type WrappedValidator is either // RandomDecoderTest::Validator, RandomDecoderTest::NoArgValidator or // std::nullptr_t (not extra validation). template @@ -414,7 +414,7 @@ class QUICHE_NO_EXPORT AbstractPaddablePayloadDecoderTest fb.AppendUInt8(pad_length()); fb.AppendZeroes(pad_length()); QUICHE_VLOG(1) << "fb.size=" << fb.size(); - // Pick a random length for the payload that is shorter than neccesary. + // Pick a random length for the payload that is shorter than necessary. payload_length = Random().Uniform(fb.size()); } diff --git a/quiche/oblivious_http/oblivious_http_client.h b/quiche/oblivious_http/oblivious_http_client.h index 9527b68b7..e4733a53d 100644 --- a/quiche/oblivious_http/oblivious_http_client.h +++ b/quiche/oblivious_http/oblivious_http_client.h @@ -13,7 +13,7 @@ #include "quiche/oblivious_http/common/oblivious_http_header_key_config.h" namespace quiche { -// 1. Facilitates client side to intiate OHttp request flow by initializing the +// 1. Facilitates client side to initiate OHttp request flow by initializing the // HPKE public key obtained from server, and subsequently uses it to encrypt the // Binary HTTP request payload. // 2. After initializing this class with server's HPKE public key, users can @@ -58,7 +58,7 @@ class QUICHE_EXPORT ObliviousHttpClient { // After `CreateObliviousHttpRequest` operation, callers on client-side will // extract `oblivious_http_request_context` from the returned object - // `ObliviousHttpRequest` and pass in to this method in order to decrypt the + // `ObliviousHttpRequest` and pass into this method in order to decrypt the // response that's received from Gateway for the given request at hand. absl::StatusOr DecryptObliviousHttpResponse( std::string encrypted_data, diff --git a/quiche/oblivious_http/oblivious_http_gateway.h b/quiche/oblivious_http/oblivious_http_gateway.h index cd028415a..ba8e4aaa0 100644 --- a/quiche/oblivious_http/oblivious_http_gateway.h +++ b/quiche/oblivious_http/oblivious_http_gateway.h @@ -61,7 +61,7 @@ class QUICHE_EXPORT ObliviousHttpGateway { // After `DecryptObliviousHttpRequest` operation, callers on server-side will // extract `oblivious_http_request_context` from the returned object - // `ObliviousHttpRequest` and pass in to this method in order to handle the + // `ObliviousHttpRequest` and pass into this method in order to handle the // response flow back to the client. absl::StatusOr CreateObliviousHttpResponse( std::string plaintext_data, diff --git a/quiche/oblivious_http/oblivious_http_gateway_test.cc b/quiche/oblivious_http/oblivious_http_gateway_test.cc index af03b210c..49dc16203 100644 --- a/quiche/oblivious_http/oblivious_http_gateway_test.cc +++ b/quiche/oblivious_http/oblivious_http_gateway_test.cc @@ -116,14 +116,14 @@ TEST(ObliviousHttpGateway, TestObliviousResponseHandling) { auto instance = ObliviousHttpGateway::Create(GetHpkePrivateKey(), ohttp_key_config); ASSERT_TRUE(instance.ok()); - auto encapsualte_request_on_client = + auto encapsulate_request_on_client = ObliviousHttpRequest::CreateClientObliviousRequest( "test", GetHpkePublicKey(), ohttp_key_config); - ASSERT_TRUE(encapsualte_request_on_client.ok()); + ASSERT_TRUE(encapsulate_request_on_client.ok()); // Setup Recipient to allow setting up the HPKE context, and subsequently use // it to encrypt the response. auto decapsulated_req_on_server = instance->DecryptObliviousHttpRequest( - encapsualte_request_on_client->EncapsulateAndSerialize()); + encapsulate_request_on_client->EncapsulateAndSerialize()); ASSERT_TRUE(decapsulated_req_on_server.ok()); auto server_request_context = std::move(decapsulated_req_on_server.value()).ReleaseContext(); diff --git a/quiche/quic/core/batch_writer/quic_batch_writer_base.h b/quiche/quic/core/batch_writer/quic_batch_writer_base.h index 69cefbad3..9bb470cd0 100644 --- a/quiche/quic/core/batch_writer/quic_batch_writer_base.h +++ b/quiche/quic/core/batch_writer/quic_batch_writer_base.h @@ -16,7 +16,7 @@ namespace quic { // QuicBatchWriterBase implements logic common to all derived batch writers, -// including maintaining write blockage state and a skeleton implemention of +// including maintaining write blockage state and a skeleton implementation of // WritePacket(). // A derived batch writer must override the FlushImpl() function to send all // buffered writes in a batch. It must also override the CanBatch() function diff --git a/quiche/quic/core/chlo_extractor.cc b/quiche/quic/core/chlo_extractor.cc index a663432f1..3e132a7ed 100644 --- a/quiche/quic/core/chlo_extractor.cc +++ b/quiche/quic/core/chlo_extractor.cc @@ -77,7 +77,7 @@ class ChloFramerVisitor : public QuicFramerVisitorInterface, bool OnPaddingFrame(const QuicPaddingFrame& frame) override; bool OnMessageFrame(const QuicMessageFrame& frame) override; bool OnHandshakeDoneFrame(const QuicHandshakeDoneFrame& frame) override; - bool OnAckFrequencyFrame(const QuicAckFrequencyFrame& farme) override; + bool OnAckFrequencyFrame(const QuicAckFrequencyFrame& frame) override; void OnPacketComplete() override {} bool IsValidStatelessResetToken( const StatelessResetToken& token) const override; diff --git a/quiche/quic/core/congestion_control/bandwidth_sampler.cc b/quiche/quic/core/congestion_control/bandwidth_sampler.cc index fe42e083e..cedf91081 100644 --- a/quiche/quic/core/congestion_control/bandwidth_sampler.cc +++ b/quiche/quic/core/congestion_control/bandwidth_sampler.cc @@ -190,10 +190,10 @@ BandwidthSampler::~BandwidthSampler() {} void BandwidthSampler::OnPacketSent( QuicTime sent_time, QuicPacketNumber packet_number, QuicByteCount bytes, QuicByteCount bytes_in_flight, - HasRetransmittableData has_retransmittable_data) { + HasRetransmissibleData has_retransmissible_data) { last_sent_packet_ = packet_number; - if (has_retransmittable_data != HAS_RETRANSMITTABLE_DATA) { + if (has_retransmissible_data != HAS_RETRANSMISSIBLE_DATA) { return; } @@ -495,7 +495,7 @@ bool BandwidthSampler::ChooseA0Point(QuicByteCount total_bytes_acked, AckPoint* a0) { if (a0_candidates_.empty()) { QUIC_BUG(quic_bug_10437_5) - << "No A0 point candicates. total_bytes_acked:" << total_bytes_acked; + << "No A0 point candidates. total_bytes_acked:" << total_bytes_acked; return false; } diff --git a/quiche/quic/core/congestion_control/bandwidth_sampler.h b/quiche/quic/core/congestion_control/bandwidth_sampler.h index 87989dc73..dac868f96 100644 --- a/quiche/quic/core/congestion_control/bandwidth_sampler.h +++ b/quiche/quic/core/congestion_control/bandwidth_sampler.h @@ -77,7 +77,7 @@ struct QUICHE_EXPORT SendTimeState { }; struct QUICHE_EXPORT ExtraAckedEvent { - // The excess bytes acknowlwedged in the time delta for this event. + // The excess bytes acknowledged in the time delta for this event. QuicByteCount extra_acked = 0; // The bytes acknowledged and time delta from the event. @@ -195,7 +195,7 @@ class QUICHE_EXPORT BandwidthSamplerInterface { virtual void OnPacketSent( QuicTime sent_time, QuicPacketNumber packet_number, QuicByteCount bytes, QuicByteCount bytes_in_flight, - HasRetransmittableData has_retransmittable_data) = 0; + HasRetransmissibleData has_retransmissible_data) = 0; virtual void OnPacketNeutered(QuicPacketNumber packet_number) = 0; @@ -344,7 +344,7 @@ class QUICHE_EXPORT BandwidthSampler : public BandwidthSamplerInterface { void OnPacketSent(QuicTime sent_time, QuicPacketNumber packet_number, QuicByteCount bytes, QuicByteCount bytes_in_flight, - HasRetransmittableData has_retransmittable_data) override; + HasRetransmissibleData has_retransmissible_data) override; void OnPacketNeutered(QuicPacketNumber packet_number) override; CongestionEventSample OnCongestionEvent( diff --git a/quiche/quic/core/congestion_control/bandwidth_sampler_test.cc b/quiche/quic/core/congestion_control/bandwidth_sampler_test.cc index 97a0bf310..43bfebb11 100644 --- a/quiche/quic/core/congestion_control/bandwidth_sampler_test.cc +++ b/quiche/quic/core/congestion_control/bandwidth_sampler_test.cc @@ -75,17 +75,17 @@ class BandwidthSamplerTest : public QuicTestWithParam { } void SendPacketInner(uint64_t packet_number, QuicByteCount bytes, - HasRetransmittableData has_retransmittable_data) { + HasRetransmissibleData has_retransmissible_data) { sampler_.OnPacketSent(clock_.Now(), QuicPacketNumber(packet_number), bytes, - bytes_in_flight_, has_retransmittable_data); - if (has_retransmittable_data == HAS_RETRANSMITTABLE_DATA) { + bytes_in_flight_, has_retransmissible_data); + if (has_retransmissible_data == HAS_RETRANSMISSIBLE_DATA) { bytes_in_flight_ += bytes; } } void SendPacket(uint64_t packet_number) { SendPacketInner(packet_number, kRegularPacketSize, - HAS_RETRANSMITTABLE_DATA); + HAS_RETRANSMISSIBLE_DATA); } BandwidthSample AckPacketInner(uint64_t packet_number) { @@ -345,7 +345,7 @@ TEST_P(BandwidthSamplerTest, SendWithLosses) { } // Test the sampler in a scenario where the 50% of packets are not -// congestion controlled (specifically, non-retransmittable data is not +// congestion controlled (specifically, non-retransmissible data is not // congestion controlled). Should be functionally consistent in behavior with // the SendWithLosses test. TEST_P(BandwidthSamplerTest, NotCongestionControlled) { @@ -359,7 +359,7 @@ TEST_P(BandwidthSamplerTest, NotCongestionControlled) { for (int i = 1; i <= 20; i++) { SendPacketInner( i, kRegularPacketSize, - i % 2 == 0 ? HAS_RETRANSMITTABLE_DATA : NO_RETRANSMITTABLE_DATA); + i % 2 == 0 ? HAS_RETRANSMISSIBLE_DATA : NO_RETRANSMISSIBLE_DATA); clock_.AdvanceTime(time_between_packets); } @@ -374,7 +374,7 @@ TEST_P(BandwidthSamplerTest, NotCongestionControlled) { } SendPacketInner( i + 20, kRegularPacketSize, - i % 2 == 0 ? HAS_RETRANSMITTABLE_DATA : NO_RETRANSMITTABLE_DATA); + i % 2 == 0 ? HAS_RETRANSMISSIBLE_DATA : NO_RETRANSMISSIBLE_DATA); clock_.AdvanceTime(time_between_packets); } diff --git a/quiche/quic/core/congestion_control/bbr2_misc.cc b/quiche/quic/core/congestion_control/bbr2_misc.cc index f3306ec15..a4c9f0ea5 100644 --- a/quiche/quic/core/congestion_control/bbr2_misc.cc +++ b/quiche/quic/core/congestion_control/bbr2_misc.cc @@ -81,7 +81,7 @@ void Bbr2NetworkModel::OnPacketSent(QuicTime sent_time, QuicByteCount bytes_in_flight, QuicPacketNumber packet_number, QuicByteCount bytes, - HasRetransmittableData is_retransmittable) { + HasRetransmissibleData is_retransmissible) { // Updating the min here ensures a more realistic (0) value when flows exit // quiescence. if (bytes_in_flight < min_bytes_in_flight_in_round_) { @@ -93,7 +93,7 @@ void Bbr2NetworkModel::OnPacketSent(QuicTime sent_time, round_trip_counter_.OnPacketSent(packet_number); bandwidth_sampler_.OnPacketSent(sent_time, packet_number, bytes, - bytes_in_flight, is_retransmittable); + bytes_in_flight, is_retransmissible); } void Bbr2NetworkModel::OnCongestionEventStart( diff --git a/quiche/quic/core/congestion_control/bbr2_misc.h b/quiche/quic/core/congestion_control/bbr2_misc.h index c6219831f..19244658e 100644 --- a/quiche/quic/core/congestion_control/bbr2_misc.h +++ b/quiche/quic/core/congestion_control/bbr2_misc.h @@ -342,7 +342,7 @@ class QUICHE_EXPORT Bbr2NetworkModel { void OnPacketSent(QuicTime sent_time, QuicByteCount bytes_in_flight, QuicPacketNumber packet_number, QuicByteCount bytes, - HasRetransmittableData is_retransmittable); + HasRetransmissibleData is_retransmissible); void OnCongestionEventStart(QuicTime event_time, const AckedPacketVector& acked_packets, @@ -381,7 +381,7 @@ class QUICHE_EXPORT Bbr2NetworkModel { QuicTime MinRttTimestamp() const { return min_rtt_filter_.GetTimestamp(); } - // TODO(wub): If we do this too frequently, we can potentailly postpone + // TODO(wub): If we do this too frequently, we can potentially postpone // PROBE_RTT indefinitely. Observe how it works in production and improve it. void PostponeMinRttTimestamp(QuicTime::Delta duration) { min_rtt_filter_.ForceUpdate(MinRtt(), MinRttTimestamp() + duration); diff --git a/quiche/quic/core/congestion_control/bbr2_sender.cc b/quiche/quic/core/congestion_control/bbr2_sender.cc index 6f884d87a..7b61b38ca 100644 --- a/quiche/quic/core/congestion_control/bbr2_sender.cc +++ b/quiche/quic/core/congestion_control/bbr2_sender.cc @@ -439,7 +439,7 @@ QuicByteCount Bbr2Sender::GetTargetCongestionWindow(float gain) const { void Bbr2Sender::OnPacketSent(QuicTime sent_time, QuicByteCount bytes_in_flight, QuicPacketNumber packet_number, QuicByteCount bytes, - HasRetransmittableData is_retransmittable) { + HasRetransmissibleData is_retransmissible) { QUIC_DVLOG(3) << this << " OnPacketSent: pkn:" << packet_number << ", bytes:" << bytes << ", cwnd:" << cwnd_ << ", inflight:" << bytes_in_flight + bytes @@ -455,7 +455,7 @@ void Bbr2Sender::OnPacketSent(QuicTime sent_time, QuicByteCount bytes_in_flight, OnExitQuiescence(sent_time); } model_.OnPacketSent(sent_time, bytes_in_flight, packet_number, bytes, - is_retransmittable); + is_retransmissible); } void Bbr2Sender::OnPacketNeutered(QuicPacketNumber packet_number) { diff --git a/quiche/quic/core/congestion_control/bbr2_sender.h b/quiche/quic/core/congestion_control/bbr2_sender.h index a49cda10c..be7733bcc 100644 --- a/quiche/quic/core/congestion_control/bbr2_sender.h +++ b/quiche/quic/core/congestion_control/bbr2_sender.h @@ -61,7 +61,7 @@ class QUICHE_EXPORT Bbr2Sender final : public SendAlgorithmInterface { void OnPacketSent(QuicTime sent_time, QuicByteCount bytes_in_flight, QuicPacketNumber packet_number, QuicByteCount bytes, - HasRetransmittableData is_retransmittable) override; + HasRetransmissibleData is_retransmissible) override; void OnPacketNeutered(QuicPacketNumber packet_number) override; diff --git a/quiche/quic/core/congestion_control/bbr2_simulator_test.cc b/quiche/quic/core/congestion_control/bbr2_simulator_test.cc index 4a14fc739..df174d5b9 100644 --- a/quiche/quic/core/congestion_control/bbr2_simulator_test.cc +++ b/quiche/quic/core/congestion_control/bbr2_simulator_test.cc @@ -1746,7 +1746,7 @@ TEST_F(Bbr2DefaultTopologyTest, StartupStats) { const QuicConnectionStats& stats = sender_connection_stats(); // The test explicitly replaces the default-created send algorithm with the - // one created by the test. slowstart_count increaments every time a BBR + // one created by the test. slowstart_count increments every time a BBR // sender is created. EXPECT_GE(stats.slowstart_count, 1u); EXPECT_FALSE(stats.slowstart_duration.IsRunning()); @@ -1783,7 +1783,7 @@ TEST_F(Bbr2DefaultTopologyTest, ProbeUpAdaptInflightHiGradually) { // Send and Ack one packet to exit app limited and enter PROBE_UP. sender_->OnPacketSent(now, /*bytes_in_flight=*/0, next_packet_number++, - kDefaultMaxPacketSize, HAS_RETRANSMITTABLE_DATA); + kDefaultMaxPacketSize, HAS_RETRANSMISSIBLE_DATA); now = now + params.RTT(); sender_->OnCongestionEvent( /*rtt_updated=*/true, kDefaultMaxPacketSize, now, @@ -1795,7 +1795,7 @@ TEST_F(Bbr2DefaultTopologyTest, ProbeUpAdaptInflightHiGradually) { for (uint64_t i = 0; i < 2; ++i) { sender_->OnPacketSent(now, /*bytes_in_flight=*/i * kDefaultMaxPacketSize, next_packet_number++, kDefaultMaxPacketSize, - HAS_RETRANSMITTABLE_DATA); + HAS_RETRANSMISSIBLE_DATA); } now = now + params.RTT(); sender_->OnCongestionEvent( @@ -1878,7 +1878,7 @@ TEST_F(Bbr2DefaultTopologyTest, ProbeRttAfterQuiescenceImmediatelyExits) { EXPECT_EQ(sender_->ExportDebugState().mode, Bbr2Mode::PROBE_RTT); sender_->OnPacketSent(SimulatedNow(), /*bytes_in_flight=*/0, sender_unacked_map()->largest_sent_packet() + 1, - kDefaultMaxPacketSize, HAS_RETRANSMITTABLE_DATA); + kDefaultMaxPacketSize, HAS_RETRANSMISSIBLE_DATA); EXPECT_EQ(sender_->ExportDebugState().mode, Bbr2Mode::PROBE_BW); } @@ -1936,7 +1936,7 @@ TEST_F(Bbr2DefaultTopologyTest, SwitchToBbr2MidConnection) { now = now + QuicTime::Delta::FromMilliseconds(10); old_sender.OnPacketSent(now, /*bytes_in_flight=*/0, next_packet_number++, - /*bytes=*/1350, HAS_RETRANSMITTABLE_DATA); + /*bytes=*/1350, HAS_RETRANSMISSIBLE_DATA); } // Switch from |old_sender| to |sender_|. @@ -1947,18 +1947,18 @@ TEST_F(Bbr2DefaultTopologyTest, SwitchToBbr2MidConnection) { // Send packets 5-7. now = now + QuicTime::Delta::FromMilliseconds(10); sender_->OnPacketSent(now, /*bytes_in_flight=*/1350, next_packet_number++, - /*bytes=*/23, NO_RETRANSMITTABLE_DATA); + /*bytes=*/23, NO_RETRANSMISSIBLE_DATA); now = now + QuicTime::Delta::FromMilliseconds(10); sender_->OnPacketSent(now, /*bytes_in_flight=*/1350, next_packet_number++, - /*bytes=*/767, HAS_RETRANSMITTABLE_DATA); + /*bytes=*/767, HAS_RETRANSMISSIBLE_DATA); QuicByteCount bytes_in_flight = 767; while (next_packet_number < QuicPacketNumber(30)) { now = now + QuicTime::Delta::FromMilliseconds(10); bytes_in_flight += 1350; sender_->OnPacketSent(now, bytes_in_flight, next_packet_number++, - /*bytes=*/1350, HAS_RETRANSMITTABLE_DATA); + /*bytes=*/1350, HAS_RETRANSMISSIBLE_DATA); } // Ack 1 & 2. @@ -1974,7 +1974,7 @@ TEST_F(Bbr2DefaultTopologyTest, SwitchToBbr2MidConnection) { now = now + QuicTime::Delta::FromMilliseconds(10); bytes_in_flight += 1350; sender_->OnPacketSent(now, bytes_in_flight, next_packet_number++, - /*bytes=*/1350, HAS_RETRANSMITTABLE_DATA); + /*bytes=*/1350, HAS_RETRANSMISSIBLE_DATA); } // Ack 3. @@ -1988,7 +1988,7 @@ TEST_F(Bbr2DefaultTopologyTest, SwitchToBbr2MidConnection) { now = now + QuicTime::Delta::FromMilliseconds(10); bytes_in_flight += 1350; sender_->OnPacketSent(now, bytes_in_flight, next_packet_number++, - /*bytes=*/1350, HAS_RETRANSMITTABLE_DATA); + /*bytes=*/1350, HAS_RETRANSMISSIBLE_DATA); // Ack 4-7. acked = { diff --git a/quiche/quic/core/congestion_control/bbr_sender.cc b/quiche/quic/core/congestion_control/bbr_sender.cc index 322e7aa5d..103ad6b72 100644 --- a/quiche/quic/core/congestion_control/bbr_sender.cc +++ b/quiche/quic/core/congestion_control/bbr_sender.cc @@ -150,7 +150,7 @@ bool BbrSender::InSlowStart() const { return mode_ == STARTUP; } void BbrSender::OnPacketSent(QuicTime sent_time, QuicByteCount bytes_in_flight, QuicPacketNumber packet_number, QuicByteCount bytes, - HasRetransmittableData is_retransmittable) { + HasRetransmissibleData is_retransmissible) { if (stats_ && InSlowStart()) { ++stats_->slowstart_packets_sent; stats_->slowstart_bytes_sent += bytes; @@ -163,7 +163,7 @@ void BbrSender::OnPacketSent(QuicTime sent_time, QuicByteCount bytes_in_flight, } sampler_.OnPacketSent(sent_time, packet_number, bytes, bytes_in_flight, - is_retransmittable); + is_retransmissible); } void BbrSender::OnPacketNeutered(QuicPacketNumber packet_number) { diff --git a/quiche/quic/core/congestion_control/bbr_sender.h b/quiche/quic/core/congestion_control/bbr_sender.h index 61ad9465d..dc4fafc5c 100644 --- a/quiche/quic/core/congestion_control/bbr_sender.h +++ b/quiche/quic/core/congestion_control/bbr_sender.h @@ -116,7 +116,7 @@ class QUICHE_EXPORT BbrSender : public SendAlgorithmInterface { QuicPacketCount num_ce) override; void OnPacketSent(QuicTime sent_time, QuicByteCount bytes_in_flight, QuicPacketNumber packet_number, QuicByteCount bytes, - HasRetransmittableData is_retransmittable) override; + HasRetransmissibleData is_retransmissible) override; void OnPacketNeutered(QuicPacketNumber packet_number) override; void OnRetransmissionTimeout(bool /*packets_retransmitted*/) override {} void OnConnectionMigration() override {} @@ -218,7 +218,7 @@ class QUICHE_EXPORT BbrSender : public SendAlgorithmInterface { // Updates the ack aggregation max filter in bytes. // Returns the most recent addition to the filter, or |newly_acked_bytes| if - // nothing was fed in to the filter. + // nothing was fed into the filter. QuicByteCount UpdateAckAggregationBytes(QuicTime ack_time, QuicByteCount newly_acked_bytes); diff --git a/quiche/quic/core/congestion_control/cubic_bytes_test.cc b/quiche/quic/core/congestion_control/cubic_bytes_test.cc index 4899d516b..624ea41f0 100644 --- a/quiche/quic/core/congestion_control/cubic_bytes_test.cc +++ b/quiche/quic/core/congestion_control/cubic_bytes_test.cc @@ -171,7 +171,7 @@ TEST_F(CubicBytesTest, DISABLED_AboveOrigin) { current_cwnd = cubic_.CongestionWindowAfterAck( kDefaultTCPMSS, current_cwnd, rtt_min, clock_.ApproximateNow()); // When we fix convex mode and the uint64 arithmetic, we - // increase the expected_cwnd only after after the first 100ms, + // increase the expected_cwnd only after the first 100ms, // rather than after the initial 1ms. expected_cwnd += kDefaultTCPMSS; ASSERT_NEAR(expected_cwnd, current_cwnd, kDefaultTCPMSS); @@ -245,7 +245,7 @@ TEST_F(CubicBytesTest, AboveOriginFineGrainedCubing) { } // Constructs an artificial scenario to show what happens when we -// allow per-ack updates, rather than limititing update freqency. In +// allow per-ack updates, rather than limiting update frequency. In // this scenario, the first two acks of the epoch produce the same // cwnd. When we limit per-ack updates, this would cause the // cessation of cubic updates for 30ms. When we allow per-ack @@ -287,7 +287,7 @@ TEST_F(CubicBytesTest, PerAckUpdates) { const QuicByteCount next_cwnd = cubic_.CongestionWindowAfterAck( kDefaultTCPMSS, current_cwnd, rtt_min, clock_.ApproximateNow()); reno_cwnd = RenoCwndInBytes(reno_cwnd); - // The window shoud increase on every ack. + // The window should increase on every ack. ASSERT_LT(current_cwnd, next_cwnd); ASSERT_EQ(reno_cwnd, next_cwnd); current_cwnd = next_cwnd; diff --git a/quiche/quic/core/congestion_control/general_loss_algorithm_test.cc b/quiche/quic/core/congestion_control/general_loss_algorithm_test.cc index 8fa22e037..563f15df8 100644 --- a/quiche/quic/core/congestion_control/general_loss_algorithm_test.cc +++ b/quiche/quic/core/congestion_control/general_loss_algorithm_test.cc @@ -41,7 +41,7 @@ class GeneralLossAlgorithmTest : public QuicTest { SerializedPacket packet(QuicPacketNumber(packet_number), PACKET_1BYTE_PACKET_NUMBER, nullptr, encrypted_length, false, false); - packet.retransmittable_frames.push_back(QuicFrame(frame)); + packet.retransmissible_frames.push_back(QuicFrame(frame)); unacked_packets_.AddSentPacket(&packet, NOT_RETRANSMISSION, clock_.Now(), true, true, ECN_NOT_ECT); } @@ -232,7 +232,7 @@ TEST_F(GeneralLossAlgorithmTest, DontEarlyRetransmitNeuteredPacket) { } AckedPacketVector packets_acked; // Neuter packet 1. - unacked_packets_.RemoveRetransmittability(QuicPacketNumber(1)); + unacked_packets_.RemoveRetransmissibility(QuicPacketNumber(1)); clock_.AdvanceTime(rtt_stats_.smoothed_rtt()); // Early retransmit when the final packet gets acked and the first is nacked. diff --git a/quiche/quic/core/congestion_control/hybrid_slow_start.h b/quiche/quic/core/congestion_control/hybrid_slow_start.h index 5ba7599e4..b04abbdec 100644 --- a/quiche/quic/core/congestion_control/hybrid_slow_start.h +++ b/quiche/quic/core/congestion_control/hybrid_slow_start.h @@ -5,7 +5,7 @@ // This class is a helper class to TcpCubicSender. // Slow start is the initial startup phase of TCP, it lasts until first packet // loss. This class implements hybrid slow start of the TCP cubic send side -// congestion algorithm. The key feaure of hybrid slow start is that it tries to +// congestion algorithm. The key feature of hybrid slow start is that it tries to // avoid running into the wall too hard during the slow start phase, which // the traditional TCP implementation does. // This does not implement ack train detection because it interacts poorly with diff --git a/quiche/quic/core/congestion_control/pacing_sender.cc b/quiche/quic/core/congestion_control/pacing_sender.cc index b7ef73ce8..1cc0b70b5 100644 --- a/quiche/quic/core/congestion_control/pacing_sender.cc +++ b/quiche/quic/core/congestion_control/pacing_sender.cc @@ -54,14 +54,14 @@ void PacingSender::OnCongestionEvent(bool rtt_updated, void PacingSender::OnPacketSent( QuicTime sent_time, QuicByteCount bytes_in_flight, QuicPacketNumber packet_number, QuicByteCount bytes, - HasRetransmittableData has_retransmittable_data) { + HasRetransmissibleData has_retransmissible_data) { QUICHE_DCHECK(sender_ != nullptr); QUIC_DVLOG(3) << "Packet " << packet_number << " with " << bytes << " bytes sent at " << sent_time << ". bytes_in_flight: " << bytes_in_flight; sender_->OnPacketSent(sent_time, bytes_in_flight, packet_number, bytes, - has_retransmittable_data); - if (has_retransmittable_data != HAS_RETRANSMITTABLE_DATA) { + has_retransmissible_data); + if (has_retransmissible_data != HAS_RETRANSMISSIBLE_DATA) { return; } diff --git a/quiche/quic/core/congestion_control/pacing_sender.h b/quiche/quic/core/congestion_control/pacing_sender.h index 239f74521..ec045c85f 100644 --- a/quiche/quic/core/congestion_control/pacing_sender.h +++ b/quiche/quic/core/congestion_control/pacing_sender.h @@ -58,7 +58,7 @@ class QUICHE_EXPORT PacingSender { void OnPacketSent(QuicTime sent_time, QuicByteCount bytes_in_flight, QuicPacketNumber packet_number, QuicByteCount bytes, - HasRetransmittableData has_retransmittable_data); + HasRetransmissibleData has_retransmissible_data); // Called when application throttles the sending, so that pacing sender stops // making up for lost time. @@ -87,7 +87,7 @@ class QUICHE_EXPORT PacingSender { // Underlying sender. Not owned. SendAlgorithmInterface* sender_; - // If not QuicBandidth::Zero, the maximum rate the PacingSender will use. + // If not QuicBandwidth::Zero, the maximum rate the PacingSender will use. QuicBandwidth max_pacing_rate_; // Number of unpaced packets to be sent before packets are delayed. diff --git a/quiche/quic/core/congestion_control/pacing_sender_test.cc b/quiche/quic/core/congestion_control/pacing_sender_test.cc index ad82b9b9e..0c994d1c7 100644 --- a/quiche/quic/core/congestion_control/pacing_sender_test.cc +++ b/quiche/quic/core/congestion_control/pacing_sender_test.cc @@ -69,12 +69,12 @@ class PacingSenderTest : public QuicTest { lost_packets, 0, 0); } else if (burst_size != kInitialBurstPackets) { QUIC_LOG(FATAL) << "Unsupported burst_size " << burst_size - << " specificied, only 0 and " << kInitialBurstPackets + << " specified, only 0 and " << kInitialBurstPackets << " are supported."; } } - void CheckPacketIsSentImmediately(HasRetransmittableData retransmittable_data, + void CheckPacketIsSentImmediately(HasRetransmissibleData retransmissible_data, QuicByteCount prior_in_flight, bool in_recovery, QuicPacketCount cwnd) { // In order for the packet to be sendable, the underlying sender must @@ -95,7 +95,7 @@ class PacingSenderTest : public QuicTest { } EXPECT_CALL(*mock_sender_, OnPacketSent(clock_.Now(), prior_in_flight, packet_number_, - kMaxOutgoingPacketSize, retransmittable_data)); + kMaxOutgoingPacketSize, retransmissible_data)); EXPECT_CALL(*mock_sender_, GetCongestionWindow()) .WillRepeatedly(Return(cwnd * kDefaultTCPMSS)); EXPECT_CALL(*mock_sender_, @@ -105,11 +105,11 @@ class PacingSenderTest : public QuicTest { (cwnd * kDefaultTCPMSS))); pacing_sender_->OnPacketSent(clock_.Now(), prior_in_flight, packet_number_++, kMaxOutgoingPacketSize, - retransmittable_data); + retransmissible_data); } void CheckPacketIsSentImmediately() { - CheckPacketIsSentImmediately(HAS_RETRANSMITTABLE_DATA, kBytesInFlight, + CheckPacketIsSentImmediately(HAS_RETRANSMISSIBLE_DATA, kBytesInFlight, false, 10); } @@ -251,7 +251,7 @@ TEST_F(PacingSenderTest, InitialBurst) { CheckPacketIsSentImmediately(); // Next time TimeUntilSend is called with no bytes in flight, pacing should // allow a packet to be sent, and when it's sent, the tokens are refilled. - CheckPacketIsSentImmediately(HAS_RETRANSMITTABLE_DATA, 0, false, 10); + CheckPacketIsSentImmediately(HAS_RETRANSMISSIBLE_DATA, 0, false, 10); for (int i = 0; i < kInitialBurstPackets - 1; ++i) { CheckPacketIsSentImmediately(); } @@ -295,7 +295,7 @@ TEST_F(PacingSenderTest, InitialBurstNoRttMeasurement) { // Next time TimeUntilSend is called with no bytes in flight, the tokens // should be refilled and there should be no delay. - CheckPacketIsSentImmediately(HAS_RETRANSMITTABLE_DATA, 0, false, 10); + CheckPacketIsSentImmediately(HAS_RETRANSMISSIBLE_DATA, 0, false, 10); // Send 10 packets, and verify that they are not paced. for (int i = 0; i < kInitialBurstPackets - 1; ++i) { CheckPacketIsSentImmediately(); @@ -343,7 +343,7 @@ TEST_F(PacingSenderTest, FastSending) { // Next time TimeUntilSend is called with no bytes in flight, the tokens // should be refilled and there should be no delay. - CheckPacketIsSentImmediately(HAS_RETRANSMITTABLE_DATA, 0, false, 10); + CheckPacketIsSentImmediately(HAS_RETRANSMISSIBLE_DATA, 0, false, 10); for (int i = 0; i < kInitialBurstPackets - 1; ++i) { CheckPacketIsSentImmediately(); } @@ -395,7 +395,7 @@ TEST_F(PacingSenderTest, NoBurstInRecovery) { UpdateRtt(); // Ensure only one packet is sent immediately and the rest are paced. - CheckPacketIsSentImmediately(HAS_RETRANSMITTABLE_DATA, 0, true, 10); + CheckPacketIsSentImmediately(HAS_RETRANSMISSIBLE_DATA, 0, true, 10); CheckPacketIsSentImmediately(); CheckPacketIsDelayed(QuicTime::Delta::FromMilliseconds(2)); } @@ -419,7 +419,7 @@ TEST_F(PacingSenderTest, CwndLimited) { // This test is slightly odd because bytes_in_flight is calculated using // kMaxOutgoingPacketSize and CWND is calculated using kDefaultTCPMSS, // which is 8 bytes larger, so 3 packets can be sent for a CWND of 2. - CheckPacketIsSentImmediately(HAS_RETRANSMITTABLE_DATA, + CheckPacketIsSentImmediately(HAS_RETRANSMISSIBLE_DATA, 2 * kMaxOutgoingPacketSize, false, 2); clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(100)); @@ -475,12 +475,12 @@ TEST_F(PacingSenderTest, LumpyPacingWithInitialBurstToken) { // This test is slightly odd because bytes_in_flight is calculated using // kMaxOutgoingPacketSize and CWND is calculated using kDefaultTCPMSS, // which is 8 bytes larger, so 21 packets can be sent for a CWND of 20. - CheckPacketIsSentImmediately(HAS_RETRANSMITTABLE_DATA, + CheckPacketIsSentImmediately(HAS_RETRANSMISSIBLE_DATA, 20 * kMaxOutgoingPacketSize, false, 20); clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(100)); // Suppose cwnd size is 5, so that lumpy size becomes 2. - CheckPacketIsSentImmediately(HAS_RETRANSMITTABLE_DATA, kBytesInFlight, false, + CheckPacketIsSentImmediately(HAS_RETRANSMISSIBLE_DATA, kBytesInFlight, false, 5); CheckPacketIsSentImmediately(); // Packet 24 will be delayed 2ms. @@ -528,13 +528,13 @@ TEST_F(PacingSenderTest, NoBurstsForLumpyPacingWithAckAggregation) { CheckPacketIsSentImmediately(); } // The last packet of the burst causes the sender to be CWND limited. - CheckPacketIsSentImmediately(HAS_RETRANSMITTABLE_DATA, + CheckPacketIsSentImmediately(HAS_RETRANSMISSIBLE_DATA, 10 * kMaxOutgoingPacketSize, false, 10); // The last sent packet made the connection CWND limited, so no lumpy tokens // should be available. EXPECT_EQ(0u, pacing_sender_->lumpy_tokens()); - CheckPacketIsSentImmediately(HAS_RETRANSMITTABLE_DATA, + CheckPacketIsSentImmediately(HAS_RETRANSMISSIBLE_DATA, 10 * kMaxOutgoingPacketSize, false, 10); EXPECT_EQ(0u, pacing_sender_->lumpy_tokens()); CheckPacketIsDelayed(2 * inter_packet_delay); diff --git a/quiche/quic/core/congestion_control/send_algorithm_interface.h b/quiche/quic/core/congestion_control/send_algorithm_interface.h index ba471bae8..bb6f653e2 100644 --- a/quiche/quic/core/congestion_control/send_algorithm_interface.h +++ b/quiche/quic/core/congestion_control/send_algorithm_interface.h @@ -93,12 +93,12 @@ class QUICHE_EXPORT SendAlgorithmInterface { QuicPacketCount num_ce) = 0; // Inform that we sent |bytes| to the wire, and if the packet is - // retransmittable. |bytes_in_flight| is the number of bytes in flight before + // retransmissible. |bytes_in_flight| is the number of bytes in flight before // the packet was sent. // Note: this function must be called for every packet sent to the wire. virtual void OnPacketSent(QuicTime sent_time, QuicByteCount bytes_in_flight, QuicPacketNumber packet_number, QuicByteCount bytes, - HasRetransmittableData is_retransmittable) = 0; + HasRetransmissibleData is_retransmissible) = 0; // Inform that |packet_number| has been neutered. virtual void OnPacketNeutered(QuicPacketNumber packet_number) = 0; @@ -153,7 +153,7 @@ class QUICHE_EXPORT SendAlgorithmInterface { // Called when the connection has no outstanding data to send. Specifically, // this means that none of the data streams are write-blocked, there are no - // packets in the connection queue, and there are no pending retransmissins, + // packets in the connection queue, and there are no pending retransmissions, // i.e. the sender cannot send anything for reasons other than being blocked // by congestion controller. This includes cases when the connection is // blocked by the flow controller. diff --git a/quiche/quic/core/congestion_control/tcp_cubic_sender_bytes.cc b/quiche/quic/core/congestion_control/tcp_cubic_sender_bytes.cc index 610bce71c..8dabc7d3f 100644 --- a/quiche/quic/core/congestion_control/tcp_cubic_sender_bytes.cc +++ b/quiche/quic/core/congestion_control/tcp_cubic_sender_bytes.cc @@ -131,12 +131,12 @@ void TcpCubicSenderBytes::OnPacketAcked(QuicPacketNumber acked_packet_number, void TcpCubicSenderBytes::OnPacketSent( QuicTime /*sent_time*/, QuicByteCount /*bytes_in_flight*/, QuicPacketNumber packet_number, QuicByteCount bytes, - HasRetransmittableData is_retransmittable) { + HasRetransmissibleData is_retransmissible) { if (InSlowStart()) { ++(stats_->slowstart_packets_sent); } - if (is_retransmittable != HAS_RETRANSMITTABLE_DATA) { + if (is_retransmissible != HAS_RETRANSMISSIBLE_DATA) { return; } if (InRecovery()) { diff --git a/quiche/quic/core/congestion_control/tcp_cubic_sender_bytes.h b/quiche/quic/core/congestion_control/tcp_cubic_sender_bytes.h index cc6aa4e50..80e948fc6 100644 --- a/quiche/quic/core/congestion_control/tcp_cubic_sender_bytes.h +++ b/quiche/quic/core/congestion_control/tcp_cubic_sender_bytes.h @@ -59,7 +59,7 @@ class QUICHE_EXPORT TcpCubicSenderBytes : public SendAlgorithmInterface { QuicPacketCount num_ce) override; void OnPacketSent(QuicTime sent_time, QuicByteCount bytes_in_flight, QuicPacketNumber packet_number, QuicByteCount bytes, - HasRetransmittableData is_retransmittable) override; + HasRetransmissibleData is_retransmissible) override; void OnPacketNeutered(QuicPacketNumber /*packet_number*/) override {} void OnRetransmissionTimeout(bool packets_retransmitted) override; bool CanSend(QuicByteCount bytes_in_flight) override; diff --git a/quiche/quic/core/congestion_control/tcp_cubic_sender_bytes_test.cc b/quiche/quic/core/congestion_control/tcp_cubic_sender_bytes_test.cc index 919233a49..318bf41bc 100644 --- a/quiche/quic/core/congestion_control/tcp_cubic_sender_bytes_test.cc +++ b/quiche/quic/core/congestion_control/tcp_cubic_sender_bytes_test.cc @@ -68,7 +68,7 @@ class TcpCubicSenderBytesTest : public QuicTest { while (can_send) { sender_->OnPacketSent(clock_.Now(), bytes_in_flight_, QuicPacketNumber(packet_number_++), kDefaultTCPMSS, - HAS_RETRANSMITTABLE_DATA); + HAS_RETRANSMISSIBLE_DATA); ++packets_sent; bytes_in_flight_ += kDefaultTCPMSS; can_send = sender_->CanSend(bytes_in_flight_); diff --git a/quiche/quic/core/congestion_control/uber_loss_algorithm_test.cc b/quiche/quic/core/congestion_control/uber_loss_algorithm_test.cc index f84084777..fc9e4d8d5 100644 --- a/quiche/quic/core/congestion_control/uber_loss_algorithm_test.cc +++ b/quiche/quic/core/congestion_control/uber_loss_algorithm_test.cc @@ -51,7 +51,7 @@ class UberLossAlgorithmTest : public QuicTest { PACKET_1BYTE_PACKET_NUMBER, nullptr, kDefaultLength, false, false); packet.encryption_level = encryption_level; - packet.retransmittable_frames.push_back(QuicFrame(frame)); + packet.retransmissible_frames.push_back(QuicFrame(frame)); unacked_packets_->AddSentPacket(&packet, NOT_RETRANSMISSION, clock_.Now(), true, true, ECN_NOT_ECT); } @@ -297,7 +297,7 @@ TEST_F(UberLossAlgorithmTest, LossDetectionTuning_OnMinRttAvailableFirst) { EXPECT_EQ(old_reordering_threshold, loss_algorithm_.GetPacketReorderingThreshold()); - // Pretend a reodering has happened. + // Pretend a reordering has happened. loss_algorithm_.OnReorderingDetected(); EXPECT_FALSE(test_tuner->start_called()); @@ -343,7 +343,7 @@ TEST_F(UberLossAlgorithmTest, LossDetectionTuning_StartFailed) { EXPECT_EQ(old_reordering_threshold, loss_algorithm_.GetPacketReorderingThreshold()); - // Pretend a reodering has happened. + // Pretend a reordering has happened. loss_algorithm_.OnReorderingDetected(); EXPECT_FALSE(test_tuner->start_called()); diff --git a/quiche/quic/core/crypto/cert_compressor.h b/quiche/quic/core/crypto/cert_compressor.h index 2e3fe422f..c430fcedc 100644 --- a/quiche/quic/core/crypto/cert_compressor.h +++ b/quiche/quic/core/crypto/cert_compressor.h @@ -15,7 +15,7 @@ namespace quic { // CertCompressor provides functions for compressing and decompressing -// certificate chains using two techniquies: +// certificate chains using two techniques: // 1) The peer may provide a list of a 64-bit, FNV-1a hashes of certificates // that they already have. In the event that one of them is to be // compressed, it can be replaced with just the hash. diff --git a/quiche/quic/core/crypto/certificate_view.h b/quiche/quic/core/crypto/certificate_view.h index 4a190a031..70a0d41b1 100644 --- a/quiche/quic/core/crypto/certificate_view.h +++ b/quiche/quic/core/crypto/certificate_view.h @@ -34,7 +34,7 @@ struct QUICHE_EXPORT PemReadResult { // Reads |input| line-by-line and returns the next available PEM message. QUICHE_EXPORT PemReadResult ReadNextPemMessage(std::istream* input); -// Cryptograhpic algorithms recognized in X.509. +// Cryptographic algorithms recognized in X.509. enum class PublicKeyType { kRsa, kP256, diff --git a/quiche/quic/core/crypto/client_proof_source.h b/quiche/quic/core/crypto/client_proof_source.h index f2ceb1268..0afa6275a 100644 --- a/quiche/quic/core/crypto/client_proof_source.h +++ b/quiche/quic/core/crypto/client_proof_source.h @@ -32,7 +32,7 @@ class QUICHE_EXPORT ClientProofSource { // Get the client certificate to be sent to the server with |server_hostname| // and its corresponding private key. It returns nullptr if the cert and key - // can not be found. + // cannot be found. // // |server_hostname| is typically a full domain name(www.foo.com), but it // could also be a wildcard domain(*.foo.com), or a "*" which will return the diff --git a/quiche/quic/core/crypto/client_proof_source_test.cc b/quiche/quic/core/crypto/client_proof_source_test.cc index a35e0aa87..27dae96d6 100644 --- a/quiche/quic/core/crypto/client_proof_source_test.cc +++ b/quiche/quic/core/crypto/client_proof_source_test.cc @@ -196,7 +196,7 @@ TEST(DefaultClientProofSource, BadCerts) { bool ok; EXPECT_QUIC_BUG( ok = proof_source.AddCertAndKey({"*"}, BadCertChain(), TestPrivateKey()), - "Unabled to parse leaf certificate"); + "Unable to parse leaf certificate"); ASSERT_FALSE(ok); EXPECT_EQ(proof_source.GetCertAndKey("*"), nullptr); } diff --git a/quiche/quic/core/crypto/crypto_framer.cc b/quiche/quic/core/crypto/crypto_framer.cc index 57a949ed6..452596bd3 100644 --- a/quiche/quic/core/crypto/crypto_framer.cc +++ b/quiche/quic/core/crypto/crypto_framer.cc @@ -310,7 +310,7 @@ QuicErrorCode CryptoFramer::Process(absl::string_view input) { if (!process_truncated_messages_) { break; } - QUIC_LOG(ERROR) << "Trunacted message. Missing " + QUIC_LOG(ERROR) << "Truncated message. Missing " << values_len_ - reader.BytesRemaining() << " bytes."; } for (const std::pair& item : tags_and_lengths_) { diff --git a/quiche/quic/core/crypto/crypto_framer.h b/quiche/quic/core/crypto/crypto_framer.h index 7bcb89e7e..27559e774 100644 --- a/quiche/quic/core/crypto/crypto_framer.h +++ b/quiche/quic/core/crypto/crypto_framer.h @@ -93,7 +93,7 @@ class QUICHE_EXPORT CryptoFramer : public CryptoMessageParser { // Clears per-message state. Does not clear the visitor. void Clear(); - // Process does does the work of |ProcessInput|, but returns an error code, + // Process does the work of |ProcessInput|, but returns an error code, // doesn't set error_ and doesn't call |visitor_->OnError()|. QuicErrorCode Process(absl::string_view input); diff --git a/quiche/quic/core/crypto/crypto_protocol.h b/quiche/quic/core/crypto/crypto_protocol.h index 9efae968b..68a4f1a2a 100644 --- a/quiche/quic/core/crypto/crypto_protocol.h +++ b/quiche/quic/core/crypto/crypto_protocol.h @@ -162,14 +162,14 @@ const QuicTag kBSAO = TAG('B', 'S', 'A', 'O'); // Avoid Overestimation in // Bandwidth Sampler with ack // aggregation const QuicTag kB2DL = TAG('B', '2', 'D', 'L'); // Increase inflight_hi based - // on delievered, not inflight. + // on delivered, not inflight. const QuicTag kB201 = TAG('B', '2', '0', '1'); // DEPRECATED const QuicTag kB202 = TAG('B', '2', '0', '2'); // Do not exit PROBE_UP if // inflight dips below 1.25*BW. const QuicTag kB203 = TAG('B', '2', '0', '3'); // Ignore inflight_hi until // PROBE_UP is exited. const QuicTag kB204 = TAG('B', '2', '0', '4'); // Reduce extra acked when - // MaxBW incrases. + // MaxBW increases. const QuicTag kB205 = TAG('B', '2', '0', '5'); // Add extra acked to CWND in // STARTUP. const QuicTag kB206 = TAG('B', '2', '0', '6'); // Exit STARTUP after 2 losses. @@ -412,7 +412,7 @@ const QuicTag kIGNP = TAG('I', 'G', 'N', 'P'); // Do not use PING only packet // for RTT measure or // congestion control. -const QuicTag kSRWP = TAG('S', 'R', 'W', 'P'); // Enable retransmittable on +const QuicTag kSRWP = TAG('S', 'R', 'W', 'P'); // Enable retransmissible on // wire PING (ROWP) on the // server side. const QuicTag kROWF = TAG('R', 'O', 'W', 'F'); // Send first 1-RTT packet on diff --git a/quiche/quic/core/crypto/crypto_utils.h b/quiche/quic/core/crypto/crypto_utils.h index 12822aa13..14959461d 100644 --- a/quiche/quic/core/crypto/crypto_utils.h +++ b/quiche/quic/core/crypto/crypto_utils.h @@ -42,7 +42,7 @@ class QUICHE_EXPORT CryptoUtils { PENDING, // Key diversification will happen when a nonce is later // received. This should only be used by clients initial - // decrypters which are waiting on the divesification nonce + // decrypters which are waiting on the diversification nonce // from the server. NOW, // Key diversification will happen immediate based on the nonce. @@ -145,11 +145,11 @@ class QUICHE_EXPORT CryptoUtils { // If |pre_shared_key| is non-empty, it is incorporated into the key // derivation parameters. If it is empty, the key derivation is unaltered. // - // If the mode of |diversification| is NEVER, the the crypters will be + // If the mode of |diversification| is NEVER, the crypters will be // configured to never perform key diversification. If the mode is // NOW (which is only for servers, then the encrypter will be keyed via a // two-step process that uses the nonce from |diversification|. - // If the mode is PENDING (which is only for servres), then the + // If the mode is PENDING (which is only for servers), then the // decrypter will only be keyed to a preliminary state: a call to // |SetDiversificationNonce| with a diversification nonce will be needed to // complete keying. @@ -190,7 +190,7 @@ class QUICHE_EXPORT CryptoUtils { // Validates that |client_hello| is actually a CHLO and that this is not part // of a downgrade attack. - // This includes verifiying versions and detecting downgrade attacks. + // This includes verifying versions and detecting downgrade attacks. // // Returns QUIC_NO_ERROR if this is the case or returns the appropriate error // code and sets |error_details|. diff --git a/quiche/quic/core/crypto/key_exchange.h b/quiche/quic/core/crypto/key_exchange.h index 029a283a6..b1e7f67a2 100644 --- a/quiche/quic/core/crypto/key_exchange.h +++ b/quiche/quic/core/crypto/key_exchange.h @@ -32,7 +32,7 @@ class QUICHE_EXPORT AsynchronousKeyExchange { // Invoked upon completion of CalculateSharedKeysAsync. // // |ok| indicates whether the operation completed successfully. If false, - // then the value pointed to by |shared_key| passed in to + // then the value pointed to by |shared_key| passed into // CalculateSharedKeyAsync is undefined. virtual void Run(bool ok) = 0; @@ -61,7 +61,7 @@ class QUICHE_EXPORT SynchronousKeyExchange : public AsynchronousKeyExchange { public: virtual ~SynchronousKeyExchange() = default; - // AyncKeyExchange API. Note that this method is marked 'final.' Subclasses + // AsyncKeyExchange API. Note that this method is marked 'final.' Subclasses // should implement CalculateSharedKeySync only. void CalculateSharedKeyAsync(absl::string_view peer_public_value, std::string* shared_key, diff --git a/quiche/quic/core/crypto/proof_source.cc b/quiche/quic/core/crypto/proof_source.cc index b340bc546..9eefdaf32 100644 --- a/quiche/quic/core/crypto/proof_source.cc +++ b/quiche/quic/core/crypto/proof_source.cc @@ -44,7 +44,7 @@ bool ValidateCertAndKey( CertificateView::ParseSingleCertificate(chain->certs[0]); if (leaf == nullptr) { QUIC_BUG(quic_proof_source_unparsable_leaf_cert) - << "Unabled to parse leaf certificate"; + << "Unable to parse leaf certificate"; return false; } diff --git a/quiche/quic/core/crypto/proof_source.h b/quiche/quic/core/crypto/proof_source.h index 01907c1b8..3f2a08a7d 100644 --- a/quiche/quic/core/crypto/proof_source.h +++ b/quiche/quic/core/crypto/proof_source.h @@ -134,7 +134,7 @@ class QUICHE_EXPORT ProofSource { // The signature uses SHA-256 as the hash function when the key is ECDSA. // The signature may use an ECDSA key. // - // The signature depends on |chlo_hash| which means that the signature can not + // The signature depends on |chlo_hash| which means that the signature cannot // be cached. // // |hostname| may be empty to signify that a default certificate should be diff --git a/quiche/quic/core/crypto/proof_source_x509.h b/quiche/quic/core/crypto/proof_source_x509.h index 37b3246d3..8c773abc9 100644 --- a/quiche/quic/core/crypto/proof_source_x509.h +++ b/quiche/quic/core/crypto/proof_source_x509.h @@ -69,7 +69,7 @@ class QUICHE_EXPORT ProofSourceX509 : public ProofSource { CertificatePrivateKey key; }; - // Looks up certficiate for hostname, returns the default if no certificate is + // Looks up certificate for hostname, returns the default if no certificate is // found. Certificate* GetCertificate(const std::string& hostname, bool* cert_matched_sni) const; diff --git a/quiche/quic/core/crypto/proof_verifier.h b/quiche/quic/core/crypto/proof_verifier.h index b7717848b..c5a955825 100644 --- a/quiche/quic/core/crypto/proof_verifier.h +++ b/quiche/quic/core/crypto/proof_verifier.h @@ -42,7 +42,7 @@ class QUICHE_EXPORT ProofVerifierCallback { virtual ~ProofVerifierCallback() {} // Run is called on the original thread to mark the completion of an - // asynchonous verification. If |ok| is true then the certificate is valid + // asynchronous verification. If |ok| is true then the certificate is valid // and |error_details| is unused. Otherwise, |error_details| contains a // description of the error. |details| contains implementation-specific // details of the verification. |Run| may take ownership of |details| by diff --git a/quiche/quic/core/crypto/quic_client_session_cache.cc b/quiche/quic/core/crypto/quic_client_session_cache.cc index 32f115dca..66b5becfb 100644 --- a/quiche/quic/core/crypto/quic_client_session_cache.cc +++ b/quiche/quic/core/crypto/quic_client_session_cache.cc @@ -101,7 +101,7 @@ void QuicClientSessionCache::ClearEarlyData(const QuicServerId& server_id) { if (iter == cache_.end()) return; for (auto& session : iter->second->sessions) { if (session) { - QUIC_DLOG(INFO) << "Clear early data for for host: " << server_id.host(); + QUIC_DLOG(INFO) << "Clear early data for host: " << server_id.host(); session.reset(SSL_SESSION_copy_without_early_data(session.get())); } } diff --git a/quiche/quic/core/crypto/quic_crypto_client_config.h b/quiche/quic/core/crypto/quic_crypto_client_config.h index 30cddcc16..219365867 100644 --- a/quiche/quic/core/crypto/quic_crypto_client_config.h +++ b/quiche/quic/core/crypto/quic_crypto_client_config.h @@ -434,7 +434,7 @@ class QUICHE_EXPORT QuicCryptoClientConfig : public QuicCryptoConfig { // (or at least server public key). std::map canonical_server_map_; - // Contains list of suffixes (for exmaple ".c.youtube.com", + // Contains list of suffixes (for example ".c.youtube.com", // ".googlevideo.com") of canonical hostnames. std::vector canonical_suffixes_; diff --git a/quiche/quic/core/crypto/quic_crypto_server_config.h b/quiche/quic/core/crypto/quic_crypto_server_config.h index c9e6c13f4..e1a18beb0 100644 --- a/quiche/quic/core/crypto/quic_crypto_server_config.h +++ b/quiche/quic/core/crypto/quic_crypto_server_config.h @@ -581,7 +581,7 @@ class QUICHE_EXPORT QuicCryptoServerConfig { std::unique_ptr done_cb) const; // Convenience class which carries the arguments passed to - // |ProcessClientHellp| along. + // |ProcessClientHello| along. class QUICHE_EXPORT ProcessClientHelloContext { public: ProcessClientHelloContext( diff --git a/quiche/quic/core/crypto/quic_crypto_server_config_test.cc b/quiche/quic/core/crypto/quic_crypto_server_config_test.cc index ed7ffdb98..9b7807f68 100644 --- a/quiche/quic/core/crypto/quic_crypto_server_config_test.cc +++ b/quiche/quic/core/crypto/quic_crypto_server_config_test.cc @@ -30,7 +30,7 @@ namespace quic { namespace test { using ::testing::Not; -// NOTE: This matcher depends on the wire format of serialzied protocol buffers, +// NOTE: This matcher depends on the wire format of serialized protocol buffers, // which may change in the future. // Switch to ::testing::EqualsProto once it is available in Chromium. MATCHER_P(SerializedProtoEquals, message, "") { diff --git a/quiche/quic/core/crypto/tls_connection.h b/quiche/quic/core/crypto/tls_connection.h index 0b39d1e8d..ac263effe 100644 --- a/quiche/quic/core/crypto/tls_connection.h +++ b/quiche/quic/core/crypto/tls_connection.h @@ -69,7 +69,7 @@ class QUICHE_EXPORT TlsConnection { virtual void FlushFlight() = 0; // SendAlert causes this TlsConnection to close the QUIC connection with an - // error code corersponding to the TLS alert description |desc| sent at + // error code corresponding to the TLS alert description |desc| sent at // level |level|. virtual void SendAlert(EncryptionLevel level, uint8_t desc) = 0; diff --git a/quiche/quic/core/crypto/transport_parameters.cc b/quiche/quic/core/crypto/transport_parameters.cc index 1726ad3b1..d5ec25940 100644 --- a/quiche/quic/core/crypto/transport_parameters.cc +++ b/quiche/quic/core/crypto/transport_parameters.cc @@ -811,7 +811,7 @@ bool SerializeTransportParameters(const TransportParameters& in, // Transport parameter identifiers are 62 bits long so we need to // ensure that the output of the computation below fits in 62 bits. uint64_t grease_id64 = random->RandUint64() % ((1ULL << 62) - 31); - // Make sure grease_id % 31 == 27. Note that this is not uniformely + // Make sure grease_id % 31 == 27. Note that this is not uniformly // distributed but is acceptable since no security depends on this // randomness. grease_id64 = (grease_id64 / 31) * 31 + 27; diff --git a/quiche/quic/core/frames/quic_ack_frequency_frame.h b/quiche/quic/core/frames/quic_ack_frequency_frame.h index 03f87469f..6956edd5f 100644 --- a/quiche/quic/core/frames/quic_ack_frequency_frame.h +++ b/quiche/quic/core/frames/quic_ack_frequency_frame.h @@ -29,7 +29,7 @@ struct QUICHE_EXPORT QuicAckFrequencyFrame { // received, and non-zero when sent. QuicControlFrameId control_frame_id = kInvalidControlFrameId; - // If true, do not ack immediately upon observeation of packet reordering. + // If true, do not ack immediately upon observation of packet reordering. bool ignore_order = false; // Sequence number assigned to the ACK_FREQUENCY frame by the sender to allow @@ -37,7 +37,7 @@ struct QUICHE_EXPORT QuicAckFrequencyFrame { uint64_t sequence_number = 0; // The maximum number of ack-eliciting packets after which the receiver sends - // an acknowledgement. Invald if == 0. + // an acknowledgement. Invalid if == 0. uint64_t packet_tolerance = 2; // The maximum time that ack packets can be delayed. diff --git a/quiche/quic/core/frames/quic_connection_close_frame.h b/quiche/quic/core/frames/quic_connection_close_frame.h index 105ebcd38..cd0a727d5 100644 --- a/quiche/quic/core/frames/quic_connection_close_frame.h +++ b/quiche/quic/core/frames/quic_connection_close_frame.h @@ -34,7 +34,7 @@ struct QUICHE_EXPORT QuicConnectionCloseFrame { friend QUICHE_EXPORT std::ostream& operator<<( std::ostream& os, const QuicConnectionCloseFrame& c); - // Indicates whether the the frame is a Google QUIC CONNECTION_CLOSE frame, + // Indicates whether the frame is a Google QUIC CONNECTION_CLOSE frame, // an IETF QUIC CONNECTION_CLOSE frame with transport error code, // or an IETF QUIC CONNECTION_CLOSE frame with application error code. QuicConnectionCloseType close_type = GOOGLE_QUIC_CONNECTION_CLOSE; diff --git a/quiche/quic/core/frames/quic_frame.cc b/quiche/quic/core/frames/quic_frame.cc index df4d9d3bc..290d6eff0 100644 --- a/quiche/quic/core/frames/quic_frame.cc +++ b/quiche/quic/core/frames/quic_frame.cc @@ -265,7 +265,7 @@ void SetControlFrameId(QuicControlFrameId control_frame_id, QuicFrame* frame) { } } -QuicFrame CopyRetransmittableControlFrame(const QuicFrame& frame) { +QuicFrame CopyRetransmissibleControlFrame(const QuicFrame& frame) { QuicFrame copy; switch (frame.type) { case RST_STREAM_FRAME: @@ -312,7 +312,7 @@ QuicFrame CopyRetransmittableControlFrame(const QuicFrame& frame) { break; default: QUIC_BUG(quic_bug_10533_1) - << "Try to copy a non-retransmittable control frame: " << frame; + << "Try to copy a non-retransmissible control frame: " << frame; copy = QuicFrame(QuicPingFrame(kInvalidControlFrameId)); break; } diff --git a/quiche/quic/core/frames/quic_frame.h b/quiche/quic/core/frames/quic_frame.h index 289b08d4c..3366df84c 100644 --- a/quiche/quic/core/frames/quic_frame.h +++ b/quiche/quic/core/frames/quic_frame.h @@ -128,7 +128,7 @@ static_assert(offsetof(QuicStreamFrame, type) == offsetof(QuicFrame, type), "Offset of |type| must match in QuicFrame and QuicStreamFrame"); // A inline size of 1 is chosen to optimize the typical use case of -// 1-stream-frame in QuicTransmissionInfo.retransmittable_frames. +// 1-stream-frame in QuicTransmissionInfo.retransmissible_frames. using QuicFrames = absl::InlinedVector; // Deletes all the sub-frames contained in |frames|. @@ -141,7 +141,7 @@ QUICHE_EXPORT void DeleteFrame(QuicFrame* frame); QUICHE_EXPORT void RemoveFramesForStream(QuicFrames* frames, QuicStreamId stream_id); -// Returns true if |type| is a retransmittable control frame. +// Returns true if |type| is a retransmissible control frame. QUICHE_EXPORT bool IsControlFrame(QuicFrameType type); // Returns control_frame_id of |frame|. Returns kInvalidControlFrameId if @@ -153,7 +153,7 @@ QUICHE_EXPORT void SetControlFrameId(QuicControlFrameId control_frame_id, QuicFrame* frame); // Returns a copy of |frame|. -QUICHE_EXPORT QuicFrame CopyRetransmittableControlFrame(const QuicFrame& frame); +QUICHE_EXPORT QuicFrame CopyRetransmissibleControlFrame(const QuicFrame& frame); // Returns a copy of |frame|. QUICHE_EXPORT QuicFrame CopyQuicFrame(quiche::QuicheBufferAllocator* allocator, diff --git a/quiche/quic/core/frames/quic_frames_test.cc b/quiche/quic/core/frames/quic_frames_test.cc index 671e77240..e2674e085 100644 --- a/quiche/quic/core/frames/quic_frames_test.cc +++ b/quiche/quic/core/frames/quic_frames_test.cc @@ -111,7 +111,7 @@ TEST_F(QuicFramesTest, NewConnectionIdFrameToString) { QuicNewConnectionIdFrame new_connection_id_frame; QuicFrame frame(&new_connection_id_frame); SetControlFrameId(1, &frame); - QuicFrame frame_copy = CopyRetransmittableControlFrame(frame); + QuicFrame frame_copy = CopyRetransmissibleControlFrame(frame); EXPECT_EQ(1u, GetControlFrameId(frame_copy)); new_connection_id_frame.connection_id = TestConnectionId(2); new_connection_id_frame.sequence_number = 2u; @@ -132,7 +132,7 @@ TEST_F(QuicFramesTest, RetireConnectionIdFrameToString) { QuicRetireConnectionIdFrame retire_connection_id_frame; QuicFrame frame(&retire_connection_id_frame); SetControlFrameId(1, &frame); - QuicFrame frame_copy = CopyRetransmittableControlFrame(frame); + QuicFrame frame_copy = CopyRetransmissibleControlFrame(frame); EXPECT_EQ(1u, GetControlFrameId(frame_copy)); retire_connection_id_frame.sequence_number = 1u; std::ostringstream stream; @@ -281,7 +281,7 @@ TEST_F(QuicFramesTest, HandshakeDoneFrameToString) { EXPECT_TRUE(IsControlFrame(frame.type)); } -TEST_F(QuicFramesTest, QuicAckFreuqncyFrameToString) { +TEST_F(QuicFramesTest, QuicAckFrequencyFrameToString) { QuicAckFrequencyFrame ack_frequency_frame; ack_frequency_frame.sequence_number = 1; ack_frequency_frame.packet_tolerance = 2; diff --git a/quiche/quic/core/frames/quic_handshake_done_frame.h b/quiche/quic/core/frames/quic_handshake_done_frame.h index 59e98c82d..44fb1d043 100644 --- a/quiche/quic/core/frames/quic_handshake_done_frame.h +++ b/quiche/quic/core/frames/quic_handshake_done_frame.h @@ -12,7 +12,7 @@ namespace quic { -// A HANDSHAKE_DONE frame contains no payload, and it is retransmittable, +// A HANDSHAKE_DONE frame contains no payload, and it is retransmissible, // and ACK'd just like other normal frames. struct QUICHE_EXPORT QuicHandshakeDoneFrame : public QuicInlinedFrame { diff --git a/quiche/quic/core/frames/quic_inlined_frame.h b/quiche/quic/core/frames/quic_inlined_frame.h index e50e5994c..8ec07d016 100644 --- a/quiche/quic/core/frames/quic_inlined_frame.h +++ b/quiche/quic/core/frames/quic_inlined_frame.h @@ -13,7 +13,7 @@ namespace quic { // QuicInlinedFrame is the base class of all frame types that is inlined in the -// QuicFrame class. It gurantees all inlined frame types contain a 'type' field +// QuicFrame class. It guarantees all inlined frame types contain a 'type' field // at offset 0, such that QuicFrame.type can get the correct frame type for both // inline and out-of-line frame types. template diff --git a/quiche/quic/core/frames/quic_ping_frame.h b/quiche/quic/core/frames/quic_ping_frame.h index fc5a2ee23..e76465cbc 100644 --- a/quiche/quic/core/frames/quic_ping_frame.h +++ b/quiche/quic/core/frames/quic_ping_frame.h @@ -12,7 +12,7 @@ namespace quic { -// A ping frame contains no payload, though it is retransmittable, +// A ping frame contains no payload, though it is retransmissible, // and ACK'd just like other normal frames. struct QUICHE_EXPORT QuicPingFrame : public QuicInlinedFrame { QuicPingFrame(); diff --git a/quiche/quic/core/frames/quic_window_update_frame.h b/quiche/quic/core/frames/quic_window_update_frame.h index 6963354f4..e4424e393 100644 --- a/quiche/quic/core/frames/quic_window_update_frame.h +++ b/quiche/quic/core/frames/quic_window_update_frame.h @@ -39,7 +39,7 @@ struct QUICHE_EXPORT QuicWindowUpdateFrame QuicStreamId stream_id = 0; // Maximum data allowed in the stream or connection. The receiver of this - // frame must not send data which would exceedes this restriction. + // frame must not send data which would exceeds this restriction. QuicByteCount max_data = 0; }; diff --git a/quiche/quic/core/http/end_to_end_test.cc b/quiche/quic/core/http/end_to_end_test.cc index 961214b8e..69af1232f 100644 --- a/quiche/quic/core/http/end_to_end_test.cc +++ b/quiche/quic/core/http/end_to_end_test.cc @@ -1653,14 +1653,14 @@ TEST_P(EndToEndTest, LargePostWithPacketLossAndAlwaysBundleWindowUpdates) { EXPECT_TRUE(client_->client()->WaitForHandshakeConfirmed()); server_thread_->WaitForCryptoHandshakeConfirmed(); - // Normally server only bundles a retransmittable frame once every other - // kMaxConsecutiveNonRetransmittablePackets ack-only packets. Setting the max + // Normally server only bundles a retransmissible frame once every other + // kMaxConsecutiveNonRetransmissiblePackets ack-only packets. Setting the max // to 0 to reliably reproduce b/80090281. server_thread_->Schedule([this]() { QuicConnection* server_connection = GetServerConnection(); if (server_connection != nullptr) { QuicConnectionPeer:: - SetMaxConsecutiveNumPacketsWithNoRetransmittableFrames( + SetMaxConsecutiveNumPacketsWithNoRetransmissibleFrames( server_connection, 0); } else { ADD_FAILURE() << "Missing server connection"; @@ -2431,7 +2431,7 @@ TEST_P(EndToEndTest, QUIC_TEST_DISABLED_IN_CHROME(MultipleTermination)) { client_->SendData("bar", true); client_->WaitForWriteToFlush(); - // By default the stream protects itself from writes after terminte is set. + // By default the stream protects itself from writes after terminate is set. // Override this to test the server handling buggy clients. QuicStreamPeer::SetWriteSideClosed(false, client_->GetOrCreateStream()); diff --git a/quiche/quic/core/http/http_frames.h b/quiche/quic/core/http/http_frames.h index 874dc102f..149827102 100644 --- a/quiche/quic/core/http/http_frames.h +++ b/quiche/quic/core/http/http_frames.h @@ -103,7 +103,7 @@ struct QUICHE_EXPORT GoAwayFrame { // // The PRIORITY_UPDATE frame specifies the sender-advised priority of a stream. // Frame type 0xf0700 (called PRIORITY_UPDATE_REQUEST_STREAM in the -// implementation) is used for for request streams. +// implementation) is used for request streams. // Frame type 0xf0701 would be used for push streams but it is not implemented; // incoming 0xf0701 frames are treated as frames of unknown type. diff --git a/quiche/quic/core/http/quic_header_list.h b/quiche/quic/core/http/quic_header_list.h index 335cf4b77..2a37c9625 100644 --- a/quiche/quic/core/http/quic_header_list.h +++ b/quiche/quic/core/http/quic_header_list.h @@ -33,7 +33,7 @@ class QUICHE_EXPORT QuicHeaderList : public spdy::SpdyHeadersHandlerInterface { QuicHeaderList& operator=(const QuicHeaderList& other); ~QuicHeaderList() override; - // From SpdyHeadersHandlerInteface. + // From SpdyHeadersHandlerInterface. void OnHeaderBlockStart() override; void OnHeader(absl::string_view name, absl::string_view value) override; void OnHeaderBlockEnd(size_t uncompressed_header_bytes, diff --git a/quiche/quic/core/http/quic_headers_stream_test.cc b/quiche/quic/core/http/quic_headers_stream_test.cc index a086800a3..2309a4b4d 100644 --- a/quiche/quic/core/http/quic_headers_stream_test.cc +++ b/quiche/quic/core/http/quic_headers_stream_test.cc @@ -287,7 +287,7 @@ class QuicHeadersStreamTest : public QuicTestWithParam { &session_, stream_id, headers_.Clone(), fin, spdy::SpdyStreamPrecedence(priority), nullptr); - // Parse the outgoing data and check that it matches was was written. + // Parse the outgoing data and check that it matches was written. if (is_request) { EXPECT_CALL( visitor_, diff --git a/quiche/quic/core/http/quic_server_session_base.h b/quiche/quic/core/http/quic_server_session_base.h index 113f754dc..c8fc29006 100644 --- a/quiche/quic/core/http/quic_server_session_base.h +++ b/quiche/quic/core/http/quic_server_session_base.h @@ -44,7 +44,7 @@ class QUICHE_EXPORT QuicServerSessionBase : public QuicSpdySession { QuicServerSessionBase(const QuicServerSessionBase&) = delete; QuicServerSessionBase& operator=(const QuicServerSessionBase&) = delete; - // Override the base class to cancel any ongoing asychronous crypto. + // Override the base class to cancel any ongoing asynchronous crypto. void OnConnectionClosed(const QuicConnectionCloseFrame& frame, ConnectionCloseSource source) override; diff --git a/quiche/quic/core/http/quic_server_session_base_test.cc b/quiche/quic/core/http/quic_server_session_base_test.cc index 7a1c9522a..5c8e6edaa 100644 --- a/quiche/quic/core/http/quic_server_session_base_test.cc +++ b/quiche/quic/core/http/quic_server_session_base_test.cc @@ -604,7 +604,7 @@ TEST_P(QuicServerSessionBaseTest, BandwidthEstimates) { QuicPacketNumber(1) + kMinPacketsBetweenServerConfigUpdates, PACKET_4BYTE_PACKET_NUMBER, nullptr, 1000, false, false); sent_packet_manager->OnPacketSent(&packet, now, NOT_RETRANSMISSION, - HAS_RETRANSMITTABLE_DATA, true, + HAS_RETRANSMISSIBLE_DATA, true, ECN_NOT_ECT); // Verify that the proto has exactly the values we expect. diff --git a/quiche/quic/core/http/quic_spdy_client_session_test.cc b/quiche/quic/core/http/quic_spdy_client_session_test.cc index 5aa479bdd..53a503dd1 100644 --- a/quiche/quic/core/http/quic_spdy_client_session_test.cc +++ b/quiche/quic/core/http/quic_spdy_client_session_test.cc @@ -266,7 +266,7 @@ TEST_P(QuicSpdyClientSessionTest, MaxNumStreamsWithNoFinOrRst) { EXPECT_FALSE(session_->CreateOutgoingBidirectionalStream()); // Close the stream, but without having received a FIN or a RST_STREAM - // or MAX_STREAMS (IETF QUIC) and check that a new one can not be created. + // or MAX_STREAMS (IETF QUIC) and check that a new one cannot be created. session_->ResetStream(stream->id(), QUIC_STREAM_CANCELLED); EXPECT_EQ(1u, QuicSessionPeer::GetNumOpenDynamicStreams(session_.get())); @@ -468,7 +468,7 @@ TEST_P(QuicSpdyClientSessionTest, InvalidPacketReceived) { session_->ProcessUdpPacket(client_address, server_address, zero_length_packet); - // Verifiy that small, invalid packets don't close the connection. + // Verify that small, invalid packets don't close the connection. char buf[2] = {0x00, 0x01}; QuicConnectionId connection_id = session_->connection()->connection_id(); QuicReceivedPacket valid_packet(buf, 2, QuicTime::Zero(), false); @@ -747,7 +747,7 @@ TEST_P(QuicSpdyClientSessionTest, ZeroRttRejectReducesStreamLimitTooMuch) { EXPECT_CALL( *connection_, CloseConnection( - QUIC_ZERO_RTT_UNRETRANSMITTABLE, + QUIC_ZERO_RTT_UNRETRANSMISSIBLE, "Server rejected 0-RTT, aborting because new bidirectional initial " "stream limit 0 is less than current open streams: 1", _)) @@ -800,14 +800,14 @@ TEST_P(QuicSpdyClientSessionTest, .WillOnce(testing::Invoke(connection_, &MockQuicConnection::ReallyCloseConnection)); EXPECT_CALL(*connection_, - CloseConnection(QUIC_ZERO_RTT_UNRETRANSMITTABLE, _, _)) + CloseConnection(QUIC_ZERO_RTT_UNRETRANSMISSIBLE, _, _)) .WillOnce(testing::Invoke(connection_, &MockQuicConnection::ReallyCloseConnection)) .RetiresOnSaturation(); } else { EXPECT_CALL(*connection_, CloseConnection( - QUIC_ZERO_RTT_UNRETRANSMITTABLE, + QUIC_ZERO_RTT_UNRETRANSMISSIBLE, "Server rejected 0-RTT, aborting because new stream max " "data 2 for stream 3 is less than currently used: 5", _)) @@ -854,7 +854,7 @@ TEST_P(QuicSpdyClientSessionTest, stream->WriteOrBufferData(data_to_send, true, nullptr); EXPECT_CALL(*connection_, - CloseConnection(QUIC_ZERO_RTT_UNRETRANSMITTABLE, _, _)) + CloseConnection(QUIC_ZERO_RTT_UNRETRANSMISSIBLE, _, _)) .WillOnce(testing::Invoke(connection_, &MockQuicConnection::ReallyCloseConnection)); EXPECT_CALL(*connection_, CloseConnection(QUIC_HANDSHAKE_FAILED, _, _)); diff --git a/quiche/quic/core/http/quic_spdy_session.h b/quiche/quic/core/http/quic_spdy_session.h index 5672c9077..5b991acbf 100644 --- a/quiche/quic/core/http/quic_spdy_session.h +++ b/quiche/quic/core/http/quic_spdy_session.h @@ -53,7 +53,7 @@ class QUICHE_EXPORT Http3DebugVisitor { virtual ~Http3DebugVisitor(); - // TODO(https://crbug.com/1062700): Remove default implementation of all + // TODO(crbug.com/1062700): Remove default implementation of all // methods after Chrome's QuicHttp3Logger has overrides. This is to make sure // QUICHE merge is not blocked on having to add those overrides, they can // happen asynchronously. @@ -239,7 +239,7 @@ class QUICHE_EXPORT QuicSpdySession bool OnStreamsBlockedFrame(const QuicStreamsBlockedFrame& frame) override; // Write GOAWAY frame with maximum stream ID on the control stream. Called to - // initite graceful connection shutdown. Do not use smaller stream ID, in + // initiate graceful connection shutdown. Do not use smaller stream ID, in // case client does not implement retry on GOAWAY. Do not send GOAWAY if one // has already been sent. Send connection close with |error_code| and |reason| // before encryption gets established. @@ -321,7 +321,7 @@ class QUICHE_EXPORT QuicSpdySession // Called when the complete list of headers is available. void OnHeaderList(const QuicHeaderList& header_list); - // Initialze HTTP/3 unidirectional streams if |unidirectional| is true and + // Initialize HTTP/3 unidirectional streams if |unidirectional| is true and // those streams are not initialized yet. void OnCanCreateNewOutgoingStream(bool unidirectional) override; @@ -348,7 +348,7 @@ class QUICHE_EXPORT QuicSpdySession // |is_sent| is true for sent headers, false for received ones. // Ratio is recorded as percentage. Smaller value means more efficient // compression. Compressed size might be larger than uncompressed size, but - // recorded ratio is trunckated at 200%. + // recorded ratio is truncated at 200%. // Uncompressed size can be zero for an empty header list, and compressed size // can be zero for an empty header list when using HPACK. (QPACK always emits // a header block prefix of at least two bytes.) This method records nothing @@ -529,7 +529,7 @@ class QUICHE_EXPORT QuicSpdySession const SettingsFrame& settings() const { return settings_; } - // Initializes HTTP/3 unidirectional streams if not yet initialzed. + // Initializes HTTP/3 unidirectional streams if not yet initialized. virtual void MaybeInitializeHttp3UnidirectionalStreams(); // QuicConnectionVisitorInterface methods. @@ -689,7 +689,7 @@ class QUICHE_EXPORT QuicSpdySession // WebTransport streams that do not have a session associated with them. // Limited to kMaxUnassociatedWebTransportStreams; when the list is full, - // oldest streams are evicated first. + // oldest streams are evicted first. std::list buffered_streams_; // On the server side, if true, advertise and accept extended CONNECT method. diff --git a/quiche/quic/core/http/quic_spdy_session_test.cc b/quiche/quic/core/http/quic_spdy_session_test.cc index c93e56eae..663dfce93 100644 --- a/quiche/quic/core/http/quic_spdy_session_test.cc +++ b/quiche/quic/core/http/quic_spdy_session_test.cc @@ -730,7 +730,7 @@ TEST_P(QuicSpdySessionTestServer, MaximumAvailableOpenedStreams) { QuicStreamId stream_id = StreamCountToId( QuicSessionPeer::ietf_streamid_manager(&session_) ->max_incoming_bidirectional_streams(), - Perspective::IS_CLIENT, // Client initates stream, allocs stream id. + Perspective::IS_CLIENT, // Client initiates stream, allocs stream id. /*bidirectional=*/true); EXPECT_NE(nullptr, session_.GetOrCreateStream(stream_id)); stream_id = @@ -832,7 +832,7 @@ TEST_P(QuicSpdySessionTestServer, TooLargeStreamBlocked) { StrictMock debug_visitor; session_.set_debug_visitor(&debug_visitor); - // Simualte the situation where the incoming stream count is at its limit and + // Simulate the situation where the incoming stream count is at its limit and // the peer is blocked. QuicSessionPeer::SetMaxOpenIncomingBidirectionalStreams( static_cast(&session_), QuicUtils::GetMaxStreamCount()); @@ -1180,7 +1180,7 @@ TEST_P(QuicSpdySessionTestServer, SendHttp3GoAwayAndNoMoreMaxStreams) { for (QuicStreamCount i = 0; i < max_streams; ++i) { QuicStreamId stream_id = StreamCountToId( i + 1, - Perspective::IS_CLIENT, // Client initates stream, allocs stream id. + Perspective::IS_CLIENT, // Client initiates stream, allocs stream id. /*bidirectional=*/true); EXPECT_NE(nullptr, session_.GetOrCreateStream(stream_id)); @@ -1274,7 +1274,7 @@ TEST_P(QuicSpdySessionTestServer, Http3GoAwayLargerIdThanBefore) { // Test that server session will send a connectivity probe in response to a // connectivity probe on the same path. -TEST_P(QuicSpdySessionTestServer, ServerReplyToConnecitivityProbe) { +TEST_P(QuicSpdySessionTestServer, ServerReplyToConnectivityProbe) { if (VersionHasIetfQuicFrames(transport_version()) || GetQuicReloadableFlag(quic_ignore_gquic_probing)) { return; @@ -1631,7 +1631,7 @@ TEST_P(QuicSpdySessionTestServer, WindowUpdateUnblocksHeadersStream) { return; } - // Test that a flow control blocked headers stream gets unblocked on recipt of + // Test that a flow control blocked headers stream gets unblocked on receipt of // a WINDOW_UPDATE frame. // Set the headers stream to be flow control blocked. @@ -2559,10 +2559,10 @@ TEST_P(QuicSpdySessionTestServer, SessionDestroyedWhileHeaderDecodingBlocked) { // Decoding is blocked because dynamic table entry has not been received yet. EXPECT_FALSE(stream->headers_decompressed()); - // |session_| gets destoyed. That destroys QpackDecoder, a member of + // |session_| gets destroyed. That destroys QpackDecoder, a member of // QuicSpdySession (derived class), which destroys QpackDecoderHeaderTable. // Then |*stream|, owned by QuicSession (base class) get destroyed, which - // destroys QpackProgessiveDecoder, a registered Observer of + // destroys QpackProgressiveDecoder, a registered Observer of // QpackDecoderHeaderTable. This must not cause a crash. } diff --git a/quiche/quic/core/http/quic_spdy_stream.cc b/quiche/quic/core/http/quic_spdy_stream.cc index 5f0701f8d..e6c67bd5c 100644 --- a/quiche/quic/core/http/quic_spdy_stream.cc +++ b/quiche/quic/core/http/quic_spdy_stream.cc @@ -1468,7 +1468,7 @@ void QuicSpdyStream::WriteCapsule(const Capsule& capsule, bool fin) { } void QuicSpdyStream::WriteGreaseCapsule() { - // GREASE capsulde IDs have a form of 41 * N + 23. + // GREASE capsule IDs have a form of 41 * N + 23. QuicRandom* random = spdy_session_->connection()->random_generator(); uint64_t type = random->InsecureRandUint64() >> 4; type = (type / 41) * 41 + 23; diff --git a/quiche/quic/core/http/quic_spdy_stream.h b/quiche/quic/core/http/quic_spdy_stream.h index 5835a777f..c9a8b3c3e 100644 --- a/quiche/quic/core/http/quic_spdy_stream.h +++ b/quiche/quic/core/http/quic_spdy_stream.h @@ -95,7 +95,7 @@ class QUICHE_EXPORT QuicSpdyStream virtual void OnStreamHeaderList(bool fin, size_t frame_len, const QuicHeaderList& header_list); - // Called by the session when a PRIORITY frame has been been received for this + // Called by the session when a PRIORITY frame has been received for this // stream. This method will only be called for server streams. void OnPriorityFrame(const spdy::SpdyStreamPrecedence& precedence); diff --git a/quiche/quic/core/http/quic_spdy_stream_test.cc b/quiche/quic/core/http/quic_spdy_stream_test.cc index 3e0b8a191..0094f0006 100644 --- a/quiche/quic/core/http/quic_spdy_stream_test.cc +++ b/quiche/quic/core/http/quic_spdy_stream_test.cc @@ -1744,7 +1744,7 @@ TEST_P(QuicSpdyStreamTest, WritingTrailersAfterFIN) { "Trailers cannot be sent after a FIN"); } -TEST_P(QuicSpdyStreamTest, HeaderStreamNotiferCorrespondingSpdyStream) { +TEST_P(QuicSpdyStreamTest, HeaderStreamNotifierCorrespondingSpdyStream) { // There is no headers stream if QPACK is used. if (UsesHttp3()) { return; @@ -2929,7 +2929,7 @@ TEST_P(QuicSpdyStreamTest, DataAfterTrailers) { .WillOnce(InvokeWithoutArgs([this]() { stream_->StopReading(); })); // Receive more data. - std::string data2 = DataFrame("This payload should not be proccessed."); + std::string data2 = DataFrame("This payload should not be processed."); stream_->OnStreamFrame(QuicStreamFrame(stream_->id(), false, offset, data2)); } diff --git a/quiche/quic/core/http/spdy_utils.cc b/quiche/quic/core/http/spdy_utils.cc index 873d39c9f..61c91698c 100644 --- a/quiche/quic/core/http/spdy_utils.cc +++ b/quiche/quic/core/http/spdy_utils.cc @@ -40,7 +40,7 @@ bool SpdyUtils::ExtractContentLengthFromHeaders(int64_t* content_length, if (!absl::SimpleAtoi(value, &new_value) || !quiche::QuicheTextUtils::IsAllDigits(value)) { QUIC_DLOG(ERROR) - << "Content length was either unparseable or negative."; + << "Content length was either unparsable or negative."; return false; } if (*content_length < 0) { diff --git a/quiche/quic/core/http/spdy_utils_test.cc b/quiche/quic/core/http/spdy_utils_test.cc index 43177ba05..841f84aeb 100644 --- a/quiche/quic/core/http/spdy_utils_test.cc +++ b/quiche/quic/core/http/spdy_utils_test.cc @@ -60,7 +60,7 @@ TEST_F(CopyAndValidateHeaders, NormalUsage) { {"empty-joined", ""}, {"empty-joined", ""}, - // Non-continguous cookie crumb. + // Non-contiguous cookie crumb. {"cookie", " fin!"}}); int64_t content_length = -1; @@ -304,7 +304,7 @@ TEST_F(CopyAndValidateTrailers, PseudoHeaderInTrailers) { TEST_F(CopyAndValidateTrailers, DuplicateTrailers) { // Duplicate trailers are allowed, and their values are concatenated into a - // single string delimted with '\0'. Some of the duplicate headers + // single string delimited with '\0'. Some of the duplicate headers // deliberately have an empty value. auto trailers = FromList({{"key", "value0"}, {"key", "value1"}, @@ -331,7 +331,7 @@ TEST_F(CopyAndValidateTrailers, DuplicateTrailers) { TEST_F(CopyAndValidateTrailers, DuplicateCookies) { // Duplicate cookie headers in trailers should be concatenated into a single - // "; " delimted string. + // "; " delimited string. auto headers = FromList({{"cookie", " part 1"}, {"cookie", "part 2 "}, {"cookie", "part3"}, diff --git a/quiche/quic/core/http/web_transport_http3.cc b/quiche/quic/core/http/web_transport_http3.cc index 31a1a35fe..7bbcb6aa2 100644 --- a/quiche/quic/core/http/web_transport_http3.cc +++ b/quiche/quic/core/http/web_transport_http3.cc @@ -195,7 +195,7 @@ WebTransportStream* WebTransportHttp3::AcceptIncomingBidirectionalStream() { QuicSpdyStream* stream = session_->GetOrCreateSpdyDataStream(id); if (stream == nullptr) { // Skip the streams that were reset in between the time they were - // receieved and the time the client has polled for them. + // received and the time the client has polled for them. continue; } return stream->web_transport_stream(); @@ -210,7 +210,7 @@ WebTransportStream* WebTransportHttp3::AcceptIncomingUnidirectionalStream() { QuicStream* stream = session_->GetOrCreateStream(id); if (stream == nullptr) { // Skip the streams that were reset in between the time they were - // receieved and the time the client has polled for them. + // received and the time the client has polled for them. continue; } return static_cast(stream) diff --git a/quiche/quic/core/io/event_loop_connecting_client_socket.cc b/quiche/quic/core/io/event_loop_connecting_client_socket.cc index 53dfb1fbc..a527a96b1 100644 --- a/quiche/quic/core/io/event_loop_connecting_client_socket.cc +++ b/quiche/quic/core/io/event_loop_connecting_client_socket.cc @@ -401,7 +401,7 @@ absl::Status EventLoopConnectingClientSocket::GetConnectResult() { // 2) With the various platforms and event systems involved, less than 100% // trust that it's impossible to end up in this method before the async // connect has completed/errored. Given that Connect() and GetSocketError() - // does not difinitevely differentiate between success and + // does not definitively differentiate between success and // still-in-progress, and given that there's a very simple and performant // way to positively confirm the socket is connected (peek), do that here. // (Could consider making the not-connected case a QUIC_BUG if a way is diff --git a/quiche/quic/core/io/event_loop_connecting_client_socket_test.cc b/quiche/quic/core/io/event_loop_connecting_client_socket_test.cc index b0d4406f0..ce700d350 100644 --- a/quiche/quic/core/io/event_loop_connecting_client_socket_test.cc +++ b/quiche/quic/core/io/event_loop_connecting_client_socket_test.cc @@ -208,7 +208,7 @@ class EventLoopConnectingClientSocketTest ConnectingClientSocket::AsyncVisitor* async_visitor) { switch (protocol_) { case socket_api::SocketProtocol::kUdp: - // Nothing special for UDP since UDP does not gaurantee packets will be + // Nothing special for UDP since UDP does not guarantee packets will be // sent once send buffers are full. return socket_factory_->CreateConnectingUdpClientSocket( peer_address, /*receive_buffer_size=*/0, /*send_buffer_size=*/0, @@ -673,7 +673,7 @@ TEST_P(EventLoopConnectingClientSocketTest, SendAsync) { TEST_P(EventLoopConnectingClientSocketTest, DisconnectCancelsSendAsync) { if (protocol_ == socket_api::SocketProtocol::kUdp) { - // UDP sends are always immediate, so cannot disconect mid-send. + // UDP sends are always immediate, so cannot disconnect mid-send. return; } diff --git a/quiche/quic/core/io/quic_event_loop.h b/quiche/quic/core/io/quic_event_loop.h index 53707b4ff..e70a3a765 100644 --- a/quiche/quic/core/io/quic_event_loop.h +++ b/quiche/quic/core/io/quic_event_loop.h @@ -33,7 +33,7 @@ class QuicSocketEventListener { }; // An abstraction for an event loop that can handle alarms and notify the -// listener about I/O events occuring to the registered UDP sockets. +// listener about I/O events occurring to the registered UDP sockets. // // Note on error handling: while most of the methods below return a boolean to // indicate whether the operation has succeeded or not, some will QUIC_BUG diff --git a/quiche/quic/core/io/quic_poll_event_loop.h b/quiche/quic/core/io/quic_poll_event_loop.h index db295989c..7ac79b6f1 100644 --- a/quiche/quic/core/io/quic_poll_event_loop.h +++ b/quiche/quic/core/io/quic_poll_event_loop.h @@ -131,7 +131,7 @@ class QuicPollEventLoop : public QuicEventLoop { // Calls all of the alarm callbacks that are scheduled before or at |time|. void ProcessAlarmsUpTo(QuicTime time); - // Adds the I/O callbacks for |fd| to the |ready_lits| as appopriate. + // Adds the I/O callbacks for |fd| to the |ready_lits| as appropriate. void DispatchIoEvent(std::vector& ready_list, SocketFd fd, short mask); // NOLINT(runtime/int) // Runs all of the callbacks on the ready list. diff --git a/quiche/quic/core/legacy_quic_stream_id_manager.cc b/quiche/quic/core/legacy_quic_stream_id_manager.cc index 0e422ef12..6da128e81 100644 --- a/quiche/quic/core/legacy_quic_stream_id_manager.cc +++ b/quiche/quic/core/legacy_quic_stream_id_manager.cc @@ -113,7 +113,7 @@ void LegacyQuicStreamIdManager::OnStreamClosed(bool is_incoming) { bool LegacyQuicStreamIdManager::IsAvailableStream(QuicStreamId id) const { if (!IsIncomingStream(id)) { - // Stream IDs under next_ougoing_stream_id_ are either open or previously + // Stream IDs under next_outgoing_stream_id_ are either open or previously // open but now closed. return id >= next_outgoing_stream_id_; } diff --git a/quiche/quic/core/qpack/qpack_blocking_manager.cc b/quiche/quic/core/qpack/qpack_blocking_manager.cc index 17b6e9fda..7ad1349fb 100644 --- a/quiche/quic/core/qpack/qpack_blocking_manager.cc +++ b/quiche/quic/core/qpack/qpack_blocking_manager.cc @@ -112,7 +112,7 @@ bool QpackBlockingManager::blocking_allowed_on_stream( // If there are no blocked streams, then // |blocked_stream_count + 1 <= maximum_blocked_streams| because // |maximum_blocked_streams| is larger than zero. - // If there are are blocked streams, then + // If there are blocked streams, then // |blocked_stream_count + 1 <= maximum_blocked_streams| otherwise the method // would have returned false when |blocked_stream_count| was incremented. // Therefore blocking on |stream_id| is allowed. diff --git a/quiche/quic/core/qpack/qpack_decoded_headers_accumulator.h b/quiche/quic/core/qpack/qpack_decoded_headers_accumulator.h index 5fd00fa0f..f35a1c61f 100644 --- a/quiche/quic/core/qpack/qpack_decoded_headers_accumulator.h +++ b/quiche/quic/core/qpack/qpack_decoded_headers_accumulator.h @@ -81,10 +81,10 @@ class QUICHE_EXPORT QpackDecodedHeadersAccumulator size_t uncompressed_header_bytes_including_overhead_; QuicHeaderList quic_header_list_; // Uncompressed header list size with overhead, - // for passing in to QuicHeaderList::OnHeaderBlockEnd(). + // for passing into QuicHeaderList::OnHeaderBlockEnd(). size_t uncompressed_header_bytes_without_overhead_; // Compressed header list size - // for passing in to QuicHeaderList::OnHeaderBlockEnd(). + // for passing into QuicHeaderList::OnHeaderBlockEnd(). size_t compressed_header_bytes_; // True if the header size limit has been exceeded. @@ -93,7 +93,7 @@ class QUICHE_EXPORT QpackDecodedHeadersAccumulator // The following two members are only used for QUICHE_DCHECKs. - // True if headers have been completedly and successfully decoded. + // True if headers have been completely and successfully decoded. bool headers_decoded_; // True if an error has been detected during decoding. bool error_detected_; diff --git a/quiche/quic/core/qpack/qpack_encoder_stream_sender.cc b/quiche/quic/core/qpack/qpack_encoder_stream_sender.cc index 574b3bb93..c453455d7 100644 --- a/quiche/quic/core/qpack/qpack_encoder_stream_sender.cc +++ b/quiche/quic/core/qpack/qpack_encoder_stream_sender.cc @@ -16,7 +16,7 @@ namespace quic { namespace { -// If QUIC stream bufferes more that this number of bytes, +// If QUIC stream buffers more that this number of bytes, // CanWrite() will return false. constexpr uint64_t kMaxBytesBufferedByStream = 64 * 1024; diff --git a/quiche/quic/core/qpack/qpack_encoder_test.cc b/quiche/quic/core/qpack/qpack_encoder_test.cc index 03d7a3f94..a4c73feba 100644 --- a/quiche/quic/core/qpack/qpack_encoder_test.cc +++ b/quiche/quic/core/qpack/qpack_encoder_test.cc @@ -263,7 +263,7 @@ TEST_F(QpackEncoderTest, DynamicTable) { header_list["cookie"] = "baz"; // name matches static entry // Set Dynamic Table Capacity instruction. - std::string set_dyanamic_table_capacity = absl::HexStringToBytes("3fe11f"); + std::string set_dynamic_table_capacity = absl::HexStringToBytes("3fe11f"); // Insert three entries into the dynamic table. std::string insert_entries = absl::HexStringToBytes( "62" // insert without name reference @@ -275,7 +275,7 @@ TEST_F(QpackEncoderTest, DynamicTable) { "0362617a"); // value "baz" EXPECT_CALL(encoder_stream_sender_delegate_, WriteStreamData(Eq( - absl::StrCat(set_dyanamic_table_capacity, insert_entries)))); + absl::StrCat(set_dynamic_table_capacity, insert_entries)))); EXPECT_EQ(absl::HexStringToBytes( "0400" // prefix @@ -301,7 +301,7 @@ TEST_F(QpackEncoderTest, SmallDynamicTable) { header_list["bar"] = "baz"; // no match // Set Dynamic Table Capacity instruction. - std::string set_dyanamic_table_capacity = absl::HexStringToBytes("3f07"); + std::string set_dynamic_table_capacity = absl::HexStringToBytes("3f07"); // Insert one entry into the dynamic table. std::string insert_entry = absl::HexStringToBytes( "62" // insert without name reference @@ -309,7 +309,7 @@ TEST_F(QpackEncoderTest, SmallDynamicTable) { "03626172"); // value "bar" EXPECT_CALL(encoder_stream_sender_delegate_, WriteStreamData( - Eq(absl::StrCat(set_dyanamic_table_capacity, insert_entry)))); + Eq(absl::StrCat(set_dynamic_table_capacity, insert_entry)))); EXPECT_EQ(absl::HexStringToBytes("0200" // prefix "80" // dynamic entry 0 @@ -335,7 +335,7 @@ TEST_F(QpackEncoderTest, BlockedStream) { header_list1["foo"] = "bar"; // Set Dynamic Table Capacity instruction. - std::string set_dyanamic_table_capacity = absl::HexStringToBytes("3fe11f"); + std::string set_dynamic_table_capacity = absl::HexStringToBytes("3fe11f"); // Insert one entry into the dynamic table. std::string insert_entry1 = absl::HexStringToBytes( "62" // insert without name reference @@ -343,7 +343,7 @@ TEST_F(QpackEncoderTest, BlockedStream) { "03626172"); // value "bar" EXPECT_CALL(encoder_stream_sender_delegate_, WriteStreamData(Eq( - absl::StrCat(set_dyanamic_table_capacity, insert_entry1)))); + absl::StrCat(set_dynamic_table_capacity, insert_entry1)))); EXPECT_EQ(absl::HexStringToBytes("0200" // prefix "80"), // dynamic entry 0 @@ -547,7 +547,7 @@ TEST_F(QpackEncoderTest, EncoderStreamWritesDisallowedThenAllowed) { header_list2["cookie"] = "baz"; // name matches static entry // Set Dynamic Table Capacity instruction. - std::string set_dyanamic_table_capacity = absl::HexStringToBytes("3fe11f"); + std::string set_dynamic_table_capacity = absl::HexStringToBytes("3fe11f"); // Insert three entries into the dynamic table. std::string insert_entries = absl::HexStringToBytes( "62" // insert without name reference @@ -559,7 +559,7 @@ TEST_F(QpackEncoderTest, EncoderStreamWritesDisallowedThenAllowed) { "0362617a"); // value "baz" EXPECT_CALL(encoder_stream_sender_delegate_, WriteStreamData(Eq( - absl::StrCat(set_dyanamic_table_capacity, insert_entries)))); + absl::StrCat(set_dynamic_table_capacity, insert_entries)))); EXPECT_EQ(absl::HexStringToBytes( "0400" // prefix @@ -583,7 +583,7 @@ TEST_F(QpackEncoderTest, EncoderStreamWritesAllowedThenDisallowed) { header_list1["cookie"] = "baz"; // name matches static entry // Set Dynamic Table Capacity instruction. - std::string set_dyanamic_table_capacity = absl::HexStringToBytes("3fe11f"); + std::string set_dynamic_table_capacity = absl::HexStringToBytes("3fe11f"); // Insert three entries into the dynamic table. std::string insert_entries = absl::HexStringToBytes( "62" // insert without name reference @@ -595,7 +595,7 @@ TEST_F(QpackEncoderTest, EncoderStreamWritesAllowedThenDisallowed) { "0362617a"); // value "baz" EXPECT_CALL(encoder_stream_sender_delegate_, WriteStreamData(Eq( - absl::StrCat(set_dyanamic_table_capacity, insert_entries)))); + absl::StrCat(set_dynamic_table_capacity, insert_entries)))); EXPECT_EQ(absl::HexStringToBytes( "0400" // prefix @@ -647,7 +647,7 @@ TEST_F(QpackEncoderTest, UnackedEntryCannotBeEvicted) { header_list1["foo"] = "bar"; // Set Dynamic Table Capacity instruction. - std::string set_dyanamic_table_capacity = absl::HexStringToBytes("3f09"); + std::string set_dynamic_table_capacity = absl::HexStringToBytes("3f09"); // Insert one entry into the dynamic table. std::string insert_entries1 = absl::HexStringToBytes( "62" // insert without name reference @@ -655,7 +655,7 @@ TEST_F(QpackEncoderTest, UnackedEntryCannotBeEvicted) { "03626172"); // value "bar" EXPECT_CALL(encoder_stream_sender_delegate_, WriteStreamData(Eq( - absl::StrCat(set_dyanamic_table_capacity, insert_entries1)))); + absl::StrCat(set_dynamic_table_capacity, insert_entries1)))); EXPECT_EQ( absl::HexStringToBytes("0200" // prefix diff --git a/quiche/quic/core/qpack/qpack_instructions.cc b/quiche/quic/core/qpack/qpack_instructions.cc index 9de0dcdea..0b688ae3b 100644 --- a/quiche/quic/core/qpack/qpack_instructions.cc +++ b/quiche/quic/core/qpack/qpack_instructions.cc @@ -16,7 +16,7 @@ namespace { // Validate that // * in each instruction, the bits of |value| that are zero in |mask| are zero; // * every byte matches exactly one opcode. -void ValidateLangague(const QpackLanguage* language) { +void ValidateLanguage(const QpackLanguage* language) { #ifndef NDEBUG for (const auto* instruction : *language) { QUICHE_DCHECK_EQ(0, instruction->opcode.value & ~instruction->opcode.mask); @@ -85,7 +85,7 @@ const QpackLanguage* QpackEncoderStreamLanguage() { InsertWithNameReferenceInstruction(), InsertWithoutNameReferenceInstruction(), DuplicateInstruction(), SetDynamicTableCapacityInstruction()}; - ValidateLangague(language); + ValidateLanguage(language); return language; } @@ -117,7 +117,7 @@ const QpackLanguage* QpackDecoderStreamLanguage() { static const QpackLanguage* const language = new QpackLanguage{ InsertCountIncrementInstruction(), HeaderAcknowledgementInstruction(), StreamCancellationInstruction()}; - ValidateLangague(language); + ValidateLanguage(language); return language; } @@ -136,7 +136,7 @@ const QpackInstruction* QpackPrefixInstruction() { const QpackLanguage* QpackPrefixLanguage() { static const QpackLanguage* const language = new QpackLanguage{QpackPrefixInstruction()}; - ValidateLangague(language); + ValidateLanguage(language); return language; } @@ -196,7 +196,7 @@ const QpackLanguage* QpackRequestStreamLanguage() { QpackLiteralHeaderFieldNameReferenceInstruction(), QpackLiteralHeaderFieldPostBaseInstruction(), QpackLiteralHeaderFieldInstruction()}; - ValidateLangague(language); + ValidateLanguage(language); return language; } diff --git a/quiche/quic/core/qpack/qpack_static_table.h b/quiche/quic/core/qpack/qpack_static_table.h index 7fc789587..4845d5ee8 100644 --- a/quiche/quic/core/qpack/qpack_static_table.h +++ b/quiche/quic/core/qpack/qpack_static_table.h @@ -21,7 +21,7 @@ using QpackStaticTable = spdy::HpackStaticTable; QUICHE_EXPORT const std::vector& QpackStaticTableVector(); // Returns a QpackStaticTable instance initialized with kQpackStaticTable. -// The instance is read-only, has static lifetime, and is safe to share amoung +// The instance is read-only, has static lifetime, and is safe to share among // threads. This function is thread-safe. QUICHE_EXPORT const QpackStaticTable& ObtainQpackStaticTable(); diff --git a/quiche/quic/core/qpack/value_splitting_header_list.cc b/quiche/quic/core/qpack/value_splitting_header_list.cc index faeccdf4f..614573e0f 100644 --- a/quiche/quic/core/qpack/value_splitting_header_list.cc +++ b/quiche/quic/core/qpack/value_splitting_header_list.cc @@ -40,7 +40,7 @@ bool ValueSplittingHeaderList::const_iterator::operator!=( const ValueSplittingHeaderList::const_iterator& ValueSplittingHeaderList::const_iterator::operator++() { if (value_end_ == absl::string_view::npos) { - // This was the last frament within |*header_list_iterator_|, + // This was the last fragment within |*header_list_iterator_|, // move on to the next header element of |header_list_|. ++header_list_iterator_; value_start_ = 0; diff --git a/quiche/quic/core/quic_bandwidth_test.cc b/quiche/quic/core/quic_bandwidth_test.cc index 2d2f99471..a0e73cddd 100644 --- a/quiche/quic/core/quic_bandwidth_test.cc +++ b/quiche/quic/core/quic_bandwidth_test.cc @@ -36,18 +36,18 @@ TEST_F(QuicBandwidthTest, FromTo) { } TEST_F(QuicBandwidthTest, Add) { - QuicBandwidth bandwidht_1 = QuicBandwidth::FromKBitsPerSecond(1); - QuicBandwidth bandwidht_2 = QuicBandwidth::FromKBytesPerSecond(1); + QuicBandwidth bandwidth_1 = QuicBandwidth::FromKBitsPerSecond(1); + QuicBandwidth bandwidth_2 = QuicBandwidth::FromKBytesPerSecond(1); - EXPECT_EQ(9000, (bandwidht_1 + bandwidht_2).ToBitsPerSecond()); - EXPECT_EQ(9000, (bandwidht_2 + bandwidht_1).ToBitsPerSecond()); + EXPECT_EQ(9000, (bandwidth_1 + bandwidth_2).ToBitsPerSecond()); + EXPECT_EQ(9000, (bandwidth_2 + bandwidth_1).ToBitsPerSecond()); } TEST_F(QuicBandwidthTest, Subtract) { - QuicBandwidth bandwidht_1 = QuicBandwidth::FromKBitsPerSecond(1); - QuicBandwidth bandwidht_2 = QuicBandwidth::FromKBytesPerSecond(1); + QuicBandwidth bandwidth_1 = QuicBandwidth::FromKBitsPerSecond(1); + QuicBandwidth bandwidth_2 = QuicBandwidth::FromKBytesPerSecond(1); - EXPECT_EQ(7000, (bandwidht_2 - bandwidht_1).ToBitsPerSecond()); + EXPECT_EQ(7000, (bandwidth_2 - bandwidth_1).ToBitsPerSecond()); } TEST_F(QuicBandwidthTest, TimeDelta) { diff --git a/quiche/quic/core/quic_buffered_packet_store.cc b/quiche/quic/core/quic_buffered_packet_store.cc index 650a08f00..9b84f4f8c 100644 --- a/quiche/quic/core/quic_buffered_packet_store.cc +++ b/quiche/quic/core/quic_buffered_packet_store.cc @@ -279,7 +279,7 @@ BufferedPacketList QuicBufferedPacketStore::DeliverPacketsForNextConnection( BufferedPacketList packets = DeliverPackets(*connection_id); QUICHE_DCHECK(!packets.buffered_packets.empty() && packets.parsed_chlo.has_value()) - << "Try to deliver connectons without CHLO. # packets:" + << "Try to deliver connections without CHLO. # packets:" << packets.buffered_packets.size() << ", has_parsed_chlo:" << packets.parsed_chlo.has_value(); return packets; diff --git a/quiche/quic/core/quic_buffered_packet_store_test.cc b/quiche/quic/core/quic_buffered_packet_store_test.cc index 562b516dd..6e712b993 100644 --- a/quiche/quic/core/quic_buffered_packet_store_test.cc +++ b/quiche/quic/core/quic_buffered_packet_store_test.cc @@ -54,7 +54,7 @@ class QuicBufferedPacketStoreVisitor last_expired_packet_queue_ = std::move(early_arrived_packets); } - // The packets queue for most recently expirect connection. + // The packets queue for most recently expired connection. BufferedPacketList last_expired_packet_queue_; }; @@ -146,7 +146,7 @@ TEST_F(QuicBufferedPacketStoreTest, // buffered. size_t num_packets = kDefaultMaxUndecryptablePackets + 1; QuicConnectionId connection_id = TestConnectionId(1); - // Arrived CHLO packet shouldn't affect how many non-CHLO pacekts store can + // Arrived CHLO packet shouldn't affect how many non-CHLO packets store can // keep. EXPECT_EQ( QuicBufferedPacketStore::SUCCESS, @@ -303,7 +303,7 @@ TEST_F(QuicBufferedPacketStoreTest, PacketQueueExpiredBeforeDelivery) { // CHLO on connection 3 arrives 1ms later. clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(1)); QuicConnectionId connection_id3 = TestConnectionId(3); - // Use different client address to differetiate packets from different + // Use different client address to differentiate packets from different // connections. QuicSocketAddress another_client_address(QuicIpAddress::Any4(), 255); store_.EnqueuePacket(connection_id3, false, packet_, self_address_, @@ -363,7 +363,7 @@ TEST_F(QuicBufferedPacketStoreTest, SimpleDiscardPackets) { EXPECT_TRUE(store_.HasBufferedPackets(connection_id)); EXPECT_FALSE(store_.HasChlosBuffered()); - // Dicard the packets + // Discard the packets store_.DiscardPackets(connection_id); // No packets on connection 1 should remain in the store @@ -391,7 +391,7 @@ TEST_F(QuicBufferedPacketStoreTest, DiscardWithCHLOs) { EXPECT_TRUE(store_.HasBufferedPackets(connection_id)); EXPECT_TRUE(store_.HasChlosBuffered()); - // Dicard the packets + // Discard the packets store_.DiscardPackets(connection_id); // No packets on connection 1 should remain in the store diff --git a/quiche/quic/core/quic_coalesced_packet_test.cc b/quiche/quic/core/quic_coalesced_packet_test.cc index 00ba7d8e1..a9f21354b 100644 --- a/quiche/quic/core/quic_coalesced_packet_test.cc +++ b/quiche/quic/core/quic_coalesced_packet_test.cc @@ -27,8 +27,8 @@ TEST(QuicCoalescedPacketTest, MaybeCoalescePacket) { buffer, 500, false, false); packet1.transmission_type = PTO_RETRANSMISSION; QuicAckFrame ack_frame(InitAckFrame(1)); - packet1.nonretransmittable_frames.push_back(QuicFrame(&ack_frame)); - packet1.retransmittable_frames.push_back( + packet1.nonretransmissible_frames.push_back(QuicFrame(&ack_frame)); + packet1.retransmissible_frames.push_back( QuicFrame(QuicStreamFrame(1, true, 0, 100))); ASSERT_TRUE(coalesced.MaybeCoalescePacket(packet1, self_address, peer_address, &allocator, 1500, ECN_NOT_ECT)); @@ -51,7 +51,7 @@ TEST(QuicCoalescedPacketTest, MaybeCoalescePacket) { SerializedPacket packet3(QuicPacketNumber(3), PACKET_4BYTE_PACKET_NUMBER, buffer, 500, false, false); - packet3.nonretransmittable_frames.push_back(QuicFrame(QuicPaddingFrame(100))); + packet3.nonretransmissible_frames.push_back(QuicFrame(QuicPaddingFrame(100))); packet3.encryption_level = ENCRYPTION_ZERO_RTT; packet3.transmission_type = LOSS_RETRANSMISSION; ASSERT_TRUE(coalesced.MaybeCoalescePacket(packet3, self_address, peer_address, @@ -155,8 +155,8 @@ TEST(QuicCoalescedPacketTest, NeuterInitialPacket) { buffer, 500, false, false); packet1.transmission_type = PTO_RETRANSMISSION; QuicAckFrame ack_frame(InitAckFrame(1)); - packet1.nonretransmittable_frames.push_back(QuicFrame(&ack_frame)); - packet1.retransmittable_frames.push_back( + packet1.nonretransmissible_frames.push_back(QuicFrame(&ack_frame)); + packet1.retransmissible_frames.push_back( QuicFrame(QuicStreamFrame(1, true, 0, 100))); ASSERT_TRUE(coalesced.MaybeCoalescePacket(packet1, self_address, peer_address, &allocator, 1500, ECN_NOT_ECT)); @@ -181,7 +181,7 @@ TEST(QuicCoalescedPacketTest, NeuterInitialPacket) { SerializedPacket packet2(QuicPacketNumber(3), PACKET_4BYTE_PACKET_NUMBER, buffer, 500, false, false); - packet2.nonretransmittable_frames.push_back(QuicFrame(QuicPaddingFrame(100))); + packet2.nonretransmissible_frames.push_back(QuicFrame(QuicPaddingFrame(100))); packet2.encryption_level = ENCRYPTION_ZERO_RTT; packet2.transmission_type = LOSS_RETRANSMISSION; ASSERT_TRUE(coalesced.MaybeCoalescePacket(packet2, self_address, peer_address, @@ -234,8 +234,8 @@ TEST(QuicCoalescedPacketTest, DoNotCoalesceDifferentEcn) { buffer, 500, false, false); packet1.transmission_type = PTO_RETRANSMISSION; QuicAckFrame ack_frame(InitAckFrame(1)); - packet1.nonretransmittable_frames.push_back(QuicFrame(&ack_frame)); - packet1.retransmittable_frames.push_back( + packet1.nonretransmissible_frames.push_back(QuicFrame(&ack_frame)); + packet1.retransmissible_frames.push_back( QuicFrame(QuicStreamFrame(1, true, 0, 100))); ASSERT_TRUE(coalesced.MaybeCoalescePacket(packet1, self_address, peer_address, &allocator, 1500, ECN_ECT1)); @@ -243,7 +243,7 @@ TEST(QuicCoalescedPacketTest, DoNotCoalesceDifferentEcn) { SerializedPacket packet2(QuicPacketNumber(2), PACKET_4BYTE_PACKET_NUMBER, buffer, 500, false, false); - packet2.nonretransmittable_frames.push_back(QuicFrame(QuicPaddingFrame(100))); + packet2.nonretransmissible_frames.push_back(QuicFrame(QuicPaddingFrame(100))); packet2.encryption_level = ENCRYPTION_ZERO_RTT; packet2.transmission_type = LOSS_RETRANSMISSION; EXPECT_FALSE(coalesced.MaybeCoalescePacket( diff --git a/quiche/quic/core/quic_config.cc b/quiche/quic/core/quic_config.cc index f0d78ba44..215d58507 100644 --- a/quiche/quic/core/quic_config.cc +++ b/quiche/quic/core/quic_config.cc @@ -900,7 +900,7 @@ void QuicConfig::SetPreferredAddressConnectionIdAndTokenToSend( !alternate_server_address_ipv6_.HasSendValue()) || preferred_address_connection_id_and_token_.has_value()) { QUIC_BUG(quic_bug_10575_17) - << "Can not send connection ID and token for preferred address"; + << "Cannot send connection ID and token for preferred address"; return; } preferred_address_connection_id_and_token_ = @@ -1019,7 +1019,7 @@ void QuicConfig::SetDefaults() { void QuicConfig::ToHandshakeMessage( CryptoHandshakeMessage* out, QuicTransportVersion transport_version) const { // Idle timeout has custom rules that are different from other values. - // We configure ourselves with the minumum value between the one sent and + // We configure ourselves with the minimum value between the one sent and // the one received. Additionally, when QUIC_CRYPTO is used, the server // MUST send an idle timeout no greater than the idle timeout it received // from the client. We therefore send the received value if it is lower. @@ -1070,7 +1070,7 @@ QuicErrorCode QuicConfig::ProcessPeerHello( QuicErrorCode error = QUIC_NO_ERROR; if (error == QUIC_NO_ERROR) { // Idle timeout has custom rules that are different from other values. - // We configure ourselves with the minumum value between the one sent and + // We configure ourselves with the minimum value between the one sent and // the one received. Additionally, when QUIC_CRYPTO is used, the server // MUST send an idle timeout no greater than the idle timeout it received // from the client. diff --git a/quiche/quic/core/quic_config.h b/quiche/quic/core/quic_config.h index 152994b55..277363ad1 100644 --- a/quiche/quic/core/quic_config.h +++ b/quiche/quic/core/quic_config.h @@ -442,7 +442,7 @@ class QUICHE_EXPORT QuicConfig { uint32_t ReceivedMaxAckDelayMs() const; // Manage the IETF QUIC extension Min Ack Delay transport parameter. - // An endpoint uses min_ack_delay to advsertise its support for + // An endpoint uses min_ack_delay to advertise its support for // AckFrequencyFrame sent by peer. void SetMinAckDelayMs(uint32_t min_ack_delay_ms); uint32_t GetMinAckDelayToSendMs() const; diff --git a/quiche/quic/core/quic_config_test.cc b/quiche/quic/core/quic_config_test.cc index 86e5a996d..f97028852 100644 --- a/quiche/quic/core/quic_config_test.cc +++ b/quiche/quic/core/quic_config_test.cc @@ -639,7 +639,7 @@ TEST_P(QuicConfigTest, ProcessTransportParametersServer) { EXPECT_FALSE(config_.HasReceivedInitialSourceConnectionId()); EXPECT_FALSE(config_.HasReceivedRetrySourceConnectionId()); - // Let the config process another slightly tweaked transport paramters. + // Let the config process another slightly tweaked transport parameters. // Note that the values for flow control and stream limit cannot be smaller // than before. This rule is enforced in QuicSession::OnConfigNegotiated(). params.initial_max_stream_data_bidi_local.set_value( diff --git a/quiche/quic/core/quic_connection.cc b/quiche/quic/core/quic_connection.cc index 513f4d0c4..8ac804a60 100644 --- a/quiche/quic/core/quic_connection.cc +++ b/quiche/quic/core/quic_connection.cc @@ -57,8 +57,8 @@ class QuicEncrypter; namespace { -// Maximum number of consecutive sent nonretransmittable packets. -const QuicPacketCount kMaxConsecutiveNonRetransmittablePackets = 19; +// Maximum number of consecutive sent nonretransmissible packets. +const QuicPacketCount kMaxConsecutiveNonRetransmissiblePackets = 19; // The minimum release time into future in ms. const int kMinReleaseTimeIntoFutureMs = 1; @@ -236,12 +236,12 @@ CongestionControlType GetDefaultCongestionControlType() { } bool ContainsNonProbingFrame(const SerializedPacket& packet) { - for (const QuicFrame& frame : packet.nonretransmittable_frames) { + for (const QuicFrame& frame : packet.nonretransmissible_frames) { if (!QuicUtils::IsProbingFrame(frame.type)) { return true; } } - for (const QuicFrame& frame : packet.retransmittable_frames) { + for (const QuicFrame& frame : packet.retransmissible_frames) { if (!QuicUtils::IsProbingFrame(frame.type)) { return true; } @@ -327,10 +327,10 @@ QuicConnection::QuicConnection( peer_max_packet_size_(kDefaultMaxPacketSizeTransportParam), largest_received_packet_size_(0), write_error_occurred_(false), - consecutive_num_packets_with_no_retransmittable_frames_(0), - max_consecutive_num_packets_with_no_retransmittable_frames_( - kMaxConsecutiveNonRetransmittablePackets), - bundle_retransmittable_with_pto_ack_(false), + consecutive_num_packets_with_no_retransmissible_frames_(0), + max_consecutive_num_packets_with_no_retransmissible_frames_( + kMaxConsecutiveNonRetransmissiblePackets), + bundle_retransmissible_with_pto_ack_(false), last_control_frame_id_(kInvalidControlFrameId), is_path_degrading_(false), processing_ack_frame_(false), @@ -599,10 +599,10 @@ void QuicConnection::SetFromConfig(const QuicConfig& config) { // Only conduct those experiments in IETF QUIC because random packets may // elicit reset and gQUIC PUBLIC_RESET will cause connection close. if (config.HasClientRequestedIndependentOption(kROWF, perspective_)) { - retransmittable_on_wire_behavior_ = SEND_FIRST_FORWARD_SECURE_PACKET; + retransmissible_on_wire_behavior_ = SEND_FIRST_FORWARD_SECURE_PACKET; } if (config.HasClientRequestedIndependentOption(kROWR, perspective_)) { - retransmittable_on_wire_behavior_ = SEND_RANDOM_BYTES; + retransmissible_on_wire_behavior_ = SEND_RANDOM_BYTES; } } if (config.HasClientRequestedIndependentOption(k3AFF, perspective_)) { @@ -616,7 +616,7 @@ void QuicConnection::SetFromConfig(const QuicConfig& config) { perspective_ == Perspective::IS_SERVER && config.HasClientSentConnectionOption(kSRWP, perspective_)) { QUIC_RELOADABLE_FLAG_COUNT(quic_enable_server_on_wire_ping); - set_initial_retransmittable_on_wire_timeout( + set_initial_retransmissible_on_wire_timeout( QuicTime::Delta::FromMilliseconds(200)); } @@ -639,7 +639,7 @@ void QuicConnection::SetFromConfig(const QuicConfig& config) { framer_.set_peer_ack_delay_exponent(config.ReceivedAckDelayExponent()); } if (config.HasClientSentConnectionOption(kEACK, perspective_)) { - bundle_retransmittable_with_pto_ack_ = true; + bundle_retransmissible_with_pto_ack_ = true; } if (config.HasClientSentConnectionOption(kDFER, perspective_)) { defer_send_in_response_to_packets_ = false; @@ -811,7 +811,7 @@ bool QuicConnection::SelectMutualVersion( } void QuicConnection::OnError(QuicFramer* framer) { - // Packets that we can not or have not decrypted are dropped. + // Packets that we cannot or have not decrypted are dropped. // TODO(rch): add stats to measure this. if (!connected_ || !last_received_packet_info_.decrypted) { return; @@ -1386,7 +1386,7 @@ bool QuicConnection::OnStreamFrame(const QuicStreamFrame& frame) { MaybeUpdateAckTimeout(); visitor_->OnStreamFrame(frame); stats_.stream_bytes_received += frame.data_length; - ping_manager_.reset_consecutive_retransmittable_on_wire_count(); + ping_manager_.reset_consecutive_retransmissible_on_wire_count(); return connected_; } @@ -1712,7 +1712,7 @@ bool QuicConnection::OnPathChallengeFrame(const QuicPathChallengeFrame& frame) { // The perspective is server // The PATH_CHALLENGE is received on an unvalidated alternative path. // The connection isn't validating migrated peer address, which is of - // higher prority. + // higher priority. QUIC_DVLOG(1) << "Proactively validate the effective peer address " << effective_peer_address_to_respond; QUIC_CODE_COUNT_N(quic_kick_off_client_address_validation, 2, 6); @@ -2032,7 +2032,7 @@ bool QuicConnection::OnNewTokenFrame(const QuicNewTokenFrame& frame) { ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); return false; } - // NEW_TOKEN frame should insitgate ACKs. + // NEW_TOKEN frame should instigate ACKs. MaybeUpdateAckTimeout(); visitor_->OnNewTokenReceived(frame.token); return true; @@ -2302,7 +2302,7 @@ void QuicConnection::ClearLastFrames() { void QuicConnection::CloseIfTooManyOutstandingSentPackets() { // This occurs if we don't discard old packets we've seen fast enough. It's - // possible largest observed is less than leaset unacked. + // possible largest observed is less than least unacked. const bool should_close = sent_packet_manager_.GetLargestSentPacket().IsInitialized() && sent_packet_manager_.GetLargestSentPacket() > @@ -2396,7 +2396,7 @@ void QuicConnection::MaybeSendInResponseToPacket() { send_alarm_->Cancel(); } - if (CanWrite(HAS_RETRANSMITTABLE_DATA)) { + if (CanWrite(HAS_RETRANSMISSIBLE_DATA)) { // Some data can be written immediately. Register for immediate resumption // so we'll keep writing after other connections. QUIC_BUG_IF(quic_send_alarm_set_with_data_to_send, send_alarm_->IsSet()); @@ -2431,7 +2431,7 @@ void QuicConnection::MaybeSendInResponseToPacket() { send_alarm_->Set(max_deadline); return; } - // Can not send data due to other reasons: congestion blocked, anti + // Cannot send data due to other reasons: congestion blocked, anti // amplification throttled, etc. QUIC_DVLOG(1) << "No send alarm after processing packet. Other reasons."; QUIC_RELOADABLE_FLAG_COUNT_N(quic_no_send_alarm_unless_necessary, 7, 7); @@ -2497,7 +2497,7 @@ bool QuicConnection::SendControlFrame(const QuicFrame& frame) { } ScopedPacketFlusher flusher(this); const bool consumed = - packet_creator_.ConsumeRetransmittableControlFrame(frame); + packet_creator_.ConsumeRetransmissibleControlFrame(frame); if (!consumed) { QUIC_DVLOG(1) << ENDPOINT << "Failed to send control frame: " << frame; return false; @@ -2812,7 +2812,7 @@ void QuicConnection::OnCanWrite() { // Sending queued packets may have caused the socket to become write blocked, // or the congestion manager to prohibit sending. - if (!CanWrite(HAS_RETRANSMITTABLE_DATA)) { + if (!CanWrite(HAS_RETRANSMISSIBLE_DATA)) { return; } @@ -2822,7 +2822,7 @@ void QuicConnection::OnCanWrite() { // After the visitor writes, it may have caused the socket to become write // blocked or the congestion manager to prohibit sending, so check again. if (visitor_->WillingAndAbleToWrite() && !send_alarm_->IsSet() && - CanWrite(HAS_RETRANSMITTABLE_DATA)) { + CanWrite(HAS_RETRANSMISSIBLE_DATA)) { // We're not write blocked, but some data wasn't written. Register for // 'immediate' resumption so we'll keep writing after other connections. send_alarm_->Set(clock_->ApproximateNow()); @@ -3150,7 +3150,7 @@ bool QuicConnection::IsMissingDestinationConnectionID() const { } bool QuicConnection::ShouldGeneratePacket( - HasRetransmittableData retransmittable, IsHandshake handshake) { + HasRetransmissibleData retransmissible, IsHandshake handshake) { QUICHE_DCHECK(handshake != IS_HANDSHAKE || QuicVersionUsesCryptoFrames(transport_version())) << ENDPOINT @@ -3166,12 +3166,12 @@ bool QuicConnection::ShouldGeneratePacket( } if (IsDefaultPath(default_path_.self_address, packet_creator_.peer_address())) { - return CanWrite(retransmittable); + return CanWrite(retransmissible); } // This is checking on the alternative path with a different peer address. The // self address and the writer used are the same as the default path. In the // case of different self address and writer, writing packet would use a - // differnt code path without checking the states of the default writer. + // different code path without checking the states of the default writer. return connected_ && !HandleWriteBlocked(); } @@ -3192,7 +3192,7 @@ const QuicFrames QuicConnection::MaybeBundleOpportunistically() { } if (packet_creator_.flush_ack_in_maybe_bundle() && - (packet_creator_.has_ack() || !CanWrite(NO_RETRANSMITTABLE_DATA))) { + (packet_creator_.has_ack() || !CanWrite(NO_RETRANSMISSIBLE_DATA))) { QUIC_RELOADABLE_FLAG_COUNT_N(quic_flush_ack_in_maybe_bundle, 2, 3); return {}; } @@ -3227,7 +3227,7 @@ const QuicFrames QuicConnection::MaybeBundleOpportunistically() { return frames; } -bool QuicConnection::CanWrite(HasRetransmittableData retransmittable) { +bool QuicConnection::CanWrite(HasRetransmissibleData retransmissible) { if (!connected_) { return false; } @@ -3281,7 +3281,7 @@ bool QuicConnection::CanWrite(HasRetransmittableData retransmittable) { } // Allow acks and probing frames to be sent immediately. - if (retransmittable == NO_RETRANSMITTABLE_DATA) { + if (retransmissible == NO_RETRANSMISSIBLE_DATA) { return true; } // If the send alarm is set, wait for it to fire. @@ -3339,7 +3339,7 @@ bool QuicConnection::WritePacket(SerializedPacket* packet) { return true; } const bool is_mtu_discovery = QuicUtils::ContainsFrameType( - packet->nonretransmittable_frames, MTU_DISCOVERY_FRAME); + packet->nonretransmissible_frames, MTU_DISCOVERY_FRAME); const SerializedPacketFate fate = packet->fate; // Termination packets are encrypted and saved, so don't exit early. QuicErrorCode error_code = QUIC_NO_ERROR; @@ -3376,7 +3376,7 @@ bool QuicConnection::WritePacket(SerializedPacket* packet) { << " > packet_creator max_packet_length=" << packet_creator_.max_packet_length(); QUIC_DVLOG(1) << ENDPOINT << "Sending packet " << packet_number << " : " - << (IsRetransmittable(*packet) == HAS_RETRANSMITTABLE_DATA + << (IsRetransmissible(*packet) == HAS_RETRANSMISSIBLE_DATA ? "data bearing " : " ack or probing only ") << ", encryption level: " << packet->encryption_level @@ -3414,10 +3414,10 @@ bool QuicConnection::WritePacket(SerializedPacket* packet) { ContainsNonProbingFrame(*packet)) << "Packet " << packet->packet_number << " with non-probing frames was sent on alternative path: " - "nonretransmittable_frames: " - << QuicFramesToString(packet->nonretransmittable_frames) - << " retransmittable_frames: " - << QuicFramesToString(packet->retransmittable_frames); + "nonretransmissible_frames: " + << QuicFramesToString(packet->nonretransmissible_frames) + << " retransmissible_frames: " + << QuicFramesToString(packet->retransmissible_frames); } switch (fate) { case DISCARD: @@ -3485,10 +3485,10 @@ bool QuicConnection::WritePacket(SerializedPacket* packet) { result = SendPacketToWriter( packet->encrypted_buffer, encrypted_length, send_from_address.host(), send_to_address, writer_, GetEcnCodepointToSend(send_to_address)); - // This is a work around for an issue with linux UDP GSO batch writers. + // This is a workaround for an issue with linux UDP GSO batch writers. // When sending a GSO packet with 2 segments, if the first segment is // larger than the path MTU, instead of EMSGSIZE, the linux kernel returns - // EINVAL, which translates to WRITE_STATUS_ERROR and causes conneciton to + // EINVAL, which translates to WRITE_STATUS_ERROR and causes connection to // be closed. By manually flush the writer here, the MTU probe is sent in // a normal(non-GSO) packet, so the kernel can return EMSGSIZE and we will // not close the connection. @@ -3567,10 +3567,10 @@ bool QuicConnection::WritePacket(SerializedPacket* packet) { packet_send_time = packet_send_time + result.send_time_offset; } - if (IsRetransmittable(*packet) == HAS_RETRANSMITTABLE_DATA && + if (IsRetransmissible(*packet) == HAS_RETRANSMISSIBLE_DATA && !is_termination_packet) { // Start blackhole/path degrading detections if the sent packet is not - // termination packet and contains retransmittable data. + // termination packet and contains retransmissible data. // Do not restart detection if detection is in progress indicating no // forward progress has been made since last event (i.e., packet was sent // or new packets were acknowledged). @@ -3606,7 +3606,7 @@ bool QuicConnection::WritePacket(SerializedPacket* packet) { << " while current path has peer address " << peer_address(); const bool in_flight = sent_packet_manager_.OnPacketSent( packet, packet_send_time, packet->transmission_type, - IsRetransmittable(*packet), /*measure_rtt=*/send_on_current_path, + IsRetransmissible(*packet), /*measure_rtt=*/send_on_current_path, last_ecn_codepoint_sent_); QUIC_BUG_IF(quic_bug_12714_25, perspective_ == Perspective::IS_SERVER && @@ -3627,8 +3627,8 @@ bool QuicConnection::WritePacket(SerializedPacket* packet) { packet->encryption_level, sent_packet_manager_.unacked_packets() .rbegin() - ->retransmittable_frames, - packet->nonretransmittable_frames, packet_send_time, result.batch_id); + ->retransmissible_frames, + packet->nonretransmissible_frames, packet_send_time, result.batch_id); } } if (packet->encryption_level == ENCRYPTION_HANDSHAKE) { @@ -3923,14 +3923,14 @@ void QuicConnection::OnSerializedPacket(SerializedPacket serialized_packet) { return; } - if (serialized_packet.retransmittable_frames.empty()) { - // Increment consecutive_num_packets_with_no_retransmittable_frames_ if - // this packet is a new transmission with no retransmittable frames. - ++consecutive_num_packets_with_no_retransmittable_frames_; + if (serialized_packet.retransmissible_frames.empty()) { + // Increment consecutive_num_packets_with_no_retransmissible_frames_ if + // this packet is a new transmission with no retransmissible frames. + ++consecutive_num_packets_with_no_retransmissible_frames_; } else { - consecutive_num_packets_with_no_retransmittable_frames_ = 0; + consecutive_num_packets_with_no_retransmissible_frames_ = 0; } - if (retransmittable_on_wire_behavior_ == SEND_FIRST_FORWARD_SECURE_PACKET && + if (retransmissible_on_wire_behavior_ == SEND_FIRST_FORWARD_SECURE_PACKET && first_serialized_one_rtt_packet_ == nullptr && serialized_packet.encryption_level == ENCRYPTION_FORWARD_SECURE) { first_serialized_one_rtt_packet_ = std::make_unique( @@ -4030,7 +4030,7 @@ void QuicConnection::OnHandshakeComplete() { // This AckFrequencyFrame is meant to only update the max_ack_delay. Set // packet tolerance to the default value for now. ack_frequency_frame.packet_tolerance = - kDefaultRetransmittablePacketsBeforeAck; + kDefaultRetransmissiblePacketsBeforeAck; visitor_->SendAckFrequency(ack_frequency_frame); if (!connected_) { return; @@ -4104,17 +4104,17 @@ void QuicConnection::SendAck() { return; } ResetAckStates(); - if (!ShouldBundleRetransmittableFrameWithAck()) { + if (!ShouldBundleRetransmissibleFrameWithAck()) { return; } - consecutive_num_packets_with_no_retransmittable_frames_ = 0; - if (packet_creator_.HasPendingRetransmittableFrames() || + consecutive_num_packets_with_no_retransmissible_frames_ = 0; + if (packet_creator_.HasPendingRetransmissibleFrames() || visitor_->WillingAndAbleToWrite()) { - // There are pending retransmittable frames. + // There are pending retransmissible frames. return; } - visitor_->OnAckNeedsRetransmittableFrame(); + visitor_->OnAckNeedsRetransmissibleFrame(); } EncryptionLevel QuicConnection::GetEncryptionLevelToSendPingForSpace( @@ -4589,7 +4589,7 @@ void QuicConnection::SendConnectionClosePacket( frame = new QuicConnectionCloseFrame(transport_version(), error, ietf_error, details, framer_.current_received_frame_type()); - packet_creator_.ConsumeRetransmittableControlFrame(QuicFrame(frame)); + packet_creator_.ConsumeRetransmissibleControlFrame(QuicFrame(frame)); packet_creator_.FlushCurrentPacket(); if (version().CanSendCoalescedPackets()) { FlushCoalescedPacket(); @@ -4634,7 +4634,7 @@ void QuicConnection::SendConnectionClosePacket( auto* frame = new QuicConnectionCloseFrame( transport_version(), error, ietf_error, details, framer_.current_received_frame_type()); - packet_creator_.ConsumeRetransmittableControlFrame(QuicFrame(frame)); + packet_creator_.ConsumeRetransmissibleControlFrame(QuicFrame(frame)); packet_creator_.FlushCurrentPacket(); } if (version().CanSendCoalescedPackets()) { @@ -4812,7 +4812,7 @@ QuicConnection::ScopedPacketFlusher::~ScopedPacketFlusher() { connection_->uber_received_packet_manager_.GetEarliestAckTimeout(); if (ack_timeout.IsInitialized()) { if (ack_timeout <= connection_->clock_->ApproximateNow() && - !connection_->CanWrite(NO_RETRANSMITTABLE_DATA)) { + !connection_->CanWrite(NO_RETRANSMISSIBLE_DATA)) { // Cancel ACK alarm if connection is write blocked, and ACK will be // sent when connection gets unblocked. connection_->ack_alarm_->Cancel(); @@ -4975,24 +4975,24 @@ std::ostream& operator<<(std::ostream& os, return os; } -HasRetransmittableData QuicConnection::IsRetransmittable( +HasRetransmissibleData QuicConnection::IsRetransmissible( const SerializedPacket& packet) { - // Retransmitted packets retransmittable frames are owned by the unacked + // Retransmitted packets retransmissible frames are owned by the unacked // packet map, but are not present in the serialized packet. if (packet.transmission_type != NOT_RETRANSMISSION || - !packet.retransmittable_frames.empty()) { - return HAS_RETRANSMITTABLE_DATA; + !packet.retransmissible_frames.empty()) { + return HAS_RETRANSMISSIBLE_DATA; } else { - return NO_RETRANSMITTABLE_DATA; + return NO_RETRANSMISSIBLE_DATA; } } bool QuicConnection::IsTerminationPacket(const SerializedPacket& packet, QuicErrorCode* error_code) { - if (packet.retransmittable_frames.empty()) { + if (packet.retransmissible_frames.empty()) { return false; } - for (const QuicFrame& frame : packet.retransmittable_frames) { + for (const QuicFrame& frame : packet.retransmissible_frames) { if (frame.type == CONNECTION_CLOSE_FRAME) { *error_code = frame.connection_close_frame->quic_error_code; return true; @@ -5087,7 +5087,7 @@ bool QuicConnection::SendConnectivityProbingPacket( packet_creator_.SerializePathChallengeConnectivityProbingPacket( transmitted_connectivity_probe_payload); } - QUICHE_DCHECK_EQ(IsRetransmittable(*probing_packet), NO_RETRANSMITTABLE_DATA); + QUICHE_DCHECK_EQ(IsRetransmissible(*probing_packet), NO_RETRANSMISSIBLE_DATA); return WritePacketUsingWriter(std::move(probing_packet), probing_writer, self_address(), peer_address, /*measure_rtt=*/true); @@ -5124,10 +5124,10 @@ bool QuicConnection::WritePacketUsingWriter( return false; } - // Send in currrent path. Call OnPacketSent regardless of the write result. + // Send in current path. Call OnPacketSent regardless of the write result. sent_packet_manager_.OnPacketSent( packet.get(), packet_send_time, packet->transmission_type, - NO_RETRANSMITTABLE_DATA, measure_rtt, last_ecn_codepoint_sent_); + NO_RETRANSMISSIBLE_DATA, measure_rtt, last_ecn_codepoint_sent_); if (debug_visitor_ != nullptr) { if (sent_packet_manager_.unacked_packets().empty()) { @@ -5140,8 +5140,8 @@ bool QuicConnection::WritePacketUsingWriter( packet->encryption_level, sent_packet_manager_.unacked_packets() .rbegin() - ->retransmittable_frames, - packet->nonretransmittable_frames, packet_send_time, writer_batch_id); + ->retransmissible_frames, + packet->nonretransmissible_frames, packet_send_time, writer_batch_id); } } @@ -5387,7 +5387,7 @@ void QuicConnection::StartEffectivePeerMigration(AddressChangeType type) { alternative_path_.peer_address.host() != default_path_.peer_address.host()); - // Save previous default path to the altenative path. + // Save previous default path to the alternative path. if (previous_default_path.validated) { // The old path is a validated path which the connection might revert back // to later. Store it as the alternative path. @@ -5399,7 +5399,7 @@ void QuicConnection::StartEffectivePeerMigration(AddressChangeType type) { // validating that address, a new reverse path validation is needed. if (!path_validator_.IsValidatingPeerAddress( current_effective_peer_address)) { - ++stats_.num_reverse_path_validtion_upon_migration; + ++stats_.num_reverse_path_validation_upon_migration; ValidatePath(std::make_unique( default_path_.self_address, peer_address(), default_path_.peer_address, this), @@ -5512,7 +5512,7 @@ bool QuicConnection::UpdatePacketContent(QuicFrameType type) { // Skip reverse path validation because either handshake hasn't // completed or the connection is validating the default path. Using // PATH_CHALLENGE to validate alternative client address before - // handshake gets comfirmed is meaningless because anyone can respond to + // handshake gets confirmed is meaningless because anyone can respond to // it. If the connection is validating the default path, this // alternative path is currently the only validated path which shouldn't // be overridden. @@ -5520,7 +5520,7 @@ bool QuicConnection::UpdatePacketContent(QuicFrameType type) { "validating a recent peer address change."; QUIC_BUG_IF(quic_bug_12714_30, IsHandshakeConfirmed() && !alternative_path_.validated) - << "No validated peer address to send after handshake comfirmed."; + << "No validated peer address to send after handshake confirmed."; } else if (!IsReceivedPeerAddressValidated()) { QuicConnectionId client_connection_id; absl::optional stateless_reset_token; @@ -5720,7 +5720,7 @@ MessageStatus QuicConnection::SendMessage( if (MemSliceSpanTotalSize(message) > GetCurrentLargestMessagePayload()) { return MESSAGE_STATUS_TOO_LARGE; } - if (!connected_ || (!flush && !CanWrite(HAS_RETRANSMITTABLE_DATA))) { + if (!connected_ || (!flush && !CanWrite(HAS_RETRANSMISSIBLE_DATA))) { return MESSAGE_STATUS_BLOCKED; } ScopedPacketFlusher flusher(this); @@ -5874,30 +5874,30 @@ void QuicConnection::SendAllPendingAcks() { // If there are ACKs pending, re-arm ack alarm. ack_alarm_->Update(timeout, kAlarmGranularity); } - // Only try to bundle retransmittable data with ACK frame if default + // Only try to bundle retransmissible data with ACK frame if default // encryption level is forward secure. if (encryption_level_ != ENCRYPTION_FORWARD_SECURE || - !ShouldBundleRetransmittableFrameWithAck()) { + !ShouldBundleRetransmissibleFrameWithAck()) { return; } - consecutive_num_packets_with_no_retransmittable_frames_ = 0; - if (packet_creator_.HasPendingRetransmittableFrames() || + consecutive_num_packets_with_no_retransmissible_frames_ = 0; + if (packet_creator_.HasPendingRetransmissibleFrames() || visitor_->WillingAndAbleToWrite()) { - // There are pending retransmittable frames. + // There are pending retransmissible frames. return; } - visitor_->OnAckNeedsRetransmittableFrame(); + visitor_->OnAckNeedsRetransmissibleFrame(); } -bool QuicConnection::ShouldBundleRetransmittableFrameWithAck() const { - if (consecutive_num_packets_with_no_retransmittable_frames_ >= - max_consecutive_num_packets_with_no_retransmittable_frames_) { +bool QuicConnection::ShouldBundleRetransmissibleFrameWithAck() const { + if (consecutive_num_packets_with_no_retransmissible_frames_ >= + max_consecutive_num_packets_with_no_retransmissible_frames_) { return true; } - if (bundle_retransmittable_with_pto_ack_ && + if (bundle_retransmissible_with_pto_ack_ && sent_packet_manager_.GetConsecutivePtoCount() > 0) { - // Bundle a retransmittable frame with an ACK if PTO has fired in order to + // Bundle a retransmissible frame with an ACK if PTO has fired in order to // recover more quickly in cases of temporary network outage. return true; } @@ -5909,7 +5909,7 @@ void QuicConnection::MaybeCoalescePacketOfHigherSpace() { return; } if (fill_coalesced_packet_) { - // Make sure MaybeCoalescePacketOfHigherSpace is not re-entrant. + // Make sure MaybeCoalescePacketOfHigherSpace is not reentrant. QUIC_BUG(quic_coalesce_packet_reentrant); return; } @@ -5978,7 +5978,7 @@ bool QuicConnection::FlushCoalescedPacket() { << coalesced_packet_.ToString(length); const size_t padding_size = length - std::min(length, coalesced_packet_.length()); - // Buffer coalesced packet if padding + bytes_sent exceeds amplifcation limit. + // Buffer coalesced packet if padding + bytes_sent exceeds amplification limit. if (!buffered_packets_.empty() || HandleWriteBlocked() || (enforce_strict_amplification_factor_ && LimitedByAmplificationFactor(padding_size))) { @@ -6082,7 +6082,7 @@ void QuicConnection::OnForwardProgressMade() { GetNetworkBlackholeDeadline(), GetPathMtuReductionDeadline()); } else { - // Stop detections in quiecense. + // Stop detections in quiescence. blackhole_detector_.StopDetection(/*permanent=*/false); } QUIC_BUG_IF(quic_bug_12714_35, @@ -6345,13 +6345,13 @@ void QuicConnection::OnKeepAliveTimeout() { SendPingAtLevel(framer().GetEncryptionLevelToSendApplicationData()); } -void QuicConnection::OnRetransmittableOnWireTimeout() { +void QuicConnection::OnRetransmissibleOnWireTimeout() { if (retransmission_alarm_->IsSet() || !visitor_->ShouldKeepConnectionAlive()) { return; } bool packet_buffered = false; - switch (retransmittable_on_wire_behavior_) { + switch (retransmissible_on_wire_behavior_) { case DEFAULT: break; case SEND_FIRST_FORWARD_SECURE_PACKET: @@ -6379,7 +6379,7 @@ void QuicConnection::OnRetransmittableOnWireTimeout() { } if (connected_) { // Always reset PING alarm with has_in_flight_packets=true. This is used - // to avoid re-arming the alarm in retransmittable-on-wire mode. + // to avoid re-arming the alarm in retransmissible-on-wire mode. ping_manager_.SetAlarm(clock_->ApproximateNow(), visitor_->ShouldKeepConnectionAlive(), /*has_in_flight_packets=*/true); @@ -6405,7 +6405,7 @@ void QuicConnection::OnPeerIssuedConnectionIdRetired() { !peer_issued_cid_manager_->IsConnectionIdActive(*default_path_cid)) { *default_path_cid = QuicConnectionId(); } - // TODO(haoyuewang) Handle the change for default_path_ & alternatvie_path_ + // TODO(haoyuewang) Handle the change for default_path_ & alternative_path_ // via the same helper function. if (default_path_cid->IsEmpty()) { // Try setting a new connection ID now such that subsequent @@ -6626,9 +6626,9 @@ bool QuicConnection::SendPathChallenge( std::unique_ptr probing_packet = packet_creator_.SerializePathChallengeConnectivityProbingPacket( data_buffer); - QUICHE_DCHECK_EQ(IsRetransmittable(*probing_packet), - NO_RETRANSMITTABLE_DATA) - << ENDPOINT << "Probing Packet contains retransmittable frames"; + QUICHE_DCHECK_EQ(IsRetransmissible(*probing_packet), + NO_RETRANSMISSIBLE_DATA) + << ENDPOINT << "Probing Packet contains retransmissible frames"; QUICHE_DCHECK_EQ(self_address, alternative_path_.self_address) << ENDPOINT << "Send PATH_CHALLENGE from self_address: " << self_address.ToString() @@ -6682,7 +6682,7 @@ void QuicConnection::ValidatePath( (peer_issued_cid_manager_ != nullptr && !peer_issued_cid_manager_->HasUnusedConnectionId())) { QUIC_DVLOG(1) << "Client cannot start new path validation as there is no " - "requried connection ID is available."; + "required connection ID is available."; result_delegate->OnPathValidationFailure(std::move(context)); return; } @@ -6752,7 +6752,7 @@ bool QuicConnection::SendPathResponse( std::unique_ptr probing_packet = packet_creator_.SerializePathResponseConnectivityProbingPacket( {data_buffer}, /*is_padded=*/true); - QUICHE_DCHECK_EQ(IsRetransmittable(*probing_packet), NO_RETRANSMITTABLE_DATA); + QUICHE_DCHECK_EQ(IsRetransmissible(*probing_packet), NO_RETRANSMISSIBLE_DATA); QUIC_DVLOG(1) << ENDPOINT << "Send PATH_RESPONSE from alternative socket with address " << last_received_packet_info_.destination_address; @@ -7335,7 +7335,7 @@ QuicConnection::OnPeerIpAddressChanged() { // OnConnectionMigration() may have changed the retransmission timer, so // re-arm it. SetRetransmissionAlarm(); - // Stop detections in quiecense. + // Stop detections in quiescence. blackhole_detector_.StopDetection(/*permanent=*/false); return old_send_algorithm; } @@ -7345,10 +7345,10 @@ void QuicConnection::set_keep_alive_ping_timeout( ping_manager_.set_keep_alive_timeout(keep_alive_ping_timeout); } -void QuicConnection::set_initial_retransmittable_on_wire_timeout( - QuicTime::Delta retransmittable_on_wire_timeout) { - ping_manager_.set_initial_retransmittable_on_wire_timeout( - retransmittable_on_wire_timeout); +void QuicConnection::set_initial_retransmissible_on_wire_timeout( + QuicTime::Delta retransmissible_on_wire_timeout) { + ping_manager_.set_initial_retransmissible_on_wire_timeout( + retransmissible_on_wire_timeout); } bool QuicConnection::IsValidatingServerPreferredAddress() const { diff --git a/quiche/quic/core/quic_connection.h b/quiche/quic/core/quic_connection.h index 469e40af1..807a4d719 100644 --- a/quiche/quic/core/quic_connection.h +++ b/quiche/quic/core/quic_connection.h @@ -161,10 +161,10 @@ class QUICHE_EXPORT QuicConnectionVisitorInterface { virtual void OnForwardProgressMadeAfterPathDegrading() = 0; // Called when the connection sends ack after - // max_consecutive_num_packets_with_no_retransmittable_frames_ consecutive not - // retransmittable packets sent. To instigate an ack from peer, a - // retransmittable frame needs to be added. - virtual void OnAckNeedsRetransmittableFrame() = 0; + // max_consecutive_num_packets_with_no_retransmissible_frames_ consecutive not + // retransmissible packets sent. To instigate an ack from peer, a + // retransmissible frame needs to be added. + virtual void OnAckNeedsRetransmissibleFrame() = 0; // Called when an AckFrequency frame need to be sent. virtual void SendAckFrequency(const QuicAckFrequencyFrame& frame) = 0; @@ -279,8 +279,8 @@ class QUICHE_EXPORT QuicConnectionDebugVisitor bool /*has_crypto_handshake*/, TransmissionType /*transmission_type*/, EncryptionLevel /*encryption_level*/, - const QuicFrames& /*retransmittable_frames*/, - const QuicFrames& /*nonretransmittable_frames*/, + const QuicFrames& /*retransmissible_frames*/, + const QuicFrames& /*nonretransmissible_frames*/, QuicTime /*sent_time*/, uint32_t /*batch_id*/) {} // Called when a coalesced packet is successfully serialized. @@ -316,7 +316,7 @@ class QUICHE_EXPORT QuicConnectionDebugVisitor // Called when a duplicate packet has been received. virtual void OnDuplicatePacket(QuicPacketNumber /*packet_number*/) {} - // Called when the protocol version on the received packet doensn't match + // Called when the protocol version on the received packet doesn't match // current protocol version of the connection. virtual void OnProtocolVersionMismatch(ParsedQuicVersion /*version*/) {} @@ -725,7 +725,7 @@ class QUICHE_EXPORT QuicConnection // creator. bool IsMissingDestinationConnectionID() const; // QuicPacketCreator::DelegateInterface - bool ShouldGeneratePacket(HasRetransmittableData retransmittable, + bool ShouldGeneratePacket(HasRetransmissibleData retransmissible, IsHandshake handshake) override; const QuicFrames MaybeBundleOpportunistically() override; QuicPacketBuffer GetPacketBuffer() override; @@ -752,7 +752,7 @@ class QUICHE_EXPORT QuicConnection // QuicPingManager::Delegate void OnKeepAliveTimeout() override; - void OnRetransmittableOnWireTimeout() override; + void OnRetransmissibleOnWireTimeout() override; // QuicConnectionIdManagerVisitorInterface void OnPeerIssuedConnectionIdRetired() override; @@ -798,10 +798,10 @@ class QUICHE_EXPORT QuicConnection // Used in Chromium, but not internally. // Must only be called before ping_alarm_ is set. void set_keep_alive_ping_timeout(QuicTime::Delta keep_alive_ping_timeout); - // Sets an initial timeout for the ping alarm when there is no retransmittable + // Sets an initial timeout for the ping alarm when there is no retransmissible // data in flight, allowing for a more aggressive ping alarm in that case. - void set_initial_retransmittable_on_wire_timeout( - QuicTime::Delta retransmittable_on_wire_timeout); + void set_initial_retransmissible_on_wire_timeout( + QuicTime::Delta retransmissible_on_wire_timeout); // Used in Chromium, but not internally. void set_creator_debug_delegate(QuicPacketCreator::DebugDelegate* visitor) { packet_creator_.set_debug_delegate(visitor); @@ -952,7 +952,7 @@ class QUICHE_EXPORT QuicConnection return uber_received_packet_manager_; } - bool CanWrite(HasRetransmittableData retransmittable); + bool CanWrite(HasRetransmissibleData retransmissible); // When the flusher is out of scope, only the outermost flusher will cause a // flush of the connection and set the retransmission alarm if there is one @@ -1212,7 +1212,7 @@ class QUICHE_EXPORT QuicConnection QuicTime GetRetryTimeout(const QuicSocketAddress& peer_address_to_use, QuicPacketWriter* writer_to_use) const override; - // Start vaildating the path defined by |context| asynchronously and call the + // Start validating the path defined by |context| asynchronously and call the // |result_delegate| after validation finishes. If the connection is // validating another path, cancel and fail that validation before starting // this one. @@ -1433,7 +1433,7 @@ class QUICHE_EXPORT QuicConnection private: friend class test::QuicConnectionPeer; - enum RetransmittableOnWireBehavior { + enum RetransmissibleOnWireBehavior { DEFAULT, // Send packet containing a PING frame. SEND_FIRST_FORWARD_SECURE_PACKET, // Send 1st 1-RTT packet. SEND_RANDOM_BYTES // Send random bytes which is an unprocessable packet. @@ -1564,7 +1564,7 @@ class QUICHE_EXPORT QuicConnection QUICHE_EXPORT friend std::ostream& operator<<( std::ostream& os, const QuicConnection::ReceivedPacketInfo& info); - // UndecrytablePacket comprises a undecryptable packet and related + // UndecryptablePacket comprises a undecryptable packet and related // information. struct QUICHE_EXPORT UndecryptablePacket { UndecryptablePacket(const QuicEncryptedPacket& packet, @@ -1710,12 +1710,12 @@ class QUICHE_EXPORT QuicConnection // encryption_level. Returns true on successful write, and false if the writer // was blocked and the write needs to be tried again. Notifies the // SentPacketManager when the write is successful and sets - // retransmittable frames to nullptr. + // retransmissible frames to nullptr. // Saves the connection close packet for later transmission, even if the // writer is write blocked. bool WritePacket(SerializedPacket* packet); - // Enforce AEAD Confidentiality limits by iniating key update or closing + // Enforce AEAD Confidentiality limits by initiating key update or closing // connection if too many packets have been encrypted with the current key. // Returns true if the connection was closed. Should not be called for // termination packets. @@ -1761,7 +1761,7 @@ class QUICHE_EXPORT QuicConnection // |sent_packet_number| is the recently sent packet number. void MaybeSetMtuAlarm(QuicPacketNumber sent_packet_number); - HasRetransmittableData IsRetransmittable(const SerializedPacket& packet); + HasRetransmissibleData IsRetransmissible(const SerializedPacket& packet); bool IsTerminationPacket(const SerializedPacket& packet, QuicErrorCode* error_code); @@ -1773,7 +1773,7 @@ class QUICHE_EXPORT QuicConnection QuicByteCount GetLimitedMaxPacketSize( QuicByteCount suggested_max_packet_size); - // Do any work which logically would be done in OnPacket but can not be + // Do any work which logically would be done in OnPacket but cannot be // safely done until the packet is validated. Returns true if packet can be // handled, false otherwise. bool ProcessValidatedPacket(const QuicPacketHeader& header); @@ -1810,17 +1810,17 @@ class QUICHE_EXPORT QuicConnection // Called when an ACK is about to send. Resets ACK related internal states, // e.g., cancels ack_alarm_, resets - // num_retransmittable_packets_received_since_last_ack_sent_ etc. + // num_retransmissible_packets_received_since_last_ack_sent_ etc. void ResetAckStates(); // Returns true if the ACK frame should be bundled with ACK-eliciting frame. - bool ShouldBundleRetransmittableFrameWithAck() const; + bool ShouldBundleRetransmissibleFrameWithAck() const; // Enables multiple packet number spaces support based on handshake protocol // and flags. void MaybeEnableMultiplePacketNumberSpacesSupport(); - // Called to update ACK timeout when an retransmittable frame has been parsed. + // Called to update ACK timeout when an retransmissible frame has been parsed. void MaybeUpdateAckTimeout(); // Tries to fill coalesced packet with data of higher packet space. @@ -1974,7 +1974,7 @@ class QUICHE_EXPORT QuicConnection // QUIC. std::unique_ptr OnPeerIpAddressChanged(); - // Process NewConnectionIdFrame either sent from peer or synsthesized from + // Process NewConnectionIdFrame either sent from peer or synthesized from // preferred_address transport parameter. NewConnectionIdResult OnNewConnectionIdFrameInner( const QuicNewConnectionIdFrame& frame); @@ -2138,7 +2138,7 @@ class QUICHE_EXPORT QuicConnection QuicArenaScopedPtr send_alarm_; // An alarm that fires when an MTU probe should be sent. QuicArenaScopedPtr mtu_discovery_alarm_; - // An alarm that fires to process undecryptable packets when new decyrption + // An alarm that fires to process undecryptable packets when new decryption // keys are available. QuicArenaScopedPtr process_undecryptable_packets_alarm_; // An alarm that fires to discard keys for the previous key phase some time @@ -2212,17 +2212,17 @@ class QUICHE_EXPORT QuicConnection // avoid infinite write errors. bool write_error_occurred_; - // Consecutive number of sent packets which have no retransmittable frames. - size_t consecutive_num_packets_with_no_retransmittable_frames_; + // Consecutive number of sent packets which have no retransmissible frames. + size_t consecutive_num_packets_with_no_retransmissible_frames_; - // After this many packets sent without retransmittable frames, an artificial - // retransmittable frame(a WINDOW_UPDATE) will be created to solicit an ack - // from the peer. Default to kMaxConsecutiveNonRetransmittablePackets. - size_t max_consecutive_num_packets_with_no_retransmittable_frames_; + // After this many packets sent without retransmissible frames, an artificial + // retransmissible frame(a WINDOW_UPDATE) will be created to solicit an ack + // from the peer. Default to kMaxConsecutiveNonRetransmissiblePackets. + size_t max_consecutive_num_packets_with_no_retransmissible_frames_; // If true, bundle an ack-eliciting frame with an ACK if the PTO alarm have // previously fired. - bool bundle_retransmittable_with_pto_ack_; + bool bundle_retransmissible_with_pto_ack_; // Id of latest sent control frame. 0 if no control frame has been sent. QuicControlFrameId last_control_frame_id_; @@ -2370,7 +2370,7 @@ class QUICHE_EXPORT QuicConnection const bool ignore_duplicate_new_cid_frame_ = GetQuicReloadableFlag(quic_ignore_duplicate_new_cid_frame); - RetransmittableOnWireBehavior retransmittable_on_wire_behavior_ = DEFAULT; + RetransmissibleOnWireBehavior retransmissible_on_wire_behavior_ = DEFAULT; // Server addresses that are known to the client. std::vector known_server_addresses_; diff --git a/quiche/quic/core/quic_connection_id_manager.cc b/quiche/quic/core/quic_connection_id_manager.cc index b8524d1f5..768bb72c6 100644 --- a/quiche/quic/core/quic_connection_id_manager.cc +++ b/quiche/quic/core/quic_connection_id_manager.cc @@ -332,7 +332,7 @@ QuicErrorCode QuicSelfIssuedConnectionIdManager::OnRetireConnectionIdFrame( std::string* error_detail) { QUICHE_DCHECK(!active_connection_ids_.empty()); if (frame.sequence_number >= next_connection_id_sequence_number_) { - *error_detail = "To be retired connecton ID is never issued."; + *error_detail = "To be retired connection ID is never issued."; return IETF_QUIC_PROTOCOL_VIOLATION; } @@ -347,8 +347,8 @@ QuicErrorCode QuicSelfIssuedConnectionIdManager::OnRetireConnectionIdFrame( } if (to_be_retired_connection_ids_.size() + active_connection_ids_.size() >= - kMaxNumConnectonIdsInUse) { - // Close connection if the number of connection IDs in use will exeed the + kMaxNumConnectionIdsInUse) { + // Close connection if the number of connection IDs in use will exceed the // limit, i.e., peer retires connection ID too fast. *error_detail = "There are too many connection IDs in use."; return QUIC_TOO_MANY_CONNECTION_ID_WAITING_TO_RETIRE; diff --git a/quiche/quic/core/quic_connection_id_manager.h b/quiche/quic/core/quic_connection_id_manager.h index 96c4c97a0..0f1971473 100644 --- a/quiche/quic/core/quic_connection_id_manager.h +++ b/quiche/quic/core/quic_connection_id_manager.h @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// QuicPeerIssuedConnectionIdManager handles the states associated with receving +// QuicPeerIssuedConnectionIdManager handles the states associated with receiving // and retiring peer issued connection Ids. // QuicSelfIssuedConnectionIdManager handles the states associated with // connection Ids issued by the current end point. diff --git a/quiche/quic/core/quic_connection_id_manager_test.cc b/quiche/quic/core/quic_connection_id_manager_test.cc index 466ba27bd..45b8ed55d 100644 --- a/quiche/quic/core/quic_connection_id_manager_test.cc +++ b/quiche/quic/core/quic_connection_id_manager_test.cc @@ -122,12 +122,12 @@ TEST_F(QuicPeerIssuedConnectionIdManagerTest, IsQuicNoError()); // Start to use CID #1 for alternative path. - const QuicConnectionIdData* aternative_connection_id_data = + const QuicConnectionIdData* alternative_connection_id_data = peer_issued_cid_manager_.ConsumeOneUnusedConnectionId(); - ASSERT_THAT(aternative_connection_id_data, testing::NotNull()); - EXPECT_EQ(aternative_connection_id_data->connection_id, + ASSERT_THAT(alternative_connection_id_data, testing::NotNull()); + EXPECT_EQ(alternative_connection_id_data->connection_id, TestConnectionId(1)); - EXPECT_EQ(aternative_connection_id_data->stateless_reset_token, + EXPECT_EQ(alternative_connection_id_data->stateless_reset_token, frame.stateless_reset_token); // Connection migration succeed. Prepares to retire CID #0. @@ -1008,7 +1008,7 @@ TEST_F(QuicSelfIssuedConnectionIdManagerTest, } TEST_F(QuicSelfIssuedConnectionIdManagerTest, - DoNotIssueConnectionIdVoluntarilyIfOneHasIssuedForPerferredAddress) { + DoNotIssueConnectionIdVoluntarilyIfOneHasIssuedForPreferredAddress) { QuicConnectionId cid0 = initial_connection_id_; QuicConnectionId cid1 = CheckGenerate(cid0); EXPECT_CALL(cid_manager_visitor_, MaybeReserveConnectionId(cid1)) @@ -1039,7 +1039,7 @@ TEST_F(QuicSelfIssuedConnectionIdManagerTest, QuicRetireConnectionIdFrame retire_cid_frame(/*control_frame_id=*/0, /*sequence_number=*/1); QuicConnectionId cid2 = CheckGenerate(cid1); - // This happens when cid2 is aleady present in the dispatcher map. + // This happens when cid2 is already present in the dispatcher map. EXPECT_CALL(cid_manager_visitor_, MaybeReserveConnectionId(cid2)) .WillOnce(Return(false)); std::string error_details; diff --git a/quiche/quic/core/quic_connection_stats.h b/quiche/quic/core/quic_connection_stats.h index 55516590a..b1768865c 100644 --- a/quiche/quic/core/quic_connection_stats.h +++ b/quiche/quic/core/quic_connection_stats.h @@ -210,7 +210,7 @@ struct QUICHE_EXPORT QuicConnectionStats { size_t num_peer_migration_to_proactively_validated_address = 0; // Number of detected peer address changes which triggers reverse path // validation. - size_t num_reverse_path_validtion_upon_migration = 0; + size_t num_reverse_path_validation_upon_migration = 0; // Number of detected peer migrations which either succeed reverse path // validation or no need to be validated. size_t num_validated_peer_migration = 0; diff --git a/quiche/quic/core/quic_connection_test.cc b/quiche/quic/core/quic_connection_test.cc index e3a526ca8..413849ffb 100644 --- a/quiche/quic/core/quic_connection_test.cc +++ b/quiche/quic/core/quic_connection_test.cc @@ -241,7 +241,7 @@ class TestConnection : public QuicConnection { void SendPacket(EncryptionLevel /*level*/, uint64_t packet_number, std::unique_ptr packet, - HasRetransmittableData retransmittable, bool has_ack, + HasRetransmissibleData retransmissible, bool has_ack, bool has_pending_frames) { ScopedPacketFlusher flusher(this); char buffer[kMaxOutgoingPacketSize]; @@ -253,8 +253,8 @@ class TestConnection : public QuicConnection { QuicPacketNumber(packet_number), PACKET_4BYTE_PACKET_NUMBER, buffer, encrypted_length, has_ack, has_pending_frames); serialized_packet.peer_address = kPeerAddress; - if (retransmittable == HAS_RETRANSMITTABLE_DATA) { - serialized_packet.retransmittable_frames.push_back( + if (retransmissible == HAS_RETRANSMISSIBLE_DATA) { + serialized_packet.retransmissible_frames.push_back( QuicFrame(QuicPingFrame())); } OnSerializedPacket(std::move(serialized_packet)); @@ -326,7 +326,7 @@ class TestConnection : public QuicConnection { // Ensures the connection can write stream data before writing. QuicConsumedData EnsureWritableAndSendStreamData5() { - EXPECT_TRUE(CanWrite(HAS_RETRANSMITTABLE_DATA)); + EXPECT_TRUE(CanWrite(HAS_RETRANSMISSIBLE_DATA)); return SendStreamData5(); } @@ -1863,7 +1863,7 @@ TEST_P(QuicConnectionTest, PeerIpAddressChangeAtServer) { // IETF QUIC send algorithm should be changed to a different object, so no // OnPacketSent() called on the old send algorithm. EXPECT_CALL(*send_algorithm_, - OnPacketSent(_, _, _, _, NO_RETRANSMITTABLE_DATA)) + OnPacketSent(_, _, _, _, NO_RETRANSMISSIBLE_DATA)) .Times(0); // Do not propagate OnCanWrite() to session notifier. EXPECT_CALL(visitor_, OnCanWrite()).Times(AnyNumber()); @@ -1905,7 +1905,7 @@ TEST_P(QuicConnectionTest, PeerIpAddressChangeAtServer) { EXPECT_EQ(kNewPeerAddress, connection_.peer_address()); EXPECT_EQ(kNewPeerAddress, connection_.effective_peer_address()); EXPECT_EQ(1u, - connection_.GetStats().num_reverse_path_validtion_upon_migration); + connection_.GetStats().num_reverse_path_validation_upon_migration); // Verify server is throttled by anti-amplification limit. connection_.SendCryptoDataWithString("foo", 0); @@ -2246,7 +2246,7 @@ TEST_P(QuicConnectionTest, QuicPathFrameBuffer reverse_path_challenge_payload = writer_->path_challenge_frames().front().data_buffer; - // Receiveds a packet from path 3 with PATH_RESPONSE frame intended to + // Received a packet from path 3 with PATH_RESPONSE frame intended to // validate path 2 and a non-probing frame. { QuicConnection::ScopedPacketFlusher flusher(&connection_); @@ -2559,7 +2559,7 @@ class TestValidationResultDelegate : public QuicPathValidator::ResultDelegate { }; // A test implementation which migrates to server preferred address -// on path validation suceeds. Otherwise, client cleans up alternative path. +// on path validation succeeds. Otherwise, client cleans up alternative path. class ServerPreferredAddressTestResultDelegate : public QuicPathValidator::ResultDelegate { public: @@ -2810,7 +2810,7 @@ TEST_P(QuicConnectionTest, ReceivePaddedPingWithPortChangeAtServer) { if (GetParam().version.HasIetfQuicFrames() || GetQuicReloadableFlag(quic_ignore_gquic_probing)) { - // Padded PING with port changen is not considered as connectivity probe but + // Padded PING with port change is not considered as connectivity probe but // a PORT CHANGE. EXPECT_EQ(num_probing_received, connection_.GetStats().num_connectivity_probing_received); @@ -3476,7 +3476,7 @@ TEST_P(QuicConnectionTest, AckReceiptCausesAckSend) { // as missing, that will bundle an ack with data after two acks in a row // indicate the high water mark needs to be raised. EXPECT_CALL(*send_algorithm_, - OnPacketSent(_, _, _, _, HAS_RETRANSMITTABLE_DATA)); + OnPacketSent(_, _, _, _, HAS_RETRANSMISSIBLE_DATA)); connection_.SendStreamDataWithString(3, "foo", 6, NO_FIN); // No ack sent. size_t padding_frame_count = writer_->padding_frames().size(); @@ -3488,7 +3488,7 @@ TEST_P(QuicConnectionTest, AckReceiptCausesAckSend) { .Times(AnyNumber()); ProcessAckPacket(&frame2); EXPECT_CALL(*send_algorithm_, - OnPacketSent(_, _, _, _, HAS_RETRANSMITTABLE_DATA)); + OnPacketSent(_, _, _, _, HAS_RETRANSMISSIBLE_DATA)); connection_.SendStreamDataWithString(3, "foofoofoo", 9, NO_FIN); // Ack bundled. // Do not ACK acks. @@ -3530,7 +3530,7 @@ TEST_P(QuicConnectionTest, AckDecimationReducesAcks) { RttStats* rtt_stats = const_cast(manager_->GetRttStats()); rtt_stats->UpdateRtt(QuicTime::Delta::FromMilliseconds(kMinRttMs), QuicTime::Delta::Zero(), QuicTime::Zero()); - EXPECT_CALL(visitor_, OnAckNeedsRetransmittableFrame()).Times(AnyNumber()); + EXPECT_CALL(visitor_, OnAckNeedsRetransmissibleFrame()).Times(AnyNumber()); // Start ack decimation from 10th packet. connection_.set_min_received_before_ack_decimation(10); @@ -3550,7 +3550,7 @@ TEST_P(QuicConnectionTest, AckDecimationReducesAcks) { ProcessDataPacket(30); } -TEST_P(QuicConnectionTest, AckNeedsRetransmittableFrames) { +TEST_P(QuicConnectionTest, AckNeedsRetransmissibleFrames) { connection_.SetDefaultEncryptionLevel(ENCRYPTION_FORWARD_SECURE); EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(99); @@ -3562,7 +3562,7 @@ TEST_P(QuicConnectionTest, AckNeedsRetransmittableFrames) { } // Receiving Packet 40 causes 20th ack to send. Session is informed and adds // WINDOW_UPDATE. - EXPECT_CALL(visitor_, OnAckNeedsRetransmittableFrame()) + EXPECT_CALL(visitor_, OnAckNeedsRetransmissibleFrame()) .WillOnce(Invoke([this]() { connection_.SendControlFrame(QuicFrame(QuicWindowUpdateFrame(1, 0, 0))); })); @@ -3588,8 +3588,8 @@ TEST_P(QuicConnectionTest, AckNeedsRetransmittableFrames) { ProcessDataPacket(i); EXPECT_EQ(0u, writer_->window_update_frames().size()); } - // Session does not add a retransmittable frame. - EXPECT_CALL(visitor_, OnAckNeedsRetransmittableFrame()) + // Session does not add a retransmissible frame. + EXPECT_CALL(visitor_, OnAckNeedsRetransmissibleFrame()) .WillOnce(Invoke([this]() { connection_.SendControlFrame(QuicFrame(QuicPingFrame(1))); })); @@ -3601,7 +3601,7 @@ TEST_P(QuicConnectionTest, AckNeedsRetransmittableFrames) { EXPECT_EQ(1u, writer_->ping_frames().size()); } -TEST_P(QuicConnectionTest, AckNeedsRetransmittableFramesAfterPto) { +TEST_P(QuicConnectionTest, AckNeedsRetransmissibleFramesAfterPto) { EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)); QuicConfig config; QuicTagVector connection_options; @@ -3630,9 +3630,9 @@ TEST_P(QuicConnectionTest, AckNeedsRetransmittableFramesAfterPto) { connection_.GetRetransmissionAlarm()->Fire(); ASSERT_LT(0u, manager_->GetConsecutivePtoCount()); - // Process a packet, which requests a retransmittable frame be bundled + // Process a packet, which requests a retransmissible frame be bundled // with the ACK. - EXPECT_CALL(visitor_, OnAckNeedsRetransmittableFrame()) + EXPECT_CALL(visitor_, OnAckNeedsRetransmissibleFrame()) .WillOnce(Invoke([this]() { connection_.SendControlFrame(QuicFrame(QuicWindowUpdateFrame(1, 0, 0))); })); @@ -3743,7 +3743,7 @@ TEST_P(QuicConnectionTest, BasicSending) { TEST_P(QuicConnectionTest, RecordSentTimeBeforePacketSent) { // We're using a MockClock for the tests, so we have complete control over the // time. - // Our recorded timestamp for the last packet sent time will be passed in to + // Our recorded timestamp for the last packet sent time will be passed into // the send_algorithm. Make sure that it is set to the correct value. QuicTime actual_recorded_send_time = QuicTime::Zero(); EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)) @@ -3949,7 +3949,7 @@ TEST_P(QuicConnectionTest, FramePackingAckResponse) { QuicUtils::GetCryptoStreamId(connection_.transport_version()), "foo", 0, NO_FIN, &last_packet); } - // Verify ack is bundled with outging packet. + // Verify ack is bundled with outgoing packet. EXPECT_FALSE(writer_->ack_frames().empty()); EXPECT_CALL(visitor_, OnCanWrite()) @@ -4067,7 +4067,7 @@ TEST_P(QuicConnectionTest, LargeSendWithPendingAck) { // Set the ack alarm by processing a ping frame. EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); - // Processs a PING frame. + // Process a PING frame. ProcessFramePacket(QuicFrame(QuicPingFrame())); // Ensure that this has caused the ACK alarm to be set. EXPECT_TRUE(connection_.HasPendingAcks()); @@ -4249,7 +4249,7 @@ TEST_P(QuicConnectionTest, DoNotRetransmitForResetStreamOnRTO) { EXPECT_EQ(stream_id, writer_->rst_stream_frames().front().stream_id); } -// Ensure that if the only data in flight is non-retransmittable, the +// Ensure that if the only data in flight is non-retransmissible, the // retransmission alarm is not set. TEST_P(QuicConnectionTest, CancelRetransmissionAlarmAfterResetStream) { QuicStreamId stream_id = 2; @@ -4261,8 +4261,8 @@ TEST_P(QuicConnectionTest, CancelRetransmissionAlarmAfterResetStream) { EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, rst_packet, _, _)).Times(1); SendRstStream(stream_id, QUIC_ERROR_PROCESSING_STREAM, 3); - // Ack the RST_STREAM frame (since it's retransmittable), but not the data - // packet, which is no longer retransmittable since the stream was cancelled. + // Ack the RST_STREAM frame (since it's retransmissible), but not the data + // packet, which is no longer retransmissible since the stream was cancelled. QuicAckFrame nack_stream_data = ConstructAckFrame(rst_packet, last_data_packet); EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); @@ -4397,8 +4397,8 @@ TEST_P(QuicConnectionTest, RetransmitAckedPacket) { connection_.OnCanWrite(); EXPECT_EQ(0u, connection_.NumQueuedPackets()); - // We do not store retransmittable frames of this retransmission. - EXPECT_FALSE(QuicConnectionPeer::HasRetransmittableFrames(&connection_, 4)); + // We do not store retransmissible frames of this retransmission. + EXPECT_FALSE(QuicConnectionPeer::HasRetransmissibleFrames(&connection_, 4)); } TEST_P(QuicConnectionTest, RetransmitNackedLargestObserved) { @@ -4477,7 +4477,7 @@ TEST_P(QuicConnectionTest, RetransmitWriteBlockedAckedOriginalThenSent) { writer_->SetWritable(); connection_.OnCanWrite(); EXPECT_TRUE(connection_.GetRetransmissionAlarm()->IsSet()); - EXPECT_FALSE(QuicConnectionPeer::HasRetransmittableFrames(&connection_, 3)); + EXPECT_FALSE(QuicConnectionPeer::HasRetransmissibleFrames(&connection_, 3)); } TEST_P(QuicConnectionTest, AlarmsWhenWriteBlocked) { @@ -4505,7 +4505,7 @@ TEST_P(QuicConnectionTest, NoSendAlarmAfterProcessPacketWhenWriteBlocked) { EXPECT_FALSE(connection_.GetSendAlarm()->IsSet()); EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(1); - // Process packet number 1. Can not call ProcessPacket or ProcessDataPacket + // Process packet number 1. Cannot call ProcessPacket or ProcessDataPacket // here, because they will fire the alarm after QuicConnection::ProcessPacket // is returned. const uint64_t received_packet_num = 1; @@ -4535,7 +4535,7 @@ TEST_P(QuicConnectionTest, SendAlarmNonZeroDelay) { EXPECT_FALSE(connection_.GetSendAlarm()->IsSet()); EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(1); - // Process packet number 1. Can not call ProcessPacket or ProcessDataPacket + // Process packet number 1. Cannot call ProcessPacket or ProcessDataPacket // here, because they will fire the alarm after QuicConnection::ProcessPacket // is returned. const uint64_t received_packet_num = 1; @@ -4801,7 +4801,7 @@ TEST_P(QuicConnectionTest, BufferNonDecryptablePackets) { ENCRYPTION_ZERO_RTT, std::make_unique()); } - // Process an encrypted packet which can not yet be decrypted which should + // Process an encrypted packet which cannot yet be decrypted which should // result in the packet being buffered. ProcessDataPacketAtLevel(1, !kHasStopWaiting, ENCRYPTION_ZERO_RTT); @@ -4837,7 +4837,7 @@ TEST_P(QuicConnectionTest, Buffer100NonDecryptablePacketsThenKeyChange) { ENCRYPTION_ZERO_RTT, std::make_unique(ENCRYPTION_ZERO_RTT)); - // Process an encrypted packet which can not yet be decrypted which should + // Process an encrypted packet which cannot yet be decrypted which should // result in the packet being buffered. for (uint64_t i = 1; i <= 100; ++i) { ProcessDataPacketAtLevel(i, !kHasStopWaiting, ENCRYPTION_ZERO_RTT); @@ -5082,7 +5082,7 @@ TEST_P(QuicConnectionTest, PingAfterSend) { EXPECT_EQ(QuicTime::Delta::FromSeconds(15), connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); - // Now recevie an ACK of the previous packet, which will move the + // Now receive an ACK of the previous packet, which will move the // ping alarm forward. clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); QuicAckFrame frame = InitAckFrame(1); @@ -5135,7 +5135,7 @@ TEST_P(QuicConnectionTest, ReducedPingTimeout) { EXPECT_EQ(QuicTime::Delta::FromSeconds(10), connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); - // Now recevie an ACK of the previous packet, which will move the + // Now receive an ACK of the previous packet, which will move the // ping alarm forward. clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); QuicAckFrame frame = InitAckFrame(1); @@ -6093,7 +6093,7 @@ TEST_P(QuicConnectionTest, SendScheduler) { QuicPacketCreatorPeer::SetPacketNumber(creator_, 1); EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)); connection_.SendPacket(ENCRYPTION_INITIAL, 1, std::move(packet), - HAS_RETRANSMITTABLE_DATA, false, false); + HAS_RETRANSMISSIBLE_DATA, false, false); EXPECT_EQ(0u, connection_.NumQueuedPackets()); } @@ -6107,7 +6107,7 @@ TEST_P(QuicConnectionTest, FailToSendFirstPacket) { QuicPacketCreatorPeer::SetPacketNumber(creator_, 1); writer_->SetShouldWriteFail(); connection_.SendPacket(ENCRYPTION_INITIAL, 1, std::move(packet), - HAS_RETRANSMITTABLE_DATA, false, false); + HAS_RETRANSMISSIBLE_DATA, false, false); } TEST_P(QuicConnectionTest, SendSchedulerEAGAIN) { @@ -6119,7 +6119,7 @@ TEST_P(QuicConnectionTest, SendSchedulerEAGAIN) { EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, QuicPacketNumber(2u), _, _)) .Times(0); connection_.SendPacket(ENCRYPTION_INITIAL, 1, std::move(packet), - HAS_RETRANSMITTABLE_DATA, false, false); + HAS_RETRANSMISSIBLE_DATA, false, false); EXPECT_EQ(1u, connection_.NumQueuedPackets()); } @@ -6210,7 +6210,7 @@ TEST_P(QuicConnectionTest, SendDelayedAck) { } TEST_P(QuicConnectionTest, SendDelayedAckDecimation) { - EXPECT_CALL(visitor_, OnAckNeedsRetransmittableFrame()).Times(AnyNumber()); + EXPECT_CALL(visitor_, OnAckNeedsRetransmissibleFrame()).Times(AnyNumber()); const size_t kMinRttMs = 40; RttStats* rtt_stats = const_cast(manager_->GetRttStats()); @@ -6263,7 +6263,7 @@ TEST_P(QuicConnectionTest, SendDelayedAckDecimation) { } TEST_P(QuicConnectionTest, SendDelayedAckDecimationUnlimitedAggregation) { - EXPECT_CALL(visitor_, OnAckNeedsRetransmittableFrame()).Times(AnyNumber()); + EXPECT_CALL(visitor_, OnAckNeedsRetransmissibleFrame()).Times(AnyNumber()); EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)); QuicConfig config; QuicTagVector connection_options; @@ -6321,7 +6321,7 @@ TEST_P(QuicConnectionTest, SendDelayedAckDecimationUnlimitedAggregation) { } TEST_P(QuicConnectionTest, SendDelayedAckDecimationEighthRtt) { - EXPECT_CALL(visitor_, OnAckNeedsRetransmittableFrame()).Times(AnyNumber()); + EXPECT_CALL(visitor_, OnAckNeedsRetransmissibleFrame()).Times(AnyNumber()); QuicConnectionPeer::SetAckDecimationDelay(&connection_, 0.125); const size_t kMinRttMs = 40; @@ -6645,7 +6645,7 @@ TEST_P(QuicConnectionTest, SendWhenDisconnected) { connection_.CloseConnection(QUIC_PEER_GOING_AWAY, "no reason", ConnectionCloseBehavior::SILENT_CLOSE); EXPECT_FALSE(connection_.connected()); - EXPECT_FALSE(connection_.CanWrite(HAS_RETRANSMITTABLE_DATA)); + EXPECT_FALSE(connection_.CanWrite(HAS_RETRANSMISSIBLE_DATA)); EXPECT_EQ(DISCARD, connection_.GetSerializedPacketFate( /*is_mtu_discovery=*/false, ENCRYPTION_INITIAL)); } @@ -6662,7 +6662,7 @@ TEST_P(QuicConnectionTest, SendConnectivityProbingWhenDisconnected) { connection_.CloseConnection(QUIC_PEER_GOING_AWAY, "no reason", ConnectionCloseBehavior::SILENT_CLOSE); EXPECT_FALSE(connection_.connected()); - EXPECT_FALSE(connection_.CanWrite(HAS_RETRANSMITTABLE_DATA)); + EXPECT_FALSE(connection_.CanWrite(HAS_RETRANSMISSIBLE_DATA)); EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, QuicPacketNumber(1), _, _)) .Times(0); @@ -7216,7 +7216,7 @@ TEST_P(QuicConnectionTest, PathDegradingDetectionForNonCryptoPackets) { QuicStreamOffset offset = 0; for (int i = 0; i < 2; ++i) { - // Send a packet. Now there's a retransmittable packet on the wire, so the + // Send a packet. Now there's a retransmissible packet on the wire, so the // path degrading detection should be set. connection_.SendStreamDataWithString( GetNthClientInitiatedStreamId(1, connection_.transport_version()), data, @@ -7263,7 +7263,7 @@ TEST_P(QuicConnectionTest, PathDegradingDetectionForNonCryptoPackets) { if (i == 0) { // Now receive an ACK of the second packet. Since there are no more - // retransmittable packets on the wire, this should cancel the path + // retransmissible packets on the wire, this should cancel the path // degrading detection. clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _, _, _, _)); @@ -7282,11 +7282,11 @@ TEST_P(QuicConnectionTest, PathDegradingDetectionForNonCryptoPackets) { EXPECT_TRUE(connection_.IsPathDegrading()); } -TEST_P(QuicConnectionTest, RetransmittableOnWireSetsPingAlarm) { - const QuicTime::Delta retransmittable_on_wire_timeout = +TEST_P(QuicConnectionTest, RetransmissibleOnWireSetsPingAlarm) { + const QuicTime::Delta retransmissible_on_wire_timeout = QuicTime::Delta::FromMilliseconds(50); - connection_.set_initial_retransmittable_on_wire_timeout( - retransmittable_on_wire_timeout); + connection_.set_initial_retransmissible_on_wire_timeout( + retransmissible_on_wire_timeout); EXPECT_TRUE(connection_.connected()); EXPECT_CALL(visitor_, ShouldKeepConnectionAlive()) @@ -7306,9 +7306,9 @@ TEST_P(QuicConnectionTest, RetransmittableOnWireSetsPingAlarm) { // Send a packet. connection_.SendStreamDataWithString(1, data, offset, NO_FIN); offset += data_size; - // Now there's a retransmittable packet on the wire, so the path degrading + // Now there's a retransmissible packet on the wire, so the path degrading // alarm should be set. - // The retransmittable-on-wire alarm should not be set. + // The retransmissible-on-wire alarm should not be set. EXPECT_TRUE(connection_.PathDegradingDetectionInProgress()); QuicTime::Delta delay = QuicConnectionPeer::GetSentPacketManager(&connection_) ->GetPathDegradingDelay(); @@ -7316,7 +7316,7 @@ TEST_P(QuicConnectionTest, RetransmittableOnWireSetsPingAlarm) { clock_.ApproximateNow()); ASSERT_TRUE(connection_.sent_packet_manager().HasInFlightPackets()); // The ping alarm is set for the ping timeout, not the shorter - // retransmittable_on_wire_timeout. + // retransmissible_on_wire_timeout. EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); QuicTime::Delta ping_delay = QuicTime::Delta::FromSeconds(kPingTimeoutSecs); EXPECT_EQ(ping_delay, @@ -7329,19 +7329,19 @@ TEST_P(QuicConnectionTest, RetransmittableOnWireSetsPingAlarm) { QuicAckFrame frame = InitAckFrame({{QuicPacketNumber(1), QuicPacketNumber(2)}}); ProcessAckPacket(&frame); - // No more retransmittable packets on the wire, so the path degrading alarm + // No more retransmissible packets on the wire, so the path degrading alarm // should be cancelled, and the ping alarm should be set to the - // retransmittable_on_wire_timeout. + // retransmissible_on_wire_timeout. EXPECT_FALSE(connection_.PathDegradingDetectionInProgress()); EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); - EXPECT_EQ(retransmittable_on_wire_timeout, + EXPECT_EQ(retransmissible_on_wire_timeout, connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); // Simulate firing the ping alarm and sending a PING. - clock_.AdvanceTime(retransmittable_on_wire_timeout); + clock_.AdvanceTime(retransmissible_on_wire_timeout); connection_.GetPingAlarm()->Fire(); - // Now there's a retransmittable packet (PING) on the wire, so the path + // Now there's a retransmissible packet (PING) on the wire, so the path // degrading alarm should be set. ASSERT_TRUE(connection_.PathDegradingDetectionInProgress()); delay = QuicConnectionPeer::GetSentPacketManager(&connection_) @@ -7350,7 +7350,7 @@ TEST_P(QuicConnectionTest, RetransmittableOnWireSetsPingAlarm) { clock_.ApproximateNow()); } -TEST_P(QuicConnectionTest, ServerRetransmittableOnWire) { +TEST_P(QuicConnectionTest, ServerRetransmissibleOnWire) { set_perspective(Perspective::IS_SERVER); QuicPacketCreatorPeer::SetSendVersionInPacket(creator_, false); SetQuicReloadableFlag(quic_enable_server_on_wire_ping, true); @@ -7389,7 +7389,7 @@ TEST_P(QuicConnectionTest, ServerRetransmittableOnWire) { connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); } -TEST_P(QuicConnectionTest, RetransmittableOnWireSendFirstPacket) { +TEST_P(QuicConnectionTest, RetransmissibleOnWireSendFirstPacket) { if (!VersionHasIetfQuicFrames(connection_.version().transport_version)) { return; } @@ -7397,12 +7397,12 @@ TEST_P(QuicConnectionTest, RetransmittableOnWireSendFirstPacket) { .WillRepeatedly(Return(true)); EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); - const QuicTime::Delta kRetransmittableOnWireTimeout = + const QuicTime::Delta kRetransmissibleOnWireTimeout = QuicTime::Delta::FromMilliseconds(200); const QuicTime::Delta kTestRtt = QuicTime::Delta::FromMilliseconds(100); - connection_.set_initial_retransmittable_on_wire_timeout( - kRetransmittableOnWireTimeout); + connection_.set_initial_retransmissible_on_wire_timeout( + kRetransmissibleOnWireTimeout); EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)); QuicConfig config; @@ -7420,12 +7420,12 @@ TEST_P(QuicConnectionTest, RetransmittableOnWireSendFirstPacket) { InitAckFrame({{QuicPacketNumber(1), QuicPacketNumber(2)}}); ProcessAckPacket(&frame); ASSERT_TRUE(connection_.GetPingAlarm()->IsSet()); - EXPECT_EQ(kRetransmittableOnWireTimeout, + EXPECT_EQ(kRetransmissibleOnWireTimeout, connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); EXPECT_EQ(1u, writer_->packets_write_attempts()); - // Fire retransmittable-on-wire alarm. - clock_.AdvanceTime(kRetransmittableOnWireTimeout); + // Fire retransmissible-on-wire alarm. + clock_.AdvanceTime(kRetransmissibleOnWireTimeout); connection_.GetPingAlarm()->Fire(); EXPECT_EQ(2u, writer_->packets_write_attempts()); // Verify alarm is set in keep-alive mode. @@ -7434,7 +7434,7 @@ TEST_P(QuicConnectionTest, RetransmittableOnWireSendFirstPacket) { connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); } -TEST_P(QuicConnectionTest, RetransmittableOnWireSendRandomBytes) { +TEST_P(QuicConnectionTest, RetransmissibleOnWireSendRandomBytes) { if (!VersionHasIetfQuicFrames(connection_.version().transport_version)) { return; } @@ -7442,12 +7442,12 @@ TEST_P(QuicConnectionTest, RetransmittableOnWireSendRandomBytes) { .WillRepeatedly(Return(true)); EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); - const QuicTime::Delta kRetransmittableOnWireTimeout = + const QuicTime::Delta kRetransmissibleOnWireTimeout = QuicTime::Delta::FromMilliseconds(200); const QuicTime::Delta kTestRtt = QuicTime::Delta::FromMilliseconds(100); - connection_.set_initial_retransmittable_on_wire_timeout( - kRetransmittableOnWireTimeout); + connection_.set_initial_retransmissible_on_wire_timeout( + kRetransmissibleOnWireTimeout); EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)); QuicConfig config; @@ -7465,12 +7465,12 @@ TEST_P(QuicConnectionTest, RetransmittableOnWireSendRandomBytes) { InitAckFrame({{QuicPacketNumber(1), QuicPacketNumber(2)}}); ProcessAckPacket(&frame); ASSERT_TRUE(connection_.GetPingAlarm()->IsSet()); - EXPECT_EQ(kRetransmittableOnWireTimeout, + EXPECT_EQ(kRetransmissibleOnWireTimeout, connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); EXPECT_EQ(1u, writer_->packets_write_attempts()); - // Fire retransmittable-on-wire alarm. - clock_.AdvanceTime(kRetransmittableOnWireTimeout); + // Fire retransmissible-on-wire alarm. + clock_.AdvanceTime(kRetransmissibleOnWireTimeout); // Next packet is not processable by the framer in the test writer. ExpectNextPacketUnprocessable(); connection_.GetPingAlarm()->Fire(); @@ -7482,7 +7482,7 @@ TEST_P(QuicConnectionTest, RetransmittableOnWireSendRandomBytes) { } TEST_P(QuicConnectionTest, - RetransmittableOnWireSendRandomBytesWithWriterBlocked) { + RetransmissibleOnWireSendRandomBytesWithWriterBlocked) { if (!VersionHasIetfQuicFrames(connection_.version().transport_version)) { return; } @@ -7491,12 +7491,12 @@ TEST_P(QuicConnectionTest, EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(1); - const QuicTime::Delta kRetransmittableOnWireTimeout = + const QuicTime::Delta kRetransmissibleOnWireTimeout = QuicTime::Delta::FromMilliseconds(200); const QuicTime::Delta kTestRtt = QuicTime::Delta::FromMilliseconds(100); - connection_.set_initial_retransmittable_on_wire_timeout( - kRetransmittableOnWireTimeout); + connection_.set_initial_retransmissible_on_wire_timeout( + kRetransmissibleOnWireTimeout); EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)); QuicConfig config; @@ -7514,7 +7514,7 @@ TEST_P(QuicConnectionTest, InitAckFrame({{QuicPacketNumber(1), QuicPacketNumber(2)}}); ProcessAckPacket(&frame); ASSERT_TRUE(connection_.GetPingAlarm()->IsSet()); - EXPECT_EQ(kRetransmittableOnWireTimeout, + EXPECT_EQ(kRetransmissibleOnWireTimeout, connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); EXPECT_EQ(1u, writer_->packets_write_attempts()); // Receive an out of order data packet and block the ACK packet. @@ -7523,8 +7523,8 @@ TEST_P(QuicConnectionTest, EXPECT_EQ(2u, writer_->packets_write_attempts()); EXPECT_EQ(1u, connection_.NumQueuedPackets()); - // Fire retransmittable-on-wire alarm. - clock_.AdvanceTime(kRetransmittableOnWireTimeout); + // Fire retransmissible-on-wire alarm. + clock_.AdvanceTime(kRetransmissibleOnWireTimeout); connection_.GetPingAlarm()->Fire(); // Verify the random bytes packet gets queued. EXPECT_EQ(2u, connection_.NumQueuedPackets()); @@ -7545,7 +7545,7 @@ TEST_P(QuicConnectionTest, NoPathDegradingDetectionIfPathIsDegrading) { size_t data_size = strlen(data); QuicStreamOffset offset = 0; - // Send the first packet. Now there's a retransmittable packet on the wire, so + // Send the first packet. Now there's a retransmissible packet on the wire, so // the path degrading alarm should be set. connection_.SendStreamDataWithString(1, data, offset, NO_FIN); offset += data_size; @@ -7616,7 +7616,7 @@ TEST_P(QuicConnectionTest, NoPathDegradingDetectionBeforeHandshakeConfirmed) { } } -// This test verifies that the connection unmarks path as degrarding and spins +// This test verifies that the connection unmarks path as degrading and spins // the timer to detect future path degrading when forward progress is made // after path has been marked degrading. TEST_P(QuicConnectionTest, UnmarkPathDegradingOnForwardProgress) { @@ -7631,7 +7631,7 @@ TEST_P(QuicConnectionTest, UnmarkPathDegradingOnForwardProgress) { size_t data_size = strlen(data); QuicStreamOffset offset = 0; - // Send the first packet. Now there's a retransmittable packet on the wire, so + // Send the first packet. Now there's a retransmissible packet on the wire, so // the path degrading alarm should be set. connection_.SendStreamDataWithString(1, data, offset, NO_FIN); offset += data_size; @@ -8033,11 +8033,11 @@ TEST_P(QuicConnectionTest, ClientAlwaysSendConnectionId) { writer_->last_packet_header().destination_connection_id_included); } -TEST_P(QuicConnectionTest, PingAfterLastRetransmittablePacketAcked) { - const QuicTime::Delta retransmittable_on_wire_timeout = +TEST_P(QuicConnectionTest, PingAfterLastRetransmissiblePacketAcked) { + const QuicTime::Delta retransmissible_on_wire_timeout = QuicTime::Delta::FromMilliseconds(50); - connection_.set_initial_retransmittable_on_wire_timeout( - retransmittable_on_wire_timeout); + connection_.set_initial_retransmissible_on_wire_timeout( + retransmissible_on_wire_timeout); EXPECT_TRUE(connection_.connected()); EXPECT_CALL(visitor_, ShouldKeepConnectionAlive()) @@ -8047,20 +8047,20 @@ TEST_P(QuicConnectionTest, PingAfterLastRetransmittablePacketAcked) { size_t data_size = strlen(data); QuicStreamOffset offset = 0; - // Advance 5ms, send a retransmittable packet to the peer. + // Advance 5ms, send a retransmissible packet to the peer. clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); EXPECT_FALSE(connection_.GetPingAlarm()->IsSet()); connection_.SendStreamDataWithString(1, data, offset, NO_FIN); offset += data_size; EXPECT_TRUE(connection_.sent_packet_manager().HasInFlightPackets()); // The ping alarm is set for the ping timeout, not the shorter - // retransmittable_on_wire_timeout. + // retransmissible_on_wire_timeout. EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); QuicTime::Delta ping_delay = QuicTime::Delta::FromSeconds(kPingTimeoutSecs); EXPECT_EQ(ping_delay, connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); - // Advance 5ms, send a second retransmittable packet to the peer. + // Advance 5ms, send a second retransmissible packet to the peer. clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); connection_.SendStreamDataWithString(1, data, offset, NO_FIN); @@ -8068,7 +8068,7 @@ TEST_P(QuicConnectionTest, PingAfterLastRetransmittablePacketAcked) { EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); // Now receive an ACK of the first packet. This should not set the - // retransmittable-on-wire alarm since packet 2 is still on the wire. + // retransmissible-on-wire alarm since packet 2 is still on the wire. clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _, _, _, _)); @@ -8077,7 +8077,7 @@ TEST_P(QuicConnectionTest, PingAfterLastRetransmittablePacketAcked) { ProcessAckPacket(&frame); EXPECT_TRUE(connection_.sent_packet_manager().HasInFlightPackets()); // The ping alarm is set for the ping timeout, not the shorter - // retransmittable_on_wire_timeout. + // retransmissible_on_wire_timeout. EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); // The ping alarm has a 1 second granularity, and the clock has been advanced // 10ms since it was originally set. @@ -8085,14 +8085,14 @@ TEST_P(QuicConnectionTest, PingAfterLastRetransmittablePacketAcked) { connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); // Now receive an ACK of the second packet. This should set the - // retransmittable-on-wire alarm now that no retransmittable packets are on + // retransmissible-on-wire alarm now that no retransmissible packets are on // the wire. clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _, _, _, _)); frame = InitAckFrame({{QuicPacketNumber(2), QuicPacketNumber(3)}}); ProcessAckPacket(&frame); EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); - EXPECT_EQ(retransmittable_on_wire_timeout, + EXPECT_EQ(retransmissible_on_wire_timeout, connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); // Now receive a duplicate ACK of the second packet. This should not update @@ -8118,11 +8118,11 @@ TEST_P(QuicConnectionTest, PingAfterLastRetransmittablePacketAcked) { ASSERT_EQ(1u, writer_->ping_frames().size()); } -TEST_P(QuicConnectionTest, NoPingIfRetransmittablePacketSent) { - const QuicTime::Delta retransmittable_on_wire_timeout = +TEST_P(QuicConnectionTest, NoPingIfRetransmissiblePacketSent) { + const QuicTime::Delta retransmissible_on_wire_timeout = QuicTime::Delta::FromMilliseconds(50); - connection_.set_initial_retransmittable_on_wire_timeout( - retransmittable_on_wire_timeout); + connection_.set_initial_retransmissible_on_wire_timeout( + retransmissible_on_wire_timeout); EXPECT_TRUE(connection_.connected()); EXPECT_CALL(visitor_, ShouldKeepConnectionAlive()) @@ -8132,21 +8132,21 @@ TEST_P(QuicConnectionTest, NoPingIfRetransmittablePacketSent) { size_t data_size = strlen(data); QuicStreamOffset offset = 0; - // Advance 5ms, send a retransmittable packet to the peer. + // Advance 5ms, send a retransmissible packet to the peer. clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); EXPECT_FALSE(connection_.GetPingAlarm()->IsSet()); connection_.SendStreamDataWithString(1, data, offset, NO_FIN); offset += data_size; EXPECT_TRUE(connection_.sent_packet_manager().HasInFlightPackets()); // The ping alarm is set for the ping timeout, not the shorter - // retransmittable_on_wire_timeout. + // retransmissible_on_wire_timeout. EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); QuicTime::Delta ping_delay = QuicTime::Delta::FromSeconds(kPingTimeoutSecs); EXPECT_EQ(ping_delay, connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); // Now receive an ACK of the first packet. This should set the - // retransmittable-on-wire alarm now that no retransmittable packets are on + // retransmissible-on-wire alarm now that no retransmissible packets are on // the wire. clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); @@ -8155,25 +8155,25 @@ TEST_P(QuicConnectionTest, NoPingIfRetransmittablePacketSent) { InitAckFrame({{QuicPacketNumber(1), QuicPacketNumber(2)}}); ProcessAckPacket(&frame); EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); - EXPECT_EQ(retransmittable_on_wire_timeout, + EXPECT_EQ(retransmissible_on_wire_timeout, connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); - // Before the alarm fires, send another retransmittable packet. This should - // cancel the retransmittable-on-wire alarm since now there's a - // retransmittable packet on the wire. + // Before the alarm fires, send another retransmissible packet. This should + // cancel the retransmissible-on-wire alarm since now there's a + // retransmissible packet on the wire. connection_.SendStreamDataWithString(1, data, offset, NO_FIN); offset += data_size; EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); // Now receive an ACK of the second packet. This should set the - // retransmittable-on-wire alarm now that no retransmittable packets are on + // retransmissible-on-wire alarm now that no retransmissible packets are on // the wire. clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _, _, _, _)); frame = InitAckFrame({{QuicPacketNumber(2), QuicPacketNumber(3)}}); ProcessAckPacket(&frame); EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); - EXPECT_EQ(retransmittable_on_wire_timeout, + EXPECT_EQ(retransmissible_on_wire_timeout, connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); // Simulate the alarm firing and check that a PING is sent. @@ -8186,30 +8186,30 @@ TEST_P(QuicConnectionTest, NoPingIfRetransmittablePacketSent) { } // When there is no stream data received but are open streams, send the -// first few consecutive pings with aggressive retransmittable-on-wire -// timeout. Exponentially back off the retransmittable-on-wire ping timeout +// first few consecutive pings with aggressive retransmissible-on-wire +// timeout. Exponentially back off the retransmissible-on-wire ping timeout // afterwards until it exceeds the default ping timeout. -TEST_P(QuicConnectionTest, BackOffRetransmittableOnWireTimeout) { - int max_aggressive_retransmittable_on_wire_ping_count = 5; - SetQuicFlag(quic_max_aggressive_retransmittable_on_wire_ping_count, - max_aggressive_retransmittable_on_wire_ping_count); - const QuicTime::Delta initial_retransmittable_on_wire_timeout = +TEST_P(QuicConnectionTest, BackOffRetransmissibleOnWireTimeout) { + int max_aggressive_retransmissible_on_wire_ping_count = 5; + SetQuicFlag(quic_max_aggressive_retransmissible_on_wire_ping_count, + max_aggressive_retransmissible_on_wire_ping_count); + const QuicTime::Delta initial_retransmissible_on_wire_timeout = QuicTime::Delta::FromMilliseconds(200); - connection_.set_initial_retransmittable_on_wire_timeout( - initial_retransmittable_on_wire_timeout); + connection_.set_initial_retransmissible_on_wire_timeout( + initial_retransmissible_on_wire_timeout); EXPECT_TRUE(connection_.connected()); EXPECT_CALL(visitor_, ShouldKeepConnectionAlive()) .WillRepeatedly(Return(true)); const char data[] = "data"; - // Advance 5ms, send a retransmittable data packet to the peer. + // Advance 5ms, send a retransmissible data packet to the peer. clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); EXPECT_FALSE(connection_.GetPingAlarm()->IsSet()); connection_.SendStreamDataWithString(1, data, 0, NO_FIN); EXPECT_TRUE(connection_.sent_packet_manager().HasInFlightPackets()); // The ping alarm is set for the ping timeout, not the shorter - // retransmittable_on_wire_timeout. + // retransmissible_on_wire_timeout. EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); EXPECT_EQ(QuicTime::Delta::FromSeconds(kPingTimeoutSecs), connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); @@ -8218,47 +8218,47 @@ TEST_P(QuicConnectionTest, BackOffRetransmittableOnWireTimeout) { EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _, _, _, _)) .Times(AnyNumber()); - // Verify that the first few consecutive retransmittable on wire pings are + // Verify that the first few consecutive retransmissible on wire pings are // sent with aggressive timeout. - for (int i = 0; i <= max_aggressive_retransmittable_on_wire_ping_count; i++) { + for (int i = 0; i <= max_aggressive_retransmissible_on_wire_ping_count; i++) { // Receive an ACK of the previous packet. This should set the ping alarm - // with the initial retransmittable-on-wire timeout. + // with the initial retransmissible-on-wire timeout. clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); QuicPacketNumber ack_num = creator_->packet_number(); QuicAckFrame frame = InitAckFrame( {{QuicPacketNumber(ack_num), QuicPacketNumber(ack_num + 1)}}); ProcessAckPacket(&frame); EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); - EXPECT_EQ(initial_retransmittable_on_wire_timeout, + EXPECT_EQ(initial_retransmissible_on_wire_timeout, connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); // Simulate the alarm firing and check that a PING is sent. writer_->Reset(); - clock_.AdvanceTime(initial_retransmittable_on_wire_timeout); + clock_.AdvanceTime(initial_retransmissible_on_wire_timeout); connection_.GetPingAlarm()->Fire(); } - QuicTime::Delta retransmittable_on_wire_timeout = - initial_retransmittable_on_wire_timeout; + QuicTime::Delta retransmissible_on_wire_timeout = + initial_retransmissible_on_wire_timeout; // Verify subsequent pings are sent with timeout that is exponentially backed // off. - while (retransmittable_on_wire_timeout * 2 < + while (retransmissible_on_wire_timeout * 2 < QuicTime::Delta::FromSeconds(kPingTimeoutSecs)) { // Receive an ACK for the previous PING. This should set the - // ping alarm with backed off retransmittable-on-wire timeout. - retransmittable_on_wire_timeout = retransmittable_on_wire_timeout * 2; + // ping alarm with backed off retransmissible-on-wire timeout. + retransmissible_on_wire_timeout = retransmissible_on_wire_timeout * 2; clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); QuicPacketNumber ack_num = creator_->packet_number(); QuicAckFrame frame = InitAckFrame( {{QuicPacketNumber(ack_num), QuicPacketNumber(ack_num + 1)}}); ProcessAckPacket(&frame); EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); - EXPECT_EQ(retransmittable_on_wire_timeout, + EXPECT_EQ(retransmissible_on_wire_timeout, connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); // Simulate the alarm firing and check that a PING is sent. writer_->Reset(); - clock_.AdvanceTime(retransmittable_on_wire_timeout); + clock_.AdvanceTime(retransmissible_on_wire_timeout); connection_.GetPingAlarm()->Fire(); } @@ -8282,15 +8282,15 @@ TEST_P(QuicConnectionTest, BackOffRetransmittableOnWireTimeout) { // This test verify that the count of consecutive aggressive pings is reset // when new data is received. And it also verifies the connection resets -// the exponential back-off of the retransmittable-on-wire ping timeout +// the exponential back-off of the retransmissible-on-wire ping timeout // after receiving new stream data. -TEST_P(QuicConnectionTest, ResetBackOffRetransmitableOnWireTimeout) { - int max_aggressive_retransmittable_on_wire_ping_count = 3; - SetQuicFlag(quic_max_aggressive_retransmittable_on_wire_ping_count, 3); - const QuicTime::Delta initial_retransmittable_on_wire_timeout = +TEST_P(QuicConnectionTest, ResetBackOffRetransmissibleOnWireTimeout) { + int max_aggressive_retransmissible_on_wire_ping_count = 3; + SetQuicFlag(quic_max_aggressive_retransmissible_on_wire_ping_count, 3); + const QuicTime::Delta initial_retransmissible_on_wire_timeout = QuicTime::Delta::FromMilliseconds(200); - connection_.set_initial_retransmittable_on_wire_timeout( - initial_retransmittable_on_wire_timeout); + connection_.set_initial_retransmissible_on_wire_timeout( + initial_retransmissible_on_wire_timeout); EXPECT_TRUE(connection_.connected()); EXPECT_CALL(visitor_, ShouldKeepConnectionAlive()) @@ -8300,31 +8300,31 @@ TEST_P(QuicConnectionTest, ResetBackOffRetransmitableOnWireTimeout) { .Times(AnyNumber()); const char data[] = "data"; - // Advance 5ms, send a retransmittable data packet to the peer. + // Advance 5ms, send a retransmissible data packet to the peer. clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); EXPECT_FALSE(connection_.GetPingAlarm()->IsSet()); connection_.SendStreamDataWithString(1, data, 0, NO_FIN); EXPECT_TRUE(connection_.sent_packet_manager().HasInFlightPackets()); // The ping alarm is set for the ping timeout, not the shorter - // retransmittable_on_wire_timeout. + // retransmissible_on_wire_timeout. EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); EXPECT_EQ(QuicTime::Delta::FromSeconds(kPingTimeoutSecs), connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); // Receive an ACK of the first packet. This should set the ping alarm with - // initial retransmittable-on-wire timeout since there is no retransmittable + // initial retransmissible-on-wire timeout since there is no retransmissible // packet on the wire. clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); QuicAckFrame frame = InitAckFrame({{QuicPacketNumber(1), QuicPacketNumber(2)}}); ProcessAckPacket(&frame); EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); - EXPECT_EQ(initial_retransmittable_on_wire_timeout, + EXPECT_EQ(initial_retransmissible_on_wire_timeout, connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); // Simulate the alarm firing and check that a PING is sent. writer_->Reset(); - clock_.AdvanceTime(initial_retransmittable_on_wire_timeout); + clock_.AdvanceTime(initial_retransmissible_on_wire_timeout); connection_.GetPingAlarm()->Fire(); // Receive an ACK for the previous PING. Ping alarm will be set with @@ -8335,7 +8335,7 @@ TEST_P(QuicConnectionTest, ResetBackOffRetransmitableOnWireTimeout) { {{QuicPacketNumber(ack_num), QuicPacketNumber(ack_num + 1)}}); ProcessAckPacket(&frame); EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); - EXPECT_EQ(initial_retransmittable_on_wire_timeout, + EXPECT_EQ(initial_retransmissible_on_wire_timeout, connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); // Process a data packet. @@ -8343,42 +8343,42 @@ TEST_P(QuicConnectionTest, ResetBackOffRetransmitableOnWireTimeout) { ProcessDataPacket(peer_creator_.packet_number() + 1); QuicPacketCreatorPeer::SetPacketNumber(&peer_creator_, peer_creator_.packet_number() + 1); - EXPECT_EQ(initial_retransmittable_on_wire_timeout, + EXPECT_EQ(initial_retransmissible_on_wire_timeout, connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); - clock_.AdvanceTime(initial_retransmittable_on_wire_timeout); + clock_.AdvanceTime(initial_retransmissible_on_wire_timeout); connection_.GetPingAlarm()->Fire(); // Verify the count of consecutive aggressive pings is reset. - for (int i = 0; i < max_aggressive_retransmittable_on_wire_ping_count; i++) { + for (int i = 0; i < max_aggressive_retransmissible_on_wire_ping_count; i++) { // Receive an ACK of the previous packet. This should set the ping alarm - // with the initial retransmittable-on-wire timeout. + // with the initial retransmissible-on-wire timeout. QuicPacketNumber ack_num = creator_->packet_number(); QuicAckFrame frame = InitAckFrame( {{QuicPacketNumber(ack_num), QuicPacketNumber(ack_num + 1)}}); ProcessAckPacket(&frame); EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); - EXPECT_EQ(initial_retransmittable_on_wire_timeout, + EXPECT_EQ(initial_retransmissible_on_wire_timeout, connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); // Simulate the alarm firing and check that a PING is sent. writer_->Reset(); - clock_.AdvanceTime(initial_retransmittable_on_wire_timeout); + clock_.AdvanceTime(initial_retransmissible_on_wire_timeout); connection_.GetPingAlarm()->Fire(); // Advance 5ms to receive next packet. clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); } // Receive another ACK for the previous PING. This should set the - // ping alarm with backed off retransmittable-on-wire timeout. + // ping alarm with backed off retransmissible-on-wire timeout. ack_num = creator_->packet_number(); frame = InitAckFrame( {{QuicPacketNumber(ack_num), QuicPacketNumber(ack_num + 1)}}); ProcessAckPacket(&frame); EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); - EXPECT_EQ(initial_retransmittable_on_wire_timeout * 2, + EXPECT_EQ(initial_retransmissible_on_wire_timeout * 2, connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); writer_->Reset(); - clock_.AdvanceTime(2 * initial_retransmittable_on_wire_timeout); + clock_.AdvanceTime(2 * initial_retransmissible_on_wire_timeout); connection_.GetPingAlarm()->Fire(); // Process another data packet and a new ACK packet. The ping alarm is set @@ -8393,36 +8393,36 @@ TEST_P(QuicConnectionTest, ResetBackOffRetransmitableOnWireTimeout) { {{QuicPacketNumber(ack_num), QuicPacketNumber(ack_num + 1)}}); ProcessAckPacket(&frame); EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); - EXPECT_EQ(initial_retransmittable_on_wire_timeout, + EXPECT_EQ(initial_retransmissible_on_wire_timeout, connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); } // Make sure that we never send more retransmissible on the wire pings than -// the limit in FLAGS_quic_max_retransmittable_on_wire_ping_count. -TEST_P(QuicConnectionTest, RetransmittableOnWirePingLimit) { - static constexpr int kMaxRetransmittableOnWirePingCount = 3; - SetQuicFlag(quic_max_retransmittable_on_wire_ping_count, - kMaxRetransmittableOnWirePingCount); - static constexpr QuicTime::Delta initial_retransmittable_on_wire_timeout = +// the limit in FLAGS_quic_max_retransmissible_on_wire_ping_count. +TEST_P(QuicConnectionTest, RetransmissibleOnWirePingLimit) { + static constexpr int kMaxRetransmissibleOnWirePingCount = 3; + SetQuicFlag(quic_max_retransmissible_on_wire_ping_count, + kMaxRetransmissibleOnWirePingCount); + static constexpr QuicTime::Delta initial_retransmissible_on_wire_timeout = QuicTime::Delta::FromMilliseconds(200); static constexpr QuicTime::Delta short_delay = QuicTime::Delta::FromMilliseconds(5); - ASSERT_LT(short_delay * 10, initial_retransmittable_on_wire_timeout); - connection_.set_initial_retransmittable_on_wire_timeout( - initial_retransmittable_on_wire_timeout); + ASSERT_LT(short_delay * 10, initial_retransmissible_on_wire_timeout); + connection_.set_initial_retransmissible_on_wire_timeout( + initial_retransmissible_on_wire_timeout); EXPECT_TRUE(connection_.connected()); EXPECT_CALL(visitor_, ShouldKeepConnectionAlive()) .WillRepeatedly(Return(true)); const char data[] = "data"; - // Advance 5ms, send a retransmittable data packet to the peer. + // Advance 5ms, send a retransmissible data packet to the peer. clock_.AdvanceTime(short_delay); EXPECT_FALSE(connection_.GetPingAlarm()->IsSet()); connection_.SendStreamDataWithString(1, data, 0, NO_FIN); EXPECT_TRUE(connection_.sent_packet_manager().HasInFlightPackets()); // The ping alarm is set for the ping timeout, not the shorter - // retransmittable_on_wire_timeout. + // retransmissible_on_wire_timeout. EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); EXPECT_EQ(QuicTime::Delta::FromSeconds(kPingTimeoutSecs), connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); @@ -8431,22 +8431,22 @@ TEST_P(QuicConnectionTest, RetransmittableOnWirePingLimit) { EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _, _, _, _)) .Times(AnyNumber()); - // Verify that the first few consecutive retransmittable on wire pings are + // Verify that the first few consecutive retransmissible on wire pings are // sent with aggressive timeout. - for (int i = 0; i <= kMaxRetransmittableOnWirePingCount; i++) { + for (int i = 0; i <= kMaxRetransmissibleOnWirePingCount; i++) { // Receive an ACK of the previous packet. This should set the ping alarm - // with the initial retransmittable-on-wire timeout. + // with the initial retransmissible-on-wire timeout. clock_.AdvanceTime(short_delay); QuicPacketNumber ack_num = creator_->packet_number(); QuicAckFrame frame = InitAckFrame( {{QuicPacketNumber(ack_num), QuicPacketNumber(ack_num + 1)}}); ProcessAckPacket(&frame); EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); - EXPECT_EQ(initial_retransmittable_on_wire_timeout, + EXPECT_EQ(initial_retransmissible_on_wire_timeout, connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); // Simulate the alarm firing and check that a PING is sent. writer_->Reset(); - clock_.AdvanceTime(initial_retransmittable_on_wire_timeout); + clock_.AdvanceTime(initial_retransmissible_on_wire_timeout); connection_.GetPingAlarm()->Fire(); } @@ -8646,7 +8646,7 @@ TEST_P(QuicConnectionTest, ServerResponseToPathChallenge) { sizeof(challenge_data))); } -TEST_P(QuicConnectionTest, ClientResponseToPathChallengeOnDefaulSocket) { +TEST_P(QuicConnectionTest, ClientResponseToPathChallengeOnDefaultSocket) { if (!VersionHasIetfQuicFrames(connection_.version().transport_version)) { return; } @@ -8766,7 +8766,7 @@ TEST_P(QuicConnectionTest, EXPECT_FALSE(connection_.PathDegradingDetectionInProgress()); if (!GetParam().version.HasIetfQuicFrames()) { - // Simulate path degrading handling by sending a probe on an alternet path. + // Simulate path degrading handling by sending a probe on an alternate path. clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); TestPacketWriter probing_writer(version(), &clock_, Perspective::IS_CLIENT); connection_.SendConnectivityProbingPacket(&probing_writer, @@ -9363,7 +9363,7 @@ TEST_P(QuicConnectionTest, CoalescedPacketThatSavesFrames) { SendAckPacketToPeer(); } -// Regresstion test for b/138962304. +// Regression test for b/138962304. TEST_P(QuicConnectionTest, RtoAndWriteBlocked) { EXPECT_FALSE(connection_.GetRetransmissionAlarm()->IsSet()); @@ -9389,7 +9389,7 @@ TEST_P(QuicConnectionTest, RtoAndWriteBlocked) { EXPECT_EQ(0u, connection_.NumQueuedPackets()); } -// Regresstion test for b/138962304. +// Regression test for b/138962304. TEST_P(QuicConnectionTest, PtoAndWriteBlocked) { EXPECT_FALSE(connection_.GetRetransmissionAlarm()->IsSet()); @@ -9482,7 +9482,7 @@ TEST_P(QuicConnectionTest, CloseConnectionAfter6ClientPTOs) { EXPECT_EQ(5u, connection_.sent_packet_manager().GetConsecutivePtoCount()); // Closes connection on 6th PTO. - // May send multiple connecction close packets with multiple PN spaces. + // May send multiple connection close packets with multiple PN spaces. EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(AtLeast(1)); EXPECT_CALL(visitor_, OnConnectionClosed(_, ConnectionCloseSource::FROM_SELF)); @@ -9638,8 +9638,8 @@ TEST_P(QuicConnectionTest, AntiAmplificationLimit) { // Verify no data can be sent at the beginning because bytes received is 0. EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(0); connection_.SendCryptoDataWithString("foo", 0); - EXPECT_FALSE(connection_.CanWrite(HAS_RETRANSMITTABLE_DATA)); - EXPECT_FALSE(connection_.CanWrite(NO_RETRANSMITTABLE_DATA)); + EXPECT_FALSE(connection_.CanWrite(HAS_RETRANSMISSIBLE_DATA)); + EXPECT_FALSE(connection_.CanWrite(NO_RETRANSMISSIBLE_DATA)); EXPECT_FALSE(connection_.GetRetransmissionAlarm()->IsSet()); // Receives packet 1. @@ -9711,8 +9711,8 @@ TEST_P(QuicConnectionTest, 3AntiAmplificationLimit) { // Verify no data can be sent at the beginning because bytes received is 0. EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(0); connection_.SendCryptoDataWithString("foo", 0); - EXPECT_FALSE(connection_.CanWrite(HAS_RETRANSMITTABLE_DATA)); - EXPECT_FALSE(connection_.CanWrite(NO_RETRANSMITTABLE_DATA)); + EXPECT_FALSE(connection_.CanWrite(HAS_RETRANSMISSIBLE_DATA)); + EXPECT_FALSE(connection_.CanWrite(NO_RETRANSMISSIBLE_DATA)); EXPECT_FALSE(connection_.GetRetransmissionAlarm()->IsSet()); // Receives packet 1. @@ -9783,8 +9783,8 @@ TEST_P(QuicConnectionTest, 10AntiAmplificationLimit) { // Verify no data can be sent at the beginning because bytes received is 0. EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(0); connection_.SendCryptoDataWithString("foo", 0); - EXPECT_FALSE(connection_.CanWrite(HAS_RETRANSMITTABLE_DATA)); - EXPECT_FALSE(connection_.CanWrite(NO_RETRANSMITTABLE_DATA)); + EXPECT_FALSE(connection_.CanWrite(HAS_RETRANSMISSIBLE_DATA)); + EXPECT_FALSE(connection_.CanWrite(NO_RETRANSMISSIBLE_DATA)); EXPECT_FALSE(connection_.GetRetransmissionAlarm()->IsSet()); // Receives packet 1. @@ -9849,7 +9849,7 @@ TEST_P(QuicConnectionTest, AckPendingWithAmplificationLimited) { // Send response in different encryption level and cause amplification factor // throttled. size_t i = 0; - while (connection_.CanWrite(HAS_RETRANSMITTABLE_DATA)) { + while (connection_.CanWrite(HAS_RETRANSMISSIBLE_DATA)) { connection_.SendCryptoDataWithString(std::string(1024, 'a'), i * 1024, ENCRYPTION_HANDSHAKE); ++i; @@ -10601,7 +10601,7 @@ TEST_P(QuicConnectionTest, BundleAckWithImmediateResponse) { connection_.SetDefaultEncryptionLevel(ENCRYPTION_FORWARD_SECURE); EXPECT_CALL(visitor_, OnStreamFrame(_)).WillOnce(Invoke([this]() { - notifier_.WriteOrBufferWindowUpate(0, 0); + notifier_.WriteOrBufferWindowUpdate(0, 0); })); EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(1); ProcessDataPacket(1); @@ -10692,7 +10692,7 @@ TEST_P(QuicConnectionTest, ClientOnlyBlackholeDetectionServer) { EXPECT_FALSE(connection_.GetBlackholeDetectorAlarm()->IsSet()); } -// Regresstion test for b/158491591. +// Regression test for b/158491591. TEST_P(QuicConnectionTest, MadeForwardProgressOnDiscardingKeys) { if (!connection_.SupportsMultiplePacketNumberSpaces()) { return; @@ -10879,7 +10879,7 @@ TEST_P(QuicConnectionTest, ClientBundlesHandshakeDataWithHandshakeAck) { EXPECT_FALSE(writer_->crypto_frames().empty()); } -// Regresstion test for b/156232673. +// Regression test for b/156232673. TEST_P(QuicConnectionTest, CoalescePacketOfLowerEncryptionLevel) { if (!connection_.version().CanSendCoalescedPackets()) { return; @@ -11251,7 +11251,7 @@ TEST_P(QuicConnectionTest, DoNotSendPing) { EXPECT_EQ(QuicTime::Delta::FromSeconds(15), connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow()); - // Now recevie an ACK and response of the previous packet, which will move the + // Now receive an ACK and response of the previous packet, which will move the // ping alarm forward. clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); QuicFrames frames; @@ -11553,7 +11553,7 @@ TEST_P(QuicConnectionTest, NewPathValidationCancelsPreviousOne) { &success2), PathValidationReason::kReasonUnknown); EXPECT_FALSE(success); - // There is no pening path validation as there is no available connection ID. + // There is no pending path validation as there is no available connection ID. EXPECT_FALSE(connection_.HasPendingPathValidation()); } @@ -11768,7 +11768,7 @@ TEST_P(QuicConnectionTest, SendPathChallengeFailOnNewSocket) { EXPECT_TRUE(connection_.connected()); } -// Tests that write error while sending PATH_CHALLANGE from the default socket +// Tests that write error while sending PATH_CHALLENGE from the default socket // should close the connection. TEST_P(QuicConnectionTest, SendPathChallengeFailOnDefaultPath) { if (!VersionHasIetfQuicFrames(connection_.version().transport_version)) { @@ -11995,7 +11995,7 @@ TEST_P(QuicConnectionTest, ReceiveStreamFrameFollowingPathChallenge) { EXPECT_CALL(visitor_, OnStreamFrame(_)) .WillOnce(Invoke([=](const QuicStreamFrame& frame) { // Send some data on the stream. The STREAM_FRAME should be built into a - // new packet but throttled by anti-amplifciation limit. + // new packet but throttled by anti-amplification limit. const std::string data{"response body"}; connection_.producer()->SaveStreamData(frame.stream_id, data); return notifier_.WriteOrBufferData(frame.stream_id, data.length(), @@ -12187,7 +12187,7 @@ TEST_P(QuicConnectionTest, CoalescerHandlesInitialKeyDiscard) { EXPECT_TRUE(connection_.connected()); } -// Regresstion test for b/168294218 +// Regression test for b/168294218 TEST_P(QuicConnectionTest, ZeroRttRejectionAndMissingInitialKeys) { if (!connection_.SupportsMultiplePacketNumberSpaces()) { return; @@ -13310,7 +13310,7 @@ TEST_P(QuicConnectionTest, TooManyMultiPortPathCreations) { EXPECT_EQ(i + 2, stats->num_multi_port_probe_failures_when_path_degrading); } - // The 6th attemp should fail. + // The 6th attempt should fail. QuicNewConnectionIdFrame frame2; frame2.connection_id = TestConnectionId(1239); ASSERT_NE(frame2.connection_id, connection_.connection_id()); @@ -13881,7 +13881,7 @@ TEST_P(QuicConnectionTest, PeerMigrateBeforeHandshakeConfirm) { EXPECT_FALSE(connection_.connected()); } -// Regresstion test for b/175685916 +// Regression test for b/175685916 TEST_P(QuicConnectionTest, TryToFlushAckWithAckQueued) { if (!version().HasIetfQuicFrames()) { return; @@ -13951,7 +13951,7 @@ TEST_P(QuicConnectionTest, PathChallengeBeforePeerIpAddressChangeAtServer) { QuicFrame(QuicPathChallengeFrame(0, path_challenge_payload))); QuicPathFrameBuffer payload; EXPECT_CALL(*send_algorithm_, - OnPacketSent(_, _, _, _, NO_RETRANSMITTABLE_DATA)) + OnPacketSent(_, _, _, _, NO_RETRANSMISSIBLE_DATA)) .Times(AtLeast(1)) .WillOnce(Invoke([&]() { EXPECT_EQ(kNewPeerAddress, writer_->last_write_peer_address()); @@ -13985,7 +13985,7 @@ TEST_P(QuicConnectionTest, PathChallengeBeforePeerIpAddressChangeAtServer) { // IETF QUIC send algorithm should be changed to a different object, so no // OnPacketSent() called on the old send algorithm. EXPECT_CALL(*send_algorithm_, - OnPacketSent(_, _, _, _, NO_RETRANSMITTABLE_DATA)) + OnPacketSent(_, _, _, _, NO_RETRANSMISSIBLE_DATA)) .Times(0); QuicFrames frames2; frames2.push_back(QuicFrame(frame2_)); @@ -14094,7 +14094,7 @@ TEST_P(QuicConnectionTest, /*port=*/23456); QuicPathFrameBuffer payload; EXPECT_CALL(*send_algorithm_, - OnPacketSent(_, _, _, _, NO_RETRANSMITTABLE_DATA)) + OnPacketSent(_, _, _, _, NO_RETRANSMISSIBLE_DATA)) .WillOnce(Invoke([&]() { EXPECT_EQ(kNewPeerAddress, writer_->last_write_peer_address()); EXPECT_EQ(kPeerAddress, connection_.peer_address()); @@ -14133,7 +14133,7 @@ TEST_P(QuicConnectionTest, // IETF QUIC send algorithm should be changed to a different object, so no // OnPacketSent() called on the old send algorithm. EXPECT_CALL(*send_algorithm_, - OnPacketSent(_, _, _, _, NO_RETRANSMITTABLE_DATA)) + OnPacketSent(_, _, _, _, NO_RETRANSMISSIBLE_DATA)) .Times(0); const QuicSocketAddress kNewerPeerAddress(QuicIpAddress::Loopback4(), /*port=*/34567); @@ -14229,7 +14229,7 @@ TEST_P(QuicConnectionTest, NoNonProbingFrameOnAlternativePath) { QuicFrame(QuicPathChallengeFrame(0, path_challenge_payload))); QuicPathFrameBuffer payload; EXPECT_CALL(*send_algorithm_, - OnPacketSent(_, _, _, _, NO_RETRANSMITTABLE_DATA)) + OnPacketSent(_, _, _, _, NO_RETRANSMISSIBLE_DATA)) .Times(AtLeast(1)) .WillOnce(Invoke([&]() { EXPECT_EQ(kNewPeerAddress, writer_->last_write_peer_address()); @@ -14260,7 +14260,7 @@ TEST_P(QuicConnectionTest, NoNonProbingFrameOnAlternativePath) { EXPECT_EQ(kPeerAddress, connection_.peer_address()); })); // Receives packets 3 - 39 to send 19 ACK-only packets, which will force the - // connection to reach |kMaxConsecutiveNonRetransmittablePackets| while + // connection to reach |kMaxConsecutiveNonRetransmissiblePackets| while // sending the next ACK. for (size_t i = 3; i <= 39; ++i) { ProcessDataPacket(i); @@ -14277,7 +14277,7 @@ TEST_P(QuicConnectionTest, NoNonProbingFrameOnAlternativePath) { clock_.ApproximateNow()); // The 20th ACK should bundle with a WINDOW_UPDATE frame. - EXPECT_CALL(visitor_, OnAckNeedsRetransmittableFrame()) + EXPECT_CALL(visitor_, OnAckNeedsRetransmissibleFrame()) .WillOnce(Invoke([this]() { connection_.SendControlFrame(QuicFrame(QuicWindowUpdateFrame(1, 0, 0))); })); @@ -14335,7 +14335,7 @@ TEST_P(QuicConnectionTest, // IETF QUIC send algorithm should be changed to a different object, so no // OnPacketSent() called on the old send algorithm. EXPECT_CALL(*send_algorithm_, - OnPacketSent(_, _, _, _, NO_RETRANSMITTABLE_DATA)) + OnPacketSent(_, _, _, _, NO_RETRANSMISSIBLE_DATA)) .Times(0); EXPECT_CALL(visitor_, OnStreamFrame(_)).WillOnce(Invoke([=]() { EXPECT_EQ(kNewPeerAddress, connection_.peer_address()); @@ -14656,7 +14656,7 @@ TEST_P(QuicConnectionTest, NewConnectionIdFrameResultsInError) { .WillOnce(Invoke(this, &QuicConnectionTest::SaveConnectionCloseFrame)); QuicNewConnectionIdFrame frame; frame.sequence_number = 1u; - frame.connection_id = connection_id_; // Reuses connection ID casuing error. + frame.connection_id = connection_id_; // Reuses connection ID causing error. frame.stateless_reset_token = QuicUtils::GenerateStatelessResetToken(frame.connection_id); frame.retire_prior_to = 0u; @@ -14928,7 +14928,7 @@ TEST_P(QuicConnectionTest, ServerRetireSelfIssuedConnectionId) { ConstructPacket({QuicFrame(QuicPingFrame())}, ENCRYPTION_FORWARD_SECURE, buffers[2], kMaxOutgoingPacketSize); - // Packet2 with RetireConnectionId frame trigers sending NewConnectionId + // Packet2 with RetireConnectionId frame triggers sending NewConnectionId // immediately. if (!connection_.connection_id().IsEmpty()) { EXPECT_CALL(connection_id_generator_, GenerateNextConnectionId(_)) @@ -15059,7 +15059,7 @@ TEST_P(QuicConnectionTest, ShouldGeneratePacketBlockedByMissingConnectionId) { } ASSERT_TRUE( - connection_.ShouldGeneratePacket(NO_RETRANSMITTABLE_DATA, NOT_HANDSHAKE)); + connection_.ShouldGeneratePacket(NO_RETRANSMISSIBLE_DATA, NOT_HANDSHAKE)); QuicPacketCreator* packet_creator = QuicConnectionPeer::GetPacketCreator(&connection_); @@ -15072,11 +15072,11 @@ TEST_P(QuicConnectionTest, ShouldGeneratePacketBlockedByMissingConnectionId) { QuicPacketCreator::ScopedPeerAddressContext context( packet_creator, peer_address1, EmptyQuicConnectionId(), EmptyQuicConnectionId()); - ASSERT_FALSE(connection_.ShouldGeneratePacket(NO_RETRANSMITTABLE_DATA, + ASSERT_FALSE(connection_.ShouldGeneratePacket(NO_RETRANSMISSIBLE_DATA, NOT_HANDSHAKE)); } ASSERT_TRUE( - connection_.ShouldGeneratePacket(NO_RETRANSMITTABLE_DATA, NOT_HANDSHAKE)); + connection_.ShouldGeneratePacket(NO_RETRANSMISSIBLE_DATA, NOT_HANDSHAKE)); } // Regression test for b/182571515 @@ -15371,7 +15371,7 @@ TEST_P(QuicConnectionTest, AckElicitingFrames) { bool skipped = false; QuicFrame frame; QuicFrames frames; - // Add some padding to fullfill the min size requirement of header + // Add some padding to fulfill the min size requirement of header // protection. frames.push_back(QuicFrame(QuicPaddingFrame(10))); switch (frame_type) { @@ -15799,7 +15799,7 @@ TEST_P(QuicConnectionTest, NoExtraPaddingInReserializedInitial) { connection_.QuicConnection::OnSerializedPacket(std::move(packet)); }); - // Server receives INITIAL 3, this will serialzie FS 7 (stream 4, stream 8), + // Server receives INITIAL 3, this will serialize FS 7 (stream 4, stream 8), // which will trigger a flush of a coalesced packet consists of INITIAL 4, // HS 5 and FS 6 (stream 4). @@ -16068,8 +16068,8 @@ TEST_P(QuicConnectionTest, StrictAntiAmplificationLimit) { // Verify no data can be sent at the beginning because bytes received is 0. EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(0); connection_.SendCryptoDataWithString("foo", 0); - EXPECT_FALSE(connection_.CanWrite(HAS_RETRANSMITTABLE_DATA)); - EXPECT_FALSE(connection_.CanWrite(NO_RETRANSMITTABLE_DATA)); + EXPECT_FALSE(connection_.CanWrite(HAS_RETRANSMISSIBLE_DATA)); + EXPECT_FALSE(connection_.CanWrite(NO_RETRANSMISSIBLE_DATA)); EXPECT_FALSE(connection_.GetRetransmissionAlarm()->IsSet()); const size_t anti_amplification_factor = @@ -16088,7 +16088,7 @@ TEST_P(QuicConnectionTest, StrictAntiAmplificationLimit) { for (size_t i = 1; i < anti_amplification_factor - 1; ++i) { connection_.SendCryptoDataWithString("foo", i * 3); } - // Send an addtion packet with max_packet_size - 1. + // Send an additional packet with max_packet_size - 1. connection_.SetMaxPacketLength(connection_.max_packet_length() - 1); connection_.SendCryptoDataWithString("bar", (anti_amplification_factor - 1) * 3); @@ -16292,7 +16292,7 @@ TEST_P(QuicConnectionTest, ClientValidatedServerPreferredAddress) { QuicFrames frames; frames.push_back(QuicFrame(QuicPathResponseFrame(99, payload))); // Verify send_algorithm gets reset after migration (new sent packet is not - // updated to exsting send_algorithm_). + // updated to existing send_algorithm_). EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(0); ProcessFramesPacketWithAddresses(frames, kNewSelfAddress, kServerPreferredAddress, @@ -16431,7 +16431,7 @@ TEST_P(QuicConnectionTest, ClientFailedToValidateServerPreferredAddress) { EXPECT_TRUE(QuicConnectionPeer::IsAlternativePath( &connection_, kNewSelfAddress, kServerPreferredAddress)); - // Simluate path validation times out. + // Simulate path validation times out. for (size_t i = 0; i < QuicPathValidator::kMaxRetryTimes + 1; ++i) { clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(3 * kInitialRttMs)); static_cast( @@ -16528,7 +16528,7 @@ TEST_P(QuicConnectionTest, OptimizedServerPreferredAddress2) { EXPECT_FALSE(writer_->stream_frames().empty()); EXPECT_FALSE(new_writer.stream_frames().empty()); - // Simluate path validation times out. + // Simulate path validation times out. for (size_t i = 0; i < QuicPathValidator::kMaxRetryTimes + 1; ++i) { clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(3 * kInitialRttMs)); static_cast( @@ -17168,7 +17168,7 @@ TEST_P(QuicConnectionTest, DetectMigrationToPreferredAddress) { } TEST_P(QuicConnectionTest, - DetectSimutanuousServerAndClientAddressChangeWithProbe) { + DetectSimultaneousServerAndClientAddressChangeWithProbe) { if (!GetParam().version.HasIetfQuicFrames()) { return; } diff --git a/quiche/quic/core/quic_constants.h b/quiche/quic/core/quic_constants.h index 51260402f..e92fc7d05 100644 --- a/quiche/quic/core/quic_constants.h +++ b/quiche/quic/core/quic_constants.h @@ -227,7 +227,7 @@ inline constexpr size_t kDiversificationNonceSize = 32; inline constexpr QuicPacketCount kMaxPacketGap = 5000; // The max number of sequence number intervals that -// QuicPeerIssuedConnetionIdManager can maintain. +// QuicPeerIssuedConnectionIdManager can maintain. inline constexpr size_t kMaxNumConnectionIdSequenceNumberIntervals = 20; // The maximum number of random padding bytes to add. @@ -285,10 +285,10 @@ inline constexpr int kDefaultLossDelayShift = 2; // Default fraction (1/8) of an RTT when doing IETF loss detection. inline constexpr int kDefaultIetfLossDelayShift = 3; -// Maximum number of retransmittable packets received before sending an ack. -inline constexpr QuicPacketCount kDefaultRetransmittablePacketsBeforeAck = 2; -// Wait for up to 10 retransmittable packets before sending an ack. -inline constexpr QuicPacketCount kMaxRetransmittablePacketsBeforeAck = 10; +// Maximum number of retransmissible packets received before sending an ack. +inline constexpr QuicPacketCount kDefaultRetransmissiblePacketsBeforeAck = 2; +// Wait for up to 10 retransmissible packets before sending an ack. +inline constexpr QuicPacketCount kMaxRetransmissiblePacketsBeforeAck = 10; // Minimum number of packets received before ack decimation is enabled. // This intends to avoid the beginning of slow start, when CWNDs may be // rapidly increasing. @@ -301,7 +301,7 @@ inline constexpr QuicTime::Delta kAlarmGranularity = QuicTime::Delta::FromMilliseconds(1); // Maximum number of unretired connection IDs a connection can have. -inline constexpr size_t kMaxNumConnectonIdsInUse = 10u; +inline constexpr size_t kMaxNumConnectionIdsInUse = 10u; // Packet number of first sending packet of a connection. Please note, this // cannot be used as first received packet because peer can choose its starting diff --git a/quiche/quic/core/quic_control_frame_manager.cc b/quiche/quic/core/quic_control_frame_manager.cc index 28c5b0c22..704b98cbc 100644 --- a/quiche/quic/core/quic_control_frame_manager.cc +++ b/quiche/quic/core/quic_control_frame_manager.cc @@ -300,7 +300,7 @@ bool QuicControlFrameManager::RetransmitControlFrame(const QuicFrame& frame, // This frame has already been acked. return true; } - QuicFrame copy = CopyRetransmittableControlFrame(frame); + QuicFrame copy = CopyRetransmissibleControlFrame(frame); QUIC_DVLOG(1) << "control frame manager is forced to retransmit frame: " << frame; if (delegate_->WriteControlFrame(copy, type)) { @@ -314,7 +314,7 @@ void QuicControlFrameManager::WriteBufferedFrames() { while (HasBufferedFrames()) { QuicFrame frame_to_send = control_frames_.at(least_unsent_ - least_unacked_); - QuicFrame copy = CopyRetransmittableControlFrame(frame_to_send); + QuicFrame copy = CopyRetransmissibleControlFrame(frame_to_send); if (!delegate_->WriteControlFrame(copy, NOT_RETRANSMISSION)) { // Connection is write blocked. DeleteFrame(©); @@ -327,7 +327,7 @@ void QuicControlFrameManager::WriteBufferedFrames() { void QuicControlFrameManager::WritePendingRetransmission() { while (HasPendingRetransmission()) { QuicFrame pending = NextPendingRetransmission(); - QuicFrame copy = CopyRetransmittableControlFrame(pending); + QuicFrame copy = CopyRetransmissibleControlFrame(pending); if (!delegate_->WriteControlFrame(copy, LOSS_RETRANSMISSION)) { // Connection is write blocked. DeleteFrame(©); diff --git a/quiche/quic/core/quic_control_frame_manager.h b/quiche/quic/core/quic_control_frame_manager.h index 3508f9d9d..dda3b8bf9 100644 --- a/quiche/quic/core/quic_control_frame_manager.h +++ b/quiche/quic/core/quic_control_frame_manager.h @@ -26,7 +26,7 @@ class QuicControlFrameManagerPeer; // Control frame manager contains a list of sent control frames with valid // control frame IDs. Control frames without valid control frame IDs include: -// (1) non-retransmittable frames (e.g., ACK_FRAME, PADDING_FRAME, +// (1) non-retransmissible frames (e.g., ACK_FRAME, PADDING_FRAME, // STOP_WAITING_FRAME, etc.), (2) CONNECTION_CLOSE and IETF Quic // APPLICATION_CLOSE frames. // New control frames are added to the tail of the list when they are added to @@ -80,11 +80,11 @@ class QUICHE_EXPORT QuicControlFrameManager { void WriteOrBufferMaxStreams(QuicStreamCount count, bool unidirectional); // Tries to send an IETF-QUIC STOP_SENDING frame. The frame is buffered if it - // can not be sent immediately. + // cannot be sent immediately. void WriteOrBufferStopSending(QuicResetStreamError error, QuicStreamId stream_id); - // Tries to send an HANDSHAKE_DONE frame. The frame is buffered if it can not + // Tries to send an HANDSHAKE_DONE frame. The frame is buffered if it cannot // be sent immediately. void WriteOrBufferHandshakeDone(); @@ -100,7 +100,7 @@ class QUICHE_EXPORT QuicControlFrameManager { uint64_t retire_prior_to, const StatelessResetToken& stateless_reset_token); - // Tries to send a RETIRE_CONNNECTION_ID frame. The frame is buffered if it + // Tries to send a RETIRE_CONNECTION_ID frame. The frame is buffered if it // cannot be sent immediately. void WriteOrBufferRetireConnectionId(uint64_t sequence_number); diff --git a/quiche/quic/core/quic_crypto_client_handshaker.cc b/quiche/quic/core/quic_crypto_client_handshaker.cc index 830f9f7f2..cbf1b8bc2 100644 --- a/quiche/quic/core/quic_crypto_client_handshaker.cc +++ b/quiche/quic/core/quic_crypto_client_handshaker.cc @@ -351,7 +351,7 @@ void QuicCryptoClientHandshaker::DoSendCHLO( QUIC_DLOG(DFATAL) << "max_packet_length (" << max_packet_size << ") has no room for framing overhead."; stream_->OnUnrecoverableError(QUIC_INTERNAL_ERROR, - "max_packet_size too smalll"); + "max_packet_size too small"); return; } if (kClientHelloMinimumSize > max_packet_size - kFramingOverhead) { diff --git a/quiche/quic/core/quic_crypto_client_handshaker_test.cc b/quiche/quic/core/quic_crypto_client_handshaker_test.cc index b31ec18b9..f90cfb5d7 100644 --- a/quiche/quic/core/quic_crypto_client_handshaker_test.cc +++ b/quiche/quic/core/quic_crypto_client_handshaker_test.cc @@ -94,7 +94,7 @@ class DummyProofSource : public ProofSource { void ComputeTlsSignature( const QuicSocketAddress& /*server_address*/, const QuicSocketAddress& /*client_address*/, - const std::string& /*hostname*/, uint16_t /*signature_algorit*/, + const std::string& /*hostname*/, uint16_t /*signature_algorithm*/, absl::string_view /*in*/, std::unique_ptr callback) override { callback->Run(true, "Dummy signature", /*details=*/nullptr); diff --git a/quiche/quic/core/quic_crypto_client_stream.h b/quiche/quic/core/quic_crypto_client_stream.h index 1805289aa..e35b63add 100644 --- a/quiche/quic/core/quic_crypto_client_stream.h +++ b/quiche/quic/core/quic_crypto_client_stream.h @@ -106,7 +106,7 @@ class QUICHE_EXPORT QuicCryptoClientStream : public QuicCryptoClientStreamBase { // kMaxClientHellos is the maximum number of times that we'll send a client // hello. The value 4 accounts for: // * One failure due to an incorrect or missing source-address token. - // * One failure due the server's certificate chain being unavailible and + // * One failure due the server's certificate chain being unavailable and // the server being unwilling to send it without a valid source-address // token. // * One failure due to the ServerConfig private key being located on a diff --git a/quiche/quic/core/quic_crypto_client_stream_test.cc b/quiche/quic/core/quic_crypto_client_stream_test.cc index 377f7a296..e32851483 100644 --- a/quiche/quic/core/quic_crypto_client_stream_test.cc +++ b/quiche/quic/core/quic_crypto_client_stream_test.cc @@ -98,7 +98,7 @@ class QuicCryptoClientStreamTest : public QuicTest { std::unique_ptr server_crypto_config_; }; -TEST_F(QuicCryptoClientStreamTest, NotInitiallyConected) { +TEST_F(QuicCryptoClientStreamTest, NotInitiallyConnected) { EXPECT_FALSE(stream()->encryption_established()); EXPECT_FALSE(stream()->one_rtt_keys_available()); } diff --git a/quiche/quic/core/quic_crypto_server_stream_test.cc b/quiche/quic/core/quic_crypto_server_stream_test.cc index 516a25f0e..40c9fd155 100644 --- a/quiche/quic/core/quic_crypto_server_stream_test.cc +++ b/quiche/quic/core/quic_crypto_server_stream_test.cc @@ -178,7 +178,7 @@ class QuicCryptoServerStreamTest : public QuicTest { AllSupportedVersionsWithQuicCrypto(); }; -TEST_F(QuicCryptoServerStreamTest, NotInitiallyConected) { +TEST_F(QuicCryptoServerStreamTest, NotInitiallyConnected) { Initialize(); EXPECT_FALSE(server_stream()->encryption_established()); EXPECT_FALSE(server_stream()->one_rtt_keys_available()); diff --git a/quiche/quic/core/quic_crypto_stream_test.cc b/quiche/quic/core/quic_crypto_stream_test.cc index 70928aeb9..ac56b01cc 100644 --- a/quiche/quic/core/quic_crypto_stream_test.cc +++ b/quiche/quic/core/quic_crypto_stream_test.cc @@ -161,7 +161,7 @@ class QuicCryptoStreamTest : public QuicTest { std::unique_ptr message_data_; }; -TEST_F(QuicCryptoStreamTest, NotInitiallyConected) { +TEST_F(QuicCryptoStreamTest, NotInitiallyConnected) { EXPECT_FALSE(stream_->encryption_established()); EXPECT_FALSE(stream_->one_rtt_keys_available()); } @@ -288,7 +288,7 @@ TEST_F(QuicCryptoStreamTest, RetransmitCryptoDataInCryptoFrames) { stream_->WriteCryptoData(ENCRYPTION_ZERO_RTT, data); // Before encryption moves to ENCRYPTION_FORWARD_SECURE, ZERO RTT data are - // retranmitted at ENCRYPTION_ZERO_RTT. + // retransmitted at ENCRYPTION_ZERO_RTT. QuicCryptoFrame lost_frame = QuicCryptoFrame(ENCRYPTION_ZERO_RTT, 0, 650); stream_->OnCryptoFrameLost(&lost_frame); diff --git a/quiche/quic/core/quic_datagram_queue.cc b/quiche/quic/core/quic_datagram_queue.cc index 0b7b3f51d..4a5ac2861 100644 --- a/quiche/quic/core/quic_datagram_queue.cc +++ b/quiche/quic/core/quic_datagram_queue.cc @@ -26,7 +26,7 @@ QuicDatagramQueue::QuicDatagramQueue(QuicSession* session, MessageStatus QuicDatagramQueue::SendOrQueueDatagram( quiche::QuicheMemSlice datagram) { - // If the queue is non-empty, always queue the daragram. This ensures that + // If the queue is non-empty, always queue the datagram. This ensures that // the datagrams are sent in the same order that they were sent by the // application. if (queue_.empty()) { diff --git a/quiche/quic/core/quic_dispatcher.cc b/quiche/quic/core/quic_dispatcher.cc index 09ece446d..6454d4da3 100644 --- a/quiche/quic/core/quic_dispatcher.cc +++ b/quiche/quic/core/quic_dispatcher.cc @@ -135,7 +135,7 @@ class PacketCollector : public QuicPacketCreator::DelegateInterface, void OnUnrecoverableError(QuicErrorCode /*error*/, const std::string& /*error_details*/) override {} - bool ShouldGeneratePacket(HasRetransmittableData /*retransmittable*/, + bool ShouldGeneratePacket(HasRetransmissibleData /*retransmissible*/, IsHandshake /*handshake*/) override { QUICHE_DCHECK(false); return true; @@ -1197,7 +1197,7 @@ void QuicDispatcher::ProcessChlo(ParsedClientHello parsed_chlo, ReceivedPacketInfo* packet_info) { if (GetQuicFlag(quic_allow_chlo_buffering) && new_sessions_allowed_per_event_loop_ <= 0) { - // Can't create new session any more. Wait till next event loop. + // Can't create new session anymore. Wait till next event loop. QUIC_BUG_IF(quic_bug_12724_7, buffered_packets_.HasChloForConnection( packet_info->destination_connection_id)); EnqueuePacketResult rs = buffered_packets_.EnqueuePacket( diff --git a/quiche/quic/core/quic_dispatcher_test.cc b/quiche/quic/core/quic_dispatcher_test.cc index 35b96ff5e..ebf78b263 100644 --- a/quiche/quic/core/quic_dispatcher_test.cc +++ b/quiche/quic/core/quic_dispatcher_test.cc @@ -2084,14 +2084,14 @@ TEST_P(QuicDispatcherWriteBlockedListTest, OnCanWriteOrder) { } TEST_P(QuicDispatcherWriteBlockedListTest, OnCanWriteRemove) { - // Add and remove one connction. + // Add and remove one connection. SetBlocked(); dispatcher_->OnWriteBlocked(connection1()); blocked_list_->erase(connection1()); EXPECT_CALL(*connection1(), OnCanWrite()).Times(0); dispatcher_->OnCanWrite(); - // Add and remove one connction and make sure it doesn't affect others. + // Add and remove one connection and make sure it doesn't affect others. SetBlocked(); dispatcher_->OnWriteBlocked(connection1()); dispatcher_->OnWriteBlocked(connection2()); @@ -2465,7 +2465,7 @@ TEST_P(QuicDispatcherSupportMultipleConnectionIdPerConnectionTest, } TEST_P(QuicDispatcherSupportMultipleConnectionIdPerConnectionTest, - TimeWaitListPoplulateCorrectly) { + TimeWaitListPopulateCorrectly) { QuicTimeWaitListManager* time_wait_list_manager = QuicDispatcherPeer::GetTimeWaitListManager(dispatcher_.get()); AddConnection1(); @@ -2798,7 +2798,7 @@ TEST_P(BufferedPacketStoreTest, ProcessCHLOsUptoLimitAndBufferTheRest) { } } - // Graduately consume buffered CHLOs. The buffered connections should be + // Gradually consume buffered CHLOs. The buffered connections should be // created but the dropped one shouldn't. for (uint64_t conn_id = kMaxNumSessionsToCreate + 1; conn_id <= kMaxNumSessionsToCreate + kDefaultMaxConnectionsInStore; diff --git a/quiche/quic/core/quic_error_codes.cc b/quiche/quic/core/quic_error_codes.cc index c1af8b390..f9a7bfda0 100644 --- a/quiche/quic/core/quic_error_codes.cc +++ b/quiche/quic/core/quic_error_codes.cc @@ -261,7 +261,7 @@ const char* QuicErrorCodeToString(QuicErrorCode error) { RETURN_STRING_LITERAL(QUIC_HPACK_TRUNCATED_BLOCK); RETURN_STRING_LITERAL(QUIC_HPACK_FRAGMENT_TOO_LONG); RETURN_STRING_LITERAL(QUIC_HPACK_COMPRESSED_HEADER_SIZE_EXCEEDS_LIMIT); - RETURN_STRING_LITERAL(QUIC_ZERO_RTT_UNRETRANSMITTABLE); + RETURN_STRING_LITERAL(QUIC_ZERO_RTT_UNRETRANSMISSIBLE); RETURN_STRING_LITERAL(QUIC_ZERO_RTT_REJECTION_LIMIT_REDUCED); RETURN_STRING_LITERAL(QUIC_ZERO_RTT_RESUMPTION_LIMIT_REDUCED); RETURN_STRING_LITERAL(QUIC_SILENT_IDLE_TIMEOUT); @@ -738,7 +738,7 @@ QuicErrorCodeToIetfMapping QuicErrorCodeToTransportErrorCode( return {true, static_cast(INTERNAL_ERROR)}; case QUIC_HPACK_COMPRESSED_HEADER_SIZE_EXCEEDS_LIMIT: return {true, static_cast(INTERNAL_ERROR)}; - case QUIC_ZERO_RTT_UNRETRANSMITTABLE: + case QUIC_ZERO_RTT_UNRETRANSMISSIBLE: return {true, static_cast(INTERNAL_ERROR)}; case QUIC_ZERO_RTT_REJECTION_LIMIT_REDUCED: return {true, static_cast(INTERNAL_ERROR)}; diff --git a/quiche/quic/core/quic_error_codes.h b/quiche/quic/core/quic_error_codes.h index a1ea0d46e..8ddfa91e1 100644 --- a/quiche/quic/core/quic_error_codes.h +++ b/quiche/quic/core/quic_error_codes.h @@ -24,7 +24,7 @@ enum QuicRstStreamErrorCode : uint32_t { QUIC_ERROR_PROCESSING_STREAM = 1, // We got two fin or reset offsets which did not match. QUIC_MULTIPLE_TERMINATION_OFFSETS = 2, - // We got bad payload and can not respond to it at the protocol level. + // We got bad payload and cannot respond to it at the protocol level. QUIC_BAD_APPLICATION_PAYLOAD = 3, // Stream closed due to connection error. No reset frame is sent when this // happens. @@ -274,7 +274,7 @@ enum QuicErrorCode : uint32_t { // A crypto message was received that contained a parameter with too few // values. QUIC_CRYPTO_MESSAGE_INDEX_NOT_FOUND = 37, - // A demand for an unsupport proof type was received. + // A demand for an unsupported proof type was received. QUIC_UNSUPPORTED_PROOF_DEMAND = 94, // An internal error occurred in crypto processing. QUIC_CRYPTO_INTERNAL_ERROR = 38, @@ -456,7 +456,7 @@ enum QuicErrorCode : uint32_t { // Insert Count Increment instruction causes uint64_t overflow. QUIC_QPACK_DECODER_STREAM_INCREMENT_OVERFLOW = 188, // Insert Count Increment instruction increases Known Received Count beyond - // inserted entry cound. + // inserted entry count. QUIC_QPACK_DECODER_STREAM_IMPOSSIBLE_INSERT_COUNT = 189, // Header Acknowledgement received for stream that has no outstanding header // blocks. @@ -560,11 +560,11 @@ enum QuicErrorCode : uint32_t { QUIC_HPACK_COMPRESSED_HEADER_SIZE_EXCEEDS_LIMIT = 150, // Stream/flow control limit from 1-RTT handshake is too low to retransmit - // 0-RTT data. This is our implentation error. We could in theory keep the + // 0-RTT data. This is our implementation error. We could in theory keep the // connection alive but chose not to for simplicity. - QUIC_ZERO_RTT_UNRETRANSMITTABLE = 161, + QUIC_ZERO_RTT_UNRETRANSMISSIBLE = 161, // Stream/flow control limit from 0-RTT rejection reduces cached limit. - // This is our implentation error. We could in theory keep the connection + // This is our implementation error. We could in theory keep the connection // alive but chose not to for simplicity. QUIC_ZERO_RTT_REJECTION_LIMIT_REDUCED = 162, // Stream/flow control limit from 0-RTT resumption reduces cached limit. diff --git a/quiche/quic/core/quic_flags_list.h b/quiche/quic/core/quic_flags_list.h index b9ab89fbf..9b7c933e3 100644 --- a/quiche/quic/core/quic_flags_list.h +++ b/quiche/quic/core/quic_flags_list.h @@ -33,7 +33,7 @@ QUIC_FLAG(quic_restart_flag_quic_testonly_default_true, true) QUIC_FLAG(quic_restart_flag_spdy_testonly_default_true, false) // If enabled and a BSUS connection is received, blocks server connections until SETTINGS frame is received. QUIC_FLAG(quic_reloadable_flag_quic_block_until_settings_received_copt, true) -// If trrue, early return before write control frame in OnCanWrite() if the connection is already closed. +// If true, early return before write control frame in OnCanWrite() if the connection is already closed. QUIC_FLAG(quic_reloadable_flag_quic_no_write_control_frame_upon_connection_close, true) // If true and defer_send_in_response_to_packets is enabled, QuicConnection will schedule send alarms at the end of packet processing only if it\'s necessary. QUIC_FLAG(quic_reloadable_flag_quic_no_send_alarm_unless_necessary, true) @@ -55,7 +55,7 @@ QUIC_FLAG(quic_reloadable_flag_quic_allow_client_enabled_bbr_v2, true) QUIC_FLAG(quic_restart_flag_quic_opport_bundle_qpack_decoder_data, false) // If true, an endpoint does not detect path degrading or blackholing until handshake gets confirmed. QUIC_FLAG(quic_reloadable_flag_quic_no_path_degrading_before_handshake_confirmed, true) -// If true, default-enable 5RTO blachole detection. +// If true, default-enable 5RTO blackhole detection. QUIC_FLAG(quic_reloadable_flag_quic_default_enable_5rto_blackhole_detection2, true) // If true, disable QUIC version Q046. QUIC_FLAG(quic_reloadable_flag_quic_disable_version_q046, true) @@ -75,7 +75,7 @@ QUIC_FLAG(quic_reloadable_flag_quic_discard_initial_packet_with_key_dropped, tru QUIC_FLAG(quic_reloadable_flag_quic_new_error_code_when_packets_buffered_too_long, true) // If true, do not send MAX_STREAM frames if there are already 2 outstanding. QUIC_FLAG(quic_reloadable_flag_quic_limit_sending_max_streams, false) -// If true, enable server retransmittable on wire PING. +// If true, enable server retransmissible on wire PING. QUIC_FLAG(quic_reloadable_flag_quic_enable_server_on_wire_ping, true) // If true, flush ACK frame in QuicConnection::MaybeBundleOpportunistically. QUIC_FLAG(quic_reloadable_flag_quic_flush_ack_in_maybe_bundle, true) diff --git a/quiche/quic/core/quic_flow_controller_test.cc b/quiche/quic/core/quic_flow_controller_test.cc index 567b120e6..0e7f3802c 100644 --- a/quiche/quic/core/quic_flow_controller_test.cc +++ b/quiche/quic/core/quic_flow_controller_test.cc @@ -200,7 +200,7 @@ TEST_F(QuicFlowControllerTest, ReceivingBytesFastIncreasesFlowWindow) { EXPECT_CALL(*session_, WriteControlFrame(_, _)).Times(1); EXPECT_TRUE(flow_controller_->auto_tune_receive_window()); - // Make sure clock is inititialized. + // Make sure clock is initialized. connection_->AdvanceTime(QuicTime::Delta::FromMilliseconds(1)); QuicSentPacketManager* manager = @@ -254,7 +254,7 @@ TEST_F(QuicFlowControllerTest, ReceivingBytesFastNoAutoTune) { .WillRepeatedly(Invoke(&ClearControlFrameWithTransmissionType)); EXPECT_FALSE(flow_controller_->auto_tune_receive_window()); - // Make sure clock is inititialized. + // Make sure clock is initialized. connection_->AdvanceTime(QuicTime::Delta::FromMilliseconds(1)); QuicSentPacketManager* manager = @@ -307,7 +307,7 @@ TEST_F(QuicFlowControllerTest, ReceivingBytesNormalStableFlowWindow) { EXPECT_CALL(*session_, WriteControlFrame(_, _)).Times(1); EXPECT_TRUE(flow_controller_->auto_tune_receive_window()); - // Make sure clock is inititialized. + // Make sure clock is initialized. connection_->AdvanceTime(QuicTime::Delta::FromMilliseconds(1)); QuicSentPacketManager* manager = @@ -364,7 +364,7 @@ TEST_F(QuicFlowControllerTest, ReceivingBytesNormalNoAutoTune) { .WillRepeatedly(Invoke(&ClearControlFrameWithTransmissionType)); EXPECT_FALSE(flow_controller_->auto_tune_receive_window()); - // Make sure clock is inititialized. + // Make sure clock is initialized. connection_->AdvanceTime(QuicTime::Delta::FromMilliseconds(1)); QuicSentPacketManager* manager = diff --git a/quiche/quic/core/quic_framer.cc b/quiche/quic/core/quic_framer.cc index b17b8c9eb..55620ad40 100644 --- a/quiche/quic/core/quic_framer.cc +++ b/quiche/quic/core/quic_framer.cc @@ -98,7 +98,7 @@ static_assert(kQuicFrameTypeSpecialMask == // D is the data length bit (0 or 2 bytes). // OO/OOO are the size of the offset. // SS is the size of the stream ID. -// Note that the stream encoding can not be determined by inspection. It can +// Note that the stream encoding cannot be determined by inspection. It can // be determined only by knowing the QUIC Version. // Stream frame relative shifts and masks for interpreting the stream flags. // StreamID may be 1, 2, 3, or 4 bytes. @@ -637,7 +637,7 @@ size_t QuicFramer::GetPathResponseFrameSize( } // static -size_t QuicFramer::GetRetransmittableControlFrameSize( +size_t QuicFramer::GetRetransmissibleControlFrameSize( QuicTransportVersion version, const QuicFrame& frame) { switch (frame.type) { case PING_FRAME: @@ -1333,7 +1333,7 @@ std::unique_ptr QuicFramer::BuildVersionNegotiationPacket( wire_versions = {QuicVersionReservedForNegotiation(), QuicVersionReservedForNegotiation()}; } else { - // This is not uniformely distributed but is acceptable since no security + // This is not uniformly distributed but is acceptable since no security // depends on this randomness. size_t version_index = 0; const bool disable_randomness = @@ -2032,7 +2032,7 @@ bool QuicFramer::AppendIetfPacketHeader(const QuicPacketHeader& header, QUICHE_DCHECK_NE(quiche::VARIABLE_LENGTH_INTEGER_LENGTH_0, header.retry_token_length_length) << ENDPOINT << ParsedQuicVersionToString(version_) - << " bad retry token length length in header: " << header; + << " bad retry token length in header: " << header; // Write retry token length. if (!writer->WriteVarInt62WithForcedLength( header.retry_token.length(), header.retry_token_length_length)) { @@ -3650,7 +3650,7 @@ bool QuicFramer::ProcessIetfAckFrame(QuicDataReader* reader, // there must be space for at least 1 packet to be acked. For // example, if block_low is 10 and gap_block_value is 9, it means // the gap block is 10 packets long, leaving no room for a packet - // to be acked. Thus, gap_block_value+2 can not be larger than + // to be acked. Thus, gap_block_value+2 cannot be larger than // block_low. // The test is written this way to detect wrap-arounds. if ((gap_block_value + 2) > block_low) { @@ -4602,7 +4602,7 @@ bool QuicFramer::DecryptPayload(size_t udp_packet_length, if (alternative_decrypter_level_ == ENCRYPTION_ZERO_RTT) { if (perspective_ == Perspective::IS_CLIENT) { if (header.nonce == nullptr) { - // Can not use INITIAL decryption without a diversification nonce. + // Cannot use INITIAL decryption without a diversification nonce. try_alternative_decryption = false; } } else { @@ -4775,7 +4775,7 @@ size_t QuicFramer::ComputeFrameLength( QUICHE_DCHECK(false); return 0; default: - return GetRetransmittableControlFrameSize(version_.transport_version, + return GetRetransmissibleControlFrameSize(version_.transport_version, frame); } } @@ -5278,7 +5278,7 @@ bool QuicFramer::AppendAckFrameAndTypeByte(const QuicAckFrame& frame, if (num_ack_blocks > 0) { size_t num_ack_blocks_written = 0; // Append, in descending order from the largest ACKed packet, a series of - // ACK blocks that represents the successfully acknoweldged packets. Each + // ACK blocks that represents the successfully acknowledged packets. Each // appended gap/block length represents a descending delta from the previous // block. i.e.: // |--- length ---|--- gap ---|--- length ---|--- gap ---|--- largest ---| @@ -5848,7 +5848,7 @@ bool QuicFramer::AppendIetfConnectionCloseFrame( } if (!writer->WriteVarInt62(frame.wire_error_code)) { - set_detailed_error("Can not write connection close frame error code"); + set_detailed_error("Cannot write connection close frame error code"); return false; } @@ -5868,7 +5868,7 @@ bool QuicFramer::AppendIetfConnectionCloseFrame( GenerateErrorString(frame.error_details, frame.quic_error_code); if (!writer->WriteStringPieceVarInt62( TruncateErrorString(final_error_string))) { - set_detailed_error("Can not write connection close phrase"); + set_detailed_error("Cannot write connection close phrase"); return false; } return true; @@ -5921,7 +5921,7 @@ bool QuicFramer::ProcessPathChallengeFrame(QuicDataReader* reader, QuicPathChallengeFrame* frame) { if (!reader->ReadBytes(frame->data_buffer.data(), frame->data_buffer.size())) { - set_detailed_error("Can not read path challenge data."); + set_detailed_error("Cannot read path challenge data."); return false; } return true; @@ -5931,7 +5931,7 @@ bool QuicFramer::ProcessPathResponseFrame(QuicDataReader* reader, QuicPathResponseFrame* frame) { if (!reader->ReadBytes(frame->data_buffer.data(), frame->data_buffer.size())) { - set_detailed_error("Can not read path response data."); + set_detailed_error("Cannot read path response data."); return false; } return true; @@ -6021,12 +6021,12 @@ bool QuicFramer::ProcessStopSendingFrame( bool QuicFramer::AppendStopSendingFrame( const QuicStopSendingFrame& stop_sending_frame, QuicDataWriter* writer) { if (!writer->WriteVarInt62(stop_sending_frame.stream_id)) { - set_detailed_error("Can not write stop sending stream id"); + set_detailed_error("Cannot write stop sending stream id"); return false; } if (!writer->WriteVarInt62( static_cast(stop_sending_frame.ietf_error_code))) { - set_detailed_error("Can not write application error code"); + set_detailed_error("Cannot write application error code"); return false; } return true; @@ -6036,7 +6036,7 @@ bool QuicFramer::AppendStopSendingFrame( bool QuicFramer::AppendMaxDataFrame(const QuicWindowUpdateFrame& frame, QuicDataWriter* writer) { if (!writer->WriteVarInt62(frame.max_data)) { - set_detailed_error("Can not write MAX_DATA byte-offset"); + set_detailed_error("Cannot write MAX_DATA byte-offset"); return false; } return true; @@ -6046,7 +6046,7 @@ bool QuicFramer::ProcessMaxDataFrame(QuicDataReader* reader, QuicWindowUpdateFrame* frame) { frame->stream_id = QuicUtils::GetInvalidStreamId(transport_version()); if (!reader->ReadVarInt62(&frame->max_data)) { - set_detailed_error("Can not read MAX_DATA byte-offset"); + set_detailed_error("Cannot read MAX_DATA byte-offset"); return false; } return true; @@ -6056,11 +6056,11 @@ bool QuicFramer::ProcessMaxDataFrame(QuicDataReader* reader, bool QuicFramer::AppendMaxStreamDataFrame(const QuicWindowUpdateFrame& frame, QuicDataWriter* writer) { if (!writer->WriteVarInt62(frame.stream_id)) { - set_detailed_error("Can not write MAX_STREAM_DATA stream id"); + set_detailed_error("Cannot write MAX_STREAM_DATA stream id"); return false; } if (!writer->WriteVarInt62(frame.max_data)) { - set_detailed_error("Can not write MAX_STREAM_DATA byte-offset"); + set_detailed_error("Cannot write MAX_STREAM_DATA byte-offset"); return false; } return true; @@ -6073,7 +6073,7 @@ bool QuicFramer::ProcessMaxStreamDataFrame(QuicDataReader* reader, return false; } if (!reader->ReadVarInt62(&frame->max_data)) { - set_detailed_error("Can not read MAX_STREAM_DATA byte-count"); + set_detailed_error("Cannot read MAX_STREAM_DATA byte-count"); return false; } return true; @@ -6082,7 +6082,7 @@ bool QuicFramer::ProcessMaxStreamDataFrame(QuicDataReader* reader, bool QuicFramer::AppendMaxStreamsFrame(const QuicMaxStreamsFrame& frame, QuicDataWriter* writer) { if (!writer->WriteVarInt62(frame.stream_count)) { - set_detailed_error("Can not write MAX_STREAMS stream count"); + set_detailed_error("Cannot write MAX_STREAMS stream count"); return false; } return true; @@ -6103,7 +6103,7 @@ bool QuicFramer::ProcessMaxStreamsFrame(QuicDataReader* reader, bool QuicFramer::AppendDataBlockedFrame(const QuicBlockedFrame& frame, QuicDataWriter* writer) { if (!writer->WriteVarInt62(frame.offset)) { - set_detailed_error("Can not write blocked offset."); + set_detailed_error("Cannot write blocked offset."); return false; } return true; @@ -6114,7 +6114,7 @@ bool QuicFramer::ProcessDataBlockedFrame(QuicDataReader* reader, // Indicates that it is a BLOCKED frame (as opposed to STREAM_BLOCKED). frame->stream_id = QuicUtils::GetInvalidStreamId(transport_version()); if (!reader->ReadVarInt62(&frame->offset)) { - set_detailed_error("Can not read blocked offset."); + set_detailed_error("Cannot read blocked offset."); return false; } return true; @@ -6123,11 +6123,11 @@ bool QuicFramer::ProcessDataBlockedFrame(QuicDataReader* reader, bool QuicFramer::AppendStreamDataBlockedFrame(const QuicBlockedFrame& frame, QuicDataWriter* writer) { if (!writer->WriteVarInt62(frame.stream_id)) { - set_detailed_error("Can not write stream blocked stream id."); + set_detailed_error("Cannot write stream blocked stream id."); return false; } if (!writer->WriteVarInt62(frame.offset)) { - set_detailed_error("Can not write stream blocked offset."); + set_detailed_error("Cannot write stream blocked offset."); return false; } return true; @@ -6140,7 +6140,7 @@ bool QuicFramer::ProcessStreamDataBlockedFrame(QuicDataReader* reader, return false; } if (!reader->ReadVarInt62(&frame->offset)) { - set_detailed_error("Can not read stream blocked offset."); + set_detailed_error("Cannot read stream blocked offset."); return false; } return true; @@ -6149,7 +6149,7 @@ bool QuicFramer::ProcessStreamDataBlockedFrame(QuicDataReader* reader, bool QuicFramer::AppendStreamsBlockedFrame(const QuicStreamsBlockedFrame& frame, QuicDataWriter* writer) { if (!writer->WriteVarInt62(frame.stream_count)) { - set_detailed_error("Can not write STREAMS_BLOCKED stream count"); + set_detailed_error("Cannot write STREAMS_BLOCKED stream count"); return false; } return true; @@ -6177,22 +6177,22 @@ bool QuicFramer::ProcessStreamsBlockedFrame(QuicDataReader* reader, bool QuicFramer::AppendNewConnectionIdFrame( const QuicNewConnectionIdFrame& frame, QuicDataWriter* writer) { if (!writer->WriteVarInt62(frame.sequence_number)) { - set_detailed_error("Can not write New Connection ID sequence number"); + set_detailed_error("Cannot write New Connection ID sequence number"); return false; } if (!writer->WriteVarInt62(frame.retire_prior_to)) { - set_detailed_error("Can not write New Connection ID retire_prior_to"); + set_detailed_error("Cannot write New Connection ID retire_prior_to"); return false; } if (!writer->WriteLengthPrefixedConnectionId(frame.connection_id)) { - set_detailed_error("Can not write New Connection ID frame connection ID"); + set_detailed_error("Cannot write New Connection ID frame connection ID"); return false; } if (!writer->WriteBytes( static_cast(&frame.stateless_reset_token), sizeof(frame.stateless_reset_token))) { - set_detailed_error("Can not write New Connection ID Reset Token"); + set_detailed_error("Cannot write New Connection ID Reset Token"); return false; } return true; @@ -6229,7 +6229,7 @@ bool QuicFramer::ProcessNewConnectionIdFrame(QuicDataReader* reader, if (!reader->ReadBytes(&frame->stateless_reset_token, sizeof(frame->stateless_reset_token))) { - set_detailed_error("Can not read new connection ID frame reset token."); + set_detailed_error("Cannot read new connection ID frame reset token."); return false; } return true; @@ -6238,7 +6238,7 @@ bool QuicFramer::ProcessNewConnectionIdFrame(QuicDataReader* reader, bool QuicFramer::AppendRetireConnectionIdFrame( const QuicRetireConnectionIdFrame& frame, QuicDataWriter* writer) { if (!writer->WriteVarInt62(frame.sequence_number)) { - set_detailed_error("Can not write Retire Connection ID sequence number"); + set_detailed_error("Cannot write Retire Connection ID sequence number"); return false; } return true; diff --git a/quiche/quic/core/quic_framer.h b/quiche/quic/core/quic_framer.h index c173925a9..ea233475f 100644 --- a/quiche/quic/core/quic_framer.h +++ b/quiche/quic/core/quic_framer.h @@ -357,7 +357,7 @@ class QUICHE_EXPORT QuicFramer { // Size in bytes of all reset stream frame fields. static size_t GetRstStreamFrameSize(QuicTransportVersion version, const QuicRstStreamFrame& frame); - // Size in bytes of all ack frenquency frame fields. + // Size in bytes of all ack frequency frame fields. static size_t GetAckFrequencyFrameSize(const QuicAckFrequencyFrame& frame); // Size in bytes of all connection close frame fields, including the error // details. @@ -401,8 +401,8 @@ class QUICHE_EXPORT QuicFramer { // Size in bytes required for a serialized stop sending frame. static size_t GetStopSendingFrameSize(const QuicStopSendingFrame& frame); - // Size in bytes required for a serialized retransmittable control |frame|. - static size_t GetRetransmittableControlFrameSize(QuicTransportVersion version, + // Size in bytes required for a serialized retransmissible control |frame|. + static size_t GetRetransmissibleControlFrameSize(QuicTransportVersion version, const QuicFrame& frame); // Returns the number of bytes added to the packet for the specified frame, @@ -429,7 +429,7 @@ class QUICHE_EXPORT QuicFramer { // stores the result in the other parameters. // |expected_destination_connection_id_length| is only used for short headers. // When server connection IDs are generated by a - // ConnectionIdGeneartor interface, and callers need an accurate + // ConnectionIdGenerator interface, and callers need an accurate // Destination Connection ID for short header packets, call // ParsePublicHeaderDispatcherShortHeaderLengthUnknown() instead. static QuicErrorCode ParsePublicHeader( @@ -700,7 +700,7 @@ class QUICHE_EXPORT QuicFramer { // |*source_connection_id_length_out| must be at least 18. // |*source_connection_id_length_out| will contain the length of the received // source connection ID, which on success will match the contents of the - // destination connection ID passed in to + // destination connection ID passed into // WriteClientVersionNegotiationProbePacket. In the case of a failure, // |detailed_error| will be filled in with an explanation of what failed. static bool ParseServerVersionNegotiationProbeResponse( @@ -778,7 +778,7 @@ class QUICHE_EXPORT QuicFramer { // The packet number, after removing header protection and decoding it, is // written to |full_packet_number|. Finally, the header, with header // protection removed, is written to |associated_data| to be used in packet - // decryption. |packet| is used in computing the asociated data. + // decryption. |packet| is used in computing the associated data. bool RemoveHeaderProtection(QuicDataReader* reader, const QuicEncryptedPacket& packet, QuicPacketHeader* header, diff --git a/quiche/quic/core/quic_framer_test.cc b/quiche/quic/core/quic_framer_test.cc index 9e200ba5e..906edd678 100644 --- a/quiche/quic/core/quic_framer_test.cc +++ b/quiche/quic/core/quic_framer_test.cc @@ -2679,7 +2679,7 @@ TEST_P(QuicFramerTest, AckFrameOneAckBlock) { {kVarInt62OneByte + 0x00}}, // first ack block length - 1. // IETF Quic defines the ack block's value as the "number of - // packets that preceed the largest packet number in the block" + // packets that precede the largest packet number in the block" // which for the 1st ack block is the largest acked field, // above. This means that if we are acking just packet 0x1234 // then the 1st ack block will be 0. @@ -3065,8 +3065,8 @@ TEST_P(QuicFramerTest, AckBlockAcksEverything) { TEST_P(QuicFramerTest, AckFrameFirstAckBlockLengthZero) { if (VersionHasIetfQuicFrames(framer_.transport_version())) { // Not applicable to version 99 -- first ack block contains the - // number of packets that preceed the largest_acked packet. - // A value of 0 means no packets preceed --- that the block's + // number of packets that precede the largest_acked packet. + // A value of 0 means no packets precede --- that the block's // length is 1. Therefore the condition that this test checks can // not arise. return; @@ -3320,7 +3320,7 @@ TEST_P(QuicFramerTest, AckFrameTwoTimeStampsMultipleAckBlocks) { { kVarInt62TwoBytes + 0x0e, 0xae }}, // 3759 // pre-version-99 test includes an ack block of 0 length. this - // can not happen in version 99. ergo the second block is not + // cannot happen in version 99. ergo the second block is not // present in the v99 test and the gap length of the next block // is the sum of the two gaps in the pre-version-99 tests. // Additional ACK Block #2 @@ -4526,7 +4526,7 @@ TEST_P(QuicFramerTest, MaxDataFrame) { {"", {0x10}}, // byte offset - {"Can not read MAX_DATA byte-offset", + {"Cannot read MAX_DATA byte-offset", {kVarInt62EightBytes + 0x3A, 0x98, 0xFE, 0xDC, 0x32, 0x10, 0x76, 0x54}}, }; @@ -4573,7 +4573,7 @@ TEST_P(QuicFramerTest, MaxStreamDataFrame) { {"Unable to read IETF_MAX_STREAM_DATA frame stream id/count.", {kVarInt62FourBytes + 0x01, 0x02, 0x03, 0x04}}, // byte offset - {"Can not read MAX_STREAM_DATA byte-count", + {"Cannot read MAX_STREAM_DATA byte-count", {kVarInt62EightBytes + 0x3A, 0x98, 0xFE, 0xDC, 0x32, 0x10, 0x76, 0x54}}, }; @@ -4633,7 +4633,7 @@ TEST_P(QuicFramerTest, BlockedFrame) { {"Unable to read IETF_STREAM_DATA_BLOCKED frame stream id/count.", {kVarInt62FourBytes + 0x01, 0x02, 0x03, 0x04}}, // Offset - {"Can not read stream blocked offset.", + {"Cannot read stream blocked offset.", {kVarInt62EightBytes + 0x3a, 0x98, 0xFE, 0xDC, 0x32, 0x10, 0x76, 0x54}}, }; // clang-format on @@ -8076,7 +8076,7 @@ TEST_P(QuicFramerTest, BuildAckFrequencyPacket) { 0x05, // max_ack_delay_us 0x7f, 0xff, - // ignore_oder + // ignore_order 0x00 }; // clang-format on @@ -8990,7 +8990,7 @@ TEST_P(QuicFramerTest, IetfBlockedFrame) { {"", {0x14}}, // blocked offset - {"Can not read blocked offset.", + {"Cannot read blocked offset.", {kVarInt62EightBytes + 0x3a, 0x98, 0xFE, 0xDC, 0x32, 0x10, 0x76, 0x54}}, }; // clang-format on @@ -9075,7 +9075,7 @@ TEST_P(QuicFramerTest, IetfStreamBlockedFrame) { // blocked offset {"Unable to read IETF_STREAM_DATA_BLOCKED frame stream id/count.", {kVarInt62FourBytes + 0x01, 0x02, 0x03, 0x04}}, - {"Can not read stream blocked offset.", + {"Cannot read stream blocked offset.", {kVarInt62EightBytes + 0x3a, 0x98, 0xFE, 0xDC, 0x32, 0x10, 0x76, 0x54}}, }; // clang-format on @@ -9950,7 +9950,7 @@ TEST_P(QuicFramerTest, NewConnectionIdFrame) { {0x08}}, // connection ID length {"Unable to read new connection ID frame connection id.", {0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x11}}, - {"Can not read new connection ID frame reset token.", + {"Cannot read new connection ID frame reset token.", {0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f}} }; @@ -10009,7 +10009,7 @@ TEST_P(QuicFramerTest, NewConnectionIdFrameVariableLength) { {0x09}}, // connection ID length {"Unable to read new connection ID frame connection id.", {0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10, 0x42}}, - {"Can not read new connection ID frame reset token.", + {"Cannot read new connection ID frame reset token.", {0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f}} }; @@ -10077,7 +10077,7 @@ TEST_P(QuicFramerTest, InvalidLongNewConnectionIdFrame) { 0xF0, 0xD2, 0xB4, 0x96, 0x78, 0x5A, 0x3C, 0x1E, 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10, 0xF0, 0xD2, 0xB4, 0x96, 0x78, 0x5A, 0x3C, 0x1E}}, - {"Can not read new connection ID frame reset token.", + {"Cannot read new connection ID frame reset token.", {0xb5, 0x69, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}} }; @@ -10122,7 +10122,7 @@ TEST_P(QuicFramerTest, InvalidRetirePriorToNewConnectionIdFrame) { {0x08}}, // connection ID length {"Unable to read new connection ID frame connection id.", {0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x11}}, - {"Can not read new connection ID frame reset token.", + {"Cannot read new connection ID frame reset token.", {0xb5, 0x69, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}} }; @@ -10400,7 +10400,7 @@ TEST_P(QuicFramerTest, IetfPathChallengeFrame) { {"", {0x1a}}, // data - {"Can not read path challenge data.", + {"Cannot read path challenge data.", {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}}, }; // clang-format on @@ -10483,7 +10483,7 @@ TEST_P(QuicFramerTest, IetfPathResponseFrame) { {"", {0x1b}}, // data - {"Can not read path response data.", + {"Cannot read path response data.", {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}}, }; // clang-format on @@ -10544,11 +10544,11 @@ TEST_P(QuicFramerTest, BuildIetfPathResponsePacket) { ABSL_ARRAYSIZE(packet_ietf)); } -TEST_P(QuicFramerTest, GetRetransmittableControlFrameSize) { +TEST_P(QuicFramerTest, GetRetransmissibleControlFrameSize) { QuicRstStreamFrame rst_stream(1, 3, QUIC_STREAM_CANCELLED, 1024); EXPECT_EQ(QuicFramer::GetRstStreamFrameSize(framer_.transport_version(), rst_stream), - QuicFramer::GetRetransmittableControlFrameSize( + QuicFramer::GetRetransmissibleControlFrameSize( framer_.transport_version(), QuicFrame(&rst_stream))); std::string error_detail(2048, 'e'); @@ -10559,24 +10559,24 @@ TEST_P(QuicFramerTest, GetRetransmittableControlFrameSize) { EXPECT_EQ(QuicFramer::GetConnectionCloseFrameSize(framer_.transport_version(), connection_close), - QuicFramer::GetRetransmittableControlFrameSize( + QuicFramer::GetRetransmissibleControlFrameSize( framer_.transport_version(), QuicFrame(&connection_close))); QuicGoAwayFrame goaway(2, QUIC_PEER_GOING_AWAY, 3, error_detail); EXPECT_EQ(QuicFramer::GetMinGoAwayFrameSize() + 256, - QuicFramer::GetRetransmittableControlFrameSize( + QuicFramer::GetRetransmissibleControlFrameSize( framer_.transport_version(), QuicFrame(&goaway))); QuicWindowUpdateFrame window_update(3, 3, 1024); EXPECT_EQ(QuicFramer::GetWindowUpdateFrameSize(framer_.transport_version(), window_update), - QuicFramer::GetRetransmittableControlFrameSize( + QuicFramer::GetRetransmissibleControlFrameSize( framer_.transport_version(), QuicFrame(window_update))); QuicBlockedFrame blocked(4, 3, 1024); EXPECT_EQ( QuicFramer::GetBlockedFrameSize(framer_.transport_version(), blocked), - QuicFramer::GetRetransmittableControlFrameSize( + QuicFramer::GetRetransmissibleControlFrameSize( framer_.transport_version(), QuicFrame(blocked))); // Following frames are IETF QUIC frames only. @@ -10587,36 +10587,36 @@ TEST_P(QuicFramerTest, GetRetransmittableControlFrameSize) { QuicNewConnectionIdFrame new_connection_id(5, TestConnectionId(), 1, kTestStatelessResetToken, 1); EXPECT_EQ(QuicFramer::GetNewConnectionIdFrameSize(new_connection_id), - QuicFramer::GetRetransmittableControlFrameSize( + QuicFramer::GetRetransmissibleControlFrameSize( framer_.transport_version(), QuicFrame(&new_connection_id))); QuicMaxStreamsFrame max_streams(6, 3, /*unidirectional=*/false); EXPECT_EQ(QuicFramer::GetMaxStreamsFrameSize(framer_.transport_version(), max_streams), - QuicFramer::GetRetransmittableControlFrameSize( + QuicFramer::GetRetransmissibleControlFrameSize( framer_.transport_version(), QuicFrame(max_streams))); QuicStreamsBlockedFrame streams_blocked(7, 3, /*unidirectional=*/false); EXPECT_EQ(QuicFramer::GetStreamsBlockedFrameSize(framer_.transport_version(), streams_blocked), - QuicFramer::GetRetransmittableControlFrameSize( + QuicFramer::GetRetransmissibleControlFrameSize( framer_.transport_version(), QuicFrame(streams_blocked))); QuicPathFrameBuffer buffer = { {0x80, 0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe5, 0xf7}}; QuicPathResponseFrame path_response_frame(8, buffer); EXPECT_EQ(QuicFramer::GetPathResponseFrameSize(path_response_frame), - QuicFramer::GetRetransmittableControlFrameSize( + QuicFramer::GetRetransmissibleControlFrameSize( framer_.transport_version(), QuicFrame(path_response_frame))); QuicPathChallengeFrame path_challenge_frame(9, buffer); EXPECT_EQ(QuicFramer::GetPathChallengeFrameSize(path_challenge_frame), - QuicFramer::GetRetransmittableControlFrameSize( + QuicFramer::GetRetransmissibleControlFrameSize( framer_.transport_version(), QuicFrame(path_challenge_frame))); QuicStopSendingFrame stop_sending_frame(10, 3, QUIC_STREAM_CANCELLED); EXPECT_EQ(QuicFramer::GetStopSendingFrameSize(stop_sending_frame), - QuicFramer::GetRetransmittableControlFrameSize( + QuicFramer::GetRetransmissibleControlFrameSize( framer_.transport_version(), QuicFrame(stop_sending_frame))); } diff --git a/quiche/quic/core/quic_generic_session.cc b/quiche/quic/core/quic_generic_session.cc index 2b767cac8..456f6d9d9 100644 --- a/quiche/quic/core/quic_generic_session.cc +++ b/quiche/quic/core/quic_generic_session.cc @@ -93,7 +93,7 @@ QuicGenericSessionBase::~QuicGenericSessionBase() { } QuicStream* QuicGenericSessionBase::CreateIncomingStream(QuicStreamId id) { - QUIC_DVLOG(1) << "Creating incoming QuicGenricStream " << id; + QUIC_DVLOG(1) << "Creating incoming QuicGenericStream " << id; QuicGenericStream* stream = CreateStream(id); if (stream->type() == BIDIRECTIONAL) { incoming_bidirectional_streams_.push_back(id); diff --git a/quiche/quic/core/quic_interval_deque.h b/quiche/quic/core/quic_interval_deque.h index c4bd49c31..8cb303229 100644 --- a/quiche/quic/core/quic_interval_deque.h +++ b/quiche/quic/core/quic_interval_deque.h @@ -68,7 +68,7 @@ class QuicIntervalDequePeer; // QuicInterval interval(); // }; // typedef IntervalVal IV; -// QuicIntervialDeque deque; +// QuicIntervalDeque deque; // // // State: // // cached_index -> None diff --git a/quiche/quic/core/quic_interval_deque_test.cc b/quiche/quic/core/quic_interval_deque_test.cc index 318059f28..a83ca6920 100644 --- a/quiche/quic/core/quic_interval_deque_test.cc +++ b/quiche/quic/core/quic_interval_deque_test.cc @@ -98,9 +98,9 @@ TEST_F(QuicIntervalDequeTest, InsertIterateWhole) { auto end = qid_.DataEnd(); for (int32_t i = 0; i < kSize; ++i, ++it) { EXPECT_EQ(it->val, i); - const std::size_t current_iteraval_begin = i * kIntervalStep; + const std::size_t current_interval_begin = i * kIntervalStep; // The |DataAt| method should find the correct interval. - auto lookup = qid_.DataAt(current_iteraval_begin); + auto lookup = qid_.DataAt(current_interval_begin); EXPECT_EQ(i, lookup->val); // Make sure the index hasn't changed just from using |DataAt| const int32_t index_before = QuicIntervalDequePeer::GetCachedIndex(&qid_); @@ -128,12 +128,12 @@ TEST_F(QuicIntervalDequeTest, OffByOne) { for (int32_t i = 0; i < kSize - 1; ++i, ++it) { EXPECT_EQ(it->val, i); const int32_t off_by_one_i = i + 1; - const std::size_t current_iteraval_begin = off_by_one_i * kIntervalStep; + const std::size_t current_interval_begin = off_by_one_i * kIntervalStep; // Make sure the index has changed just from using |DataAt| const int32_t index_before = QuicIntervalDequePeer::GetCachedIndex(&qid_); EXPECT_EQ(index_before, i); // The |DataAt| method should find the correct interval. - auto lookup = qid_.DataAt(current_iteraval_begin); + auto lookup = qid_.DataAt(current_interval_begin); EXPECT_EQ(off_by_one_i, lookup->val); // Check that the index has changed. const int32_t index_after = QuicIntervalDequePeer::GetCachedIndex(&qid_); @@ -150,12 +150,12 @@ TEST_F(QuicIntervalDequeTest, IteratorInvalidation) { const int32_t cached_index = QuicIntervalDequePeer::GetCachedIndex(&qid_); EXPECT_EQ(cached_index, 0); - const std::size_t iteraval_begin = (kSize - 1) * kIntervalStep; - auto lookup = qid_.DataAt(iteraval_begin); + const std::size_t interval_begin = (kSize - 1) * kIntervalStep; + auto lookup = qid_.DataAt(interval_begin); EXPECT_EQ((*lookup).val, (kSize - 1)); qid_.PopFront(); EXPECT_QUIC_BUG(lookup++, "Iterator out of bounds."); - auto lookup_end = qid_.DataAt(iteraval_begin + kIntervalStep); + auto lookup_end = qid_.DataAt(interval_begin + kIntervalStep); EXPECT_EQ(lookup_end, qid_.DataEnd()); } @@ -172,9 +172,9 @@ TEST_F(QuicIntervalDequeTest, InsertIterateSkip) { const int32_t before_i = (i - (step - 1)); EXPECT_EQ(QuicIntervalDequePeer::GetCachedIndex(&qid_), before_i); } - const std::size_t current_iteraval_begin = i * kIntervalStep; + const std::size_t current_interval_begin = i * kIntervalStep; // The |DataAt| method should find the correct interval. - auto lookup = qid_.DataAt(current_iteraval_begin); + auto lookup = qid_.DataAt(current_interval_begin); EXPECT_EQ(i, lookup->val); // Make sure the index _has_ changed just from using |DataAt| since we're // skipping data. @@ -203,8 +203,8 @@ TEST_F(QuicIntervalDequeTest, InsertDeleteIterate) { EXPECT_EQ(it->val, i); // Get an iterator. - const std::size_t current_iteraval_begin = i * kIntervalStep; - auto lookup = qid_.DataAt(current_iteraval_begin); + const std::size_t current_interval_begin = i * kIntervalStep; + auto lookup = qid_.DataAt(current_interval_begin); const int32_t index_before = QuicIntervalDequePeer::GetCachedIndex(&qid_); // The index should always point to 0. EXPECT_EQ(index_before, 0); @@ -231,8 +231,8 @@ TEST_F(QuicIntervalDequeTest, InsertIterateInsert) { int32_t iterated_elements = 0; for (int32_t i = 0; i < kSize; ++i, ++iterated_elements) { // Get an iterator. - const std::size_t current_iteraval_begin = i * kIntervalStep; - auto lookup = qid_.DataAt(current_iteraval_begin); + const std::size_t current_interval_begin = i * kIntervalStep; + auto lookup = qid_.DataAt(current_interval_begin); const int32_t index_before = QuicIntervalDequePeer::GetCachedIndex(&qid_); // The index should always point to i. EXPECT_EQ(index_before, i); @@ -294,9 +294,9 @@ TEST_F(QuicIntervalDequeTest, RescanData) { auto end = qid_.DataEnd(); for (int32_t i = 0; i < kSize - 1; ++i, ++it) { EXPECT_EQ(it->val, i); - const std::size_t current_iteraval_begin = i * kIntervalStep; + const std::size_t current_interval_begin = i * kIntervalStep; // The |DataAt| method should find the correct interval. - auto lookup = qid_.DataAt(current_iteraval_begin); + auto lookup = qid_.DataAt(current_interval_begin); EXPECT_EQ(i, lookup->val); // Make sure the index has changed just from using |DataAt| const int32_t cached_index_before = @@ -309,7 +309,7 @@ TEST_F(QuicIntervalDequeTest, RescanData) { EXPECT_EQ(index_before, before_i); // This increment should move the cached index forward. lookup++; - // Check that the cached index has moved foward. + // Check that the cached index has moved forward. const int32_t cached_index_after = QuicIntervalDequePeer::GetCachedIndex(&qid_); const int32_t after_i = (i + 1); @@ -320,14 +320,14 @@ TEST_F(QuicIntervalDequeTest, RescanData) { // Iterate over items which have been consumed before. int32_t expected_index = static_cast(kSize - 1); for (int32_t i = 0; i < kSize - 1; ++i) { - const std::size_t current_iteraval_begin = i * kIntervalStep; + const std::size_t current_interval_begin = i * kIntervalStep; // The |DataAt| method should find the correct interval. - auto lookup = qid_.DataAt(current_iteraval_begin); + auto lookup = qid_.DataAt(current_interval_begin); EXPECT_EQ(i, lookup->val); // This increment shouldn't move the index forward as the index is currently // ahead. lookup++; - // Check that the index hasn't moved foward. + // Check that the index hasn't moved forward. const int32_t index_after = QuicIntervalDequePeer::GetCachedIndex(&qid_); EXPECT_EQ(index_after, expected_index); EXPECT_NE(it, end); diff --git a/quiche/quic/core/quic_interval_set.h b/quiche/quic/core/quic_interval_set.h index 055308f50..8720f0a29 100644 --- a/quiche/quic/core/quic_interval_set.h +++ b/quiche/quic/core/quic_interval_set.h @@ -136,7 +136,7 @@ class QUICHE_NO_EXPORT QuicIntervalSet { const_reverse_iterator last_interval = intervals_.rbegin(); // If interval.min() is outside of [last_interval->min, last_interval->max], - // we can not simply extend last_interval->max. + // we cannot simply extend last_interval->max. if (interval.min() < last_interval->min() || interval.min() > last_interval->max()) { Add(interval); @@ -402,7 +402,7 @@ class QUICHE_NO_EXPORT QuicIntervalSet { const_iterator FindIntersectionCandidate(const QuicIntervalSet& other) const; // Finds the first interval that potentially intersects 'interval'. More - // precisely, return an interator it pointing at the last interval J such that + // precisely, return an iterator it pointing at the last interval J such that // interval <= J. If all the intervals are > J then return begin(). const_iterator FindIntersectionCandidate(const value_type& interval) const; diff --git a/quiche/quic/core/quic_mtu_discovery.h b/quiche/quic/core/quic_mtu_discovery.h index 68fbc6daf..c6435483c 100644 --- a/quiche/quic/core/quic_mtu_discovery.h +++ b/quiche/quic/core/quic_mtu_discovery.h @@ -45,7 +45,7 @@ static_assert(kMtuDiscoveryTargetPacketSizeHigh > kDefaultMaxPacketSize, // questions: // 1) Probe scheduling: Whether a connection should send a MTU probe packet // right now. -// 2) MTU search stradegy: When it is time to send, what should be the size of +// 2) MTU search strategy: When it is time to send, what should be the size of // the probing packet. // Note the discoverer does not actually send or process probing packets. // diff --git a/quiche/quic/core/quic_packet_creator.cc b/quiche/quic/core/quic_packet_creator.cc index 388fed721..cdb73c8af 100644 --- a/quiche/quic/core/quic_packet_creator.cc +++ b/quiche/quic/core/quic_packet_creator.cc @@ -62,7 +62,7 @@ QuicLongHeaderType EncryptionlevelToLongHeaderType(EncryptionLevel level) { void LogCoalesceStreamFrameStatus(bool success) { QUIC_HISTOGRAM_BOOL("QuicSession.CoalesceStreamFrameStatus", success, - "Success rate of coalesing stream frames attempt."); + "Success rate of coalescing stream frames attempt."); } // ScopedPacketContextSwitcher saves |packet|'s states and change states @@ -140,7 +140,7 @@ QuicPacketCreator::QuicPacketCreator(QuicConnectionId server_connection_id, } QuicPacketCreator::~QuicPacketCreator() { - DeleteFrames(&packet_.retransmittable_frames); + DeleteFrames(&packet_.retransmissible_frames); } void QuicPacketCreator::SetEncrypter(EncryptionLevel level, @@ -489,8 +489,8 @@ void QuicPacketCreator::ClearPacket() { QUIC_BUG_IF(quic_bug_12398_6, packet_.release_encrypted_buffer != nullptr) << ENDPOINT << "packet_.release_encrypted_buffer should be empty"; packet_.release_encrypted_buffer = nullptr; - QUICHE_DCHECK(packet_.retransmittable_frames.empty()) << ENDPOINT; - QUICHE_DCHECK(packet_.nonretransmittable_frames.empty()) << ENDPOINT; + QUICHE_DCHECK(packet_.retransmissible_frames.empty()) << ENDPOINT; + QUICHE_DCHECK(packet_.nonretransmissible_frames.empty()) << ENDPOINT; packet_.largest_acked.Clear(); needs_full_padding_ = false; packet_.bytes_not_retransmitted.reset(); @@ -501,8 +501,8 @@ size_t QuicPacketCreator::ReserializeInitialPacketInCoalescedPacket( const SerializedPacket& packet, size_t padding_size, char* buffer, size_t buffer_len) { QUIC_BUG_IF(quic_bug_12398_7, packet.encryption_level != ENCRYPTION_INITIAL); - QUIC_BUG_IF(quic_bug_12398_8, packet.nonretransmittable_frames.empty() && - packet.retransmittable_frames.empty()) + QUIC_BUG_IF(quic_bug_12398_8, packet.nonretransmissible_frames.empty() && + packet.retransmissible_frames.empty()) << ENDPOINT << "Attempt to serialize empty ENCRYPTION_INITIAL packet in coalesced " "packet"; @@ -517,14 +517,14 @@ size_t QuicPacketCreator::ReserializeInitialPacketInCoalescedPacket( packet.packet_number - 1, // -1 because serialize packet increase packet number. packet.packet_number_length, packet.encryption_level, &packet_); - for (const QuicFrame& frame : packet.nonretransmittable_frames) { + for (const QuicFrame& frame : packet.nonretransmissible_frames) { if (!AddFrame(frame, packet.transmission_type)) { QUIC_BUG(quic_bug_10752_6) << ENDPOINT << "Failed to serialize frame: " << frame; return 0; } } - for (const QuicFrame& frame : packet.retransmittable_frames) { + for (const QuicFrame& frame : packet.retransmissible_frames) { if (!AddFrame(frame, packet.transmission_type)) { QUIC_BUG(quic_bug_10752_7) << ENDPOINT << "Failed to serialize frame: " << frame; @@ -560,8 +560,8 @@ size_t QuicPacketCreator::ReserializeInitialPacketInCoalescedPacket( const size_t encrypted_length = packet_.encrypted_length; // Clear frames in packet_. No need to DeleteFrames since frames are owned by // initial_packet. - packet_.retransmittable_frames.clear(); - packet_.nonretransmittable_frames.clear(); + packet_.retransmissible_frames.clear(); + packet_.nonretransmissible_frames.clear(); ClearPacket(); return encrypted_length; } @@ -672,7 +672,7 @@ void QuicPacketCreator::CreateAndSerializeStreamFrame( << header.packet_number; return; } - // TODO(ianswett): Optimize the storage so RetransmitableFrames can be + // TODO(ianswett): Optimize the storage so RetransmissibleFrames can be // unioned with a QuicStreamFrame and a UniqueStreamBuffer. *num_bytes_consumed = bytes_consumed; packet_size_ = 0; @@ -682,7 +682,7 @@ void QuicPacketCreator::CreateAndSerializeStreamFrame( packet_buffer.buffer = nullptr; packet_.release_encrypted_buffer = std::move(packet_buffer).release_buffer; - packet_.retransmittable_frames.push_back(QuicFrame(frame)); + packet_.retransmissible_frames.push_back(QuicFrame(frame)); OnSerializedPacket(); } @@ -694,12 +694,12 @@ std::string QuicPacketCreator::GetPendingFramesInfo() const { return QuicFramesToString(queued_frames_); } -bool QuicPacketCreator::HasPendingRetransmittableFrames() const { - return !packet_.retransmittable_frames.empty(); +bool QuicPacketCreator::HasPendingRetransmissibleFrames() const { + return !packet_.retransmissible_frames.empty(); } bool QuicPacketCreator::HasPendingStreamFramesOfStream(QuicStreamId id) const { - for (const auto& frame : packet_.retransmittable_frames) { + for (const auto& frame : packet_.retransmissible_frames) { if (frame.type == STREAM_FRAME && frame.stream_frame.stream_id == id) { return true; } @@ -1116,7 +1116,7 @@ size_t QuicPacketCreator::SerializeCoalescedPacket( padding_size = coalesced.max_packet_length() - coalesced.length(); if (framer_->perspective() == Perspective::IS_SERVER && QuicUtils::ContainsFrameType( - coalesced.initial_packet()->retransmittable_frames, + coalesced.initial_packet()->retransmissible_frames, CONNECTION_CLOSE_FRAME)) { // Do not pad server initial connection close packet. padding_size = 0; @@ -1140,12 +1140,12 @@ size_t QuicPacketCreator::SerializeCoalescedPacket( << ", coalesced.length: " << coalesced.length() << ", padding_size: " << padding_size << ", serialized_length: " << initial_length - << ", retransmittable frames: " + << ", retransmissible frames: " << QuicFramesToString( - coalesced.initial_packet()->retransmittable_frames) - << ", nonretransmittable frames: " + coalesced.initial_packet()->retransmissible_frames) + << ", nonretransmissible frames: " << QuicFramesToString( - coalesced.initial_packet()->nonretransmittable_frames); + coalesced.initial_packet()->nonretransmissible_frames); buffer += initial_length; buffer_len -= initial_length; packet_length += initial_length; @@ -1273,14 +1273,14 @@ void QuicPacketCreator::SetRetryToken(absl::string_view retry_token) { retry_token_ = std::string(retry_token); } -bool QuicPacketCreator::ConsumeRetransmittableControlFrame( +bool QuicPacketCreator::ConsumeRetransmissibleControlFrame( const QuicFrame& frame) { QUIC_BUG_IF(quic_bug_12398_16, IsControlFrame(frame.type) && !GetControlFrameId(frame) && frame.type != PING_FRAME) << ENDPOINT << "Adding a control frame with no control frame id: " << frame; - QUICHE_DCHECK(QuicUtils::IsRetransmittableFrame(frame.type)) + QUICHE_DCHECK(QuicUtils::IsRetransmissibleFrame(frame.type)) << ENDPOINT << frame; MaybeBundleOpportunistically(); if (HasPendingFrames()) { @@ -1291,7 +1291,7 @@ bool QuicPacketCreator::ConsumeRetransmittableControlFrame( } QUICHE_DCHECK(!HasPendingFrames()) << ENDPOINT; if (frame.type != PING_FRAME && frame.type != CONNECTION_CLOSE_FRAME && - !delegate_->ShouldGeneratePacket(HAS_RETRANSMITTABLE_DATA, + !delegate_->ShouldGeneratePacket(HAS_RETRANSMISSIBLE_DATA, NOT_HANDSHAKE)) { // Do not check congestion window for ping or connection close frames. return false; @@ -1317,8 +1317,8 @@ QuicConsumedData QuicPacketCreator::ConsumeData(QuicStreamId id, QUIC_BUG_IF(quic_bug_12398_17, has_handshake && fin) << ENDPOINT << "Handshake packets should never send a fin"; // To make reasoning about crypto frames easier, we don't combine them with - // other retransmittable frames in a single packet. - if (has_handshake && HasPendingRetransmittableFrames()) { + // other retransmissible frames in a single packet. + if (has_handshake && HasPendingRetransmissibleFrames()) { FlushCurrentPacket(); } @@ -1343,7 +1343,7 @@ QuicConsumedData QuicPacketCreator::ConsumeData(QuicStreamId id, while (!run_fast_path && (has_handshake || delegate_->ShouldGeneratePacket( - HAS_RETRANSMITTABLE_DATA, NOT_HANDSHAKE))) { + HAS_RETRANSMISSIBLE_DATA, NOT_HANDSHAKE))) { QuicFrame frame; bool needs_full_padding = has_handshake && fully_pad_crypto_handshake_packets_; @@ -1389,7 +1389,7 @@ QuicConsumedData QuicPacketCreator::ConsumeData(QuicStreamId id, total_bytes_consumed); } - // Don't allow the handshake to be bundled with other retransmittable frames. + // Don't allow the handshake to be bundled with other retransmissible frames. if (has_handshake) { FlushCurrentPacket(); } @@ -1408,7 +1408,7 @@ QuicConsumedData QuicPacketCreator::ConsumeDataFastPath( } while (total_bytes_consumed < write_length && - delegate_->ShouldGeneratePacket(HAS_RETRANSMITTABLE_DATA, + delegate_->ShouldGeneratePacket(HAS_RETRANSMISSIBLE_DATA, NOT_HANDSHAKE)) { // Serialize and encrypt the packet. size_t bytes_consumed = 0; @@ -1441,11 +1441,11 @@ size_t QuicPacketCreator::ConsumeCryptoData(EncryptionLevel level, "generator tries to write crypto data."; MaybeBundleOpportunistically(); // To make reasoning about crypto frames easier, we don't combine them with - // other retransmittable frames in a single packet. + // other retransmissible frames in a single packet. // TODO(nharper): Once we have separate packet number spaces, everything // should be driven by encryption level, and we should stop flushing in this // spot. - if (HasPendingRetransmittableFrames()) { + if (HasPendingRetransmissibleFrames()) { FlushCurrentPacket(); } @@ -1453,13 +1453,13 @@ size_t QuicPacketCreator::ConsumeCryptoData(EncryptionLevel level, while ( total_bytes_consumed < write_length && - delegate_->ShouldGeneratePacket(HAS_RETRANSMITTABLE_DATA, IS_HANDSHAKE)) { + delegate_->ShouldGeneratePacket(HAS_RETRANSMISSIBLE_DATA, IS_HANDSHAKE)) { QuicFrame frame; if (!ConsumeCryptoDataToFillCurrentPacket( level, write_length - total_bytes_consumed, offset + total_bytes_consumed, fully_pad_crypto_handshake_packets_, next_transmission_type_, &frame)) { - // The only pending data in the packet is non-retransmittable frames. + // The only pending data in the packet is non-retransmissible frames. // I'm assuming here that they won't occupy so much of the packet that a // CRYPTO frame won't fit. QUIC_BUG_IF(quic_bug_10752_26, !HasSoftMaxPacketLength()) << absl::StrCat( @@ -1475,7 +1475,7 @@ size_t QuicPacketCreator::ConsumeCryptoData(EncryptionLevel level, FlushCurrentPacket(); } - // Don't allow the handshake to be bundled with other retransmittable frames. + // Don't allow the handshake to be bundled with other retransmissible frames. FlushCurrentPacket(); return total_bytes_consumed; @@ -1521,7 +1521,7 @@ void QuicPacketCreator::MaybeBundleOpportunistically() { // Ack already queued, nothing to do. return; } - if (!delegate_->ShouldGeneratePacket(NO_RETRANSMITTABLE_DATA, + if (!delegate_->ShouldGeneratePacket(NO_RETRANSMISSIBLE_DATA, NOT_HANDSHAKE)) { return; } @@ -1553,7 +1553,7 @@ bool QuicPacketCreator::FlushAckFrame(const QuicFrames& frames) { QUICHE_DCHECK(!HasPendingFrames()) << ENDPOINT; // There is no pending frames, consult the delegate whether a packet can be // generated. - if (!delegate_->ShouldGeneratePacket(NO_RETRANSMITTABLE_DATA, + if (!delegate_->ShouldGeneratePacket(NO_RETRANSMISSIBLE_DATA, NOT_HANDSHAKE)) { return false; } @@ -1596,7 +1596,7 @@ void QuicPacketCreator::Flush() { void QuicPacketCreator::SendRemainingPendingPadding() { while ( pending_padding_bytes() > 0 && !HasPendingFrames() && - delegate_->ShouldGeneratePacket(NO_RETRANSMITTABLE_DATA, NOT_HANDSHAKE)) { + delegate_->ShouldGeneratePacket(NO_RETRANSMISSIBLE_DATA, NOT_HANDSHAKE)) { FlushCurrentPacket(); } } @@ -1780,8 +1780,8 @@ bool QuicPacketCreator::AddFrame(const QuicFrame& frame, packet_size_ += ExpansionOnNewFrame() + frame_len; - if (QuicUtils::IsRetransmittableFrame(frame.type)) { - packet_.retransmittable_frames.push_back(frame); + if (QuicUtils::IsRetransmissibleFrame(frame.type)) { + packet_.retransmissible_frames.push_back(frame); queued_frames_.push_back(frame); if (QuicUtils::IsHandshakeFrame(frame, framer_->transport_version())) { packet_.has_crypto_handshake = IS_HANDSHAKE; @@ -1791,10 +1791,10 @@ bool QuicPacketCreator::AddFrame(const QuicFrame& frame, frame.padding_frame.num_padding_bytes == -1) { // Populate the actual length of full padding frame, such that one can // know how much padding is actually added. - packet_.nonretransmittable_frames.push_back( + packet_.nonretransmissible_frames.push_back( QuicFrame(QuicPaddingFrame(frame_len))); } else { - packet_.nonretransmittable_frames.push_back(frame); + packet_.nonretransmissible_frames.push_back(frame); } queued_frames_.push_back(frame); } @@ -1819,9 +1819,9 @@ bool QuicPacketCreator::AddFrame(const QuicFrame& frame, if (transmission_type == NOT_RETRANSMISSION) { packet_.bytes_not_retransmitted.emplace( packet_.bytes_not_retransmitted.value_or(0) + frame_len); - } else if (QuicUtils::IsRetransmittableFrame(frame.type)) { - // Packet transmission type is determined by the last added retransmittable - // frame of a retransmission type. If a packet has no retransmittable + } else if (QuicUtils::IsRetransmissibleFrame(frame.type)) { + // Packet transmission type is determined by the last added retransmissible + // frame of a retransmission type. If a packet has no retransmissible // retransmission frames, it has type NOT_RETRANSMISSION. packet_.transmission_type = transmission_type; } @@ -1858,18 +1858,18 @@ bool QuicPacketCreator::MaybeCoalesceStreamFrame(const QuicStreamFrame& frame) { candidate->data_length += frame.data_length; candidate->fin = frame.fin; - // The back of retransmittable frames must be the same as the original + // The back of retransmissible frames must be the same as the original // queued frames' back. - QUICHE_DCHECK_EQ(packet_.retransmittable_frames.back().type, STREAM_FRAME) + QUICHE_DCHECK_EQ(packet_.retransmissible_frames.back().type, STREAM_FRAME) << ENDPOINT; - QuicStreamFrame* retransmittable = - &packet_.retransmittable_frames.back().stream_frame; - QUICHE_DCHECK_EQ(retransmittable->stream_id, frame.stream_id) << ENDPOINT; - QUICHE_DCHECK_EQ(retransmittable->offset + retransmittable->data_length, + QuicStreamFrame* retransmissible = + &packet_.retransmissible_frames.back().stream_frame; + QUICHE_DCHECK_EQ(retransmissible->stream_id, frame.stream_id) << ENDPOINT; + QUICHE_DCHECK_EQ(retransmissible->offset + retransmissible->data_length, frame.offset) << ENDPOINT; - retransmittable->data_length = candidate->data_length; - retransmittable->fin = candidate->fin; + retransmissible->data_length = candidate->data_length; + retransmissible->fin = candidate->fin; packet_size_ += frame.data_length; if (debug_delegate_ != nullptr) { debug_delegate_->OnStreamFrameCoalesced(*candidate); @@ -1938,7 +1938,7 @@ void QuicPacketCreator::MaybeAddPadding() { QuicFrame frame{QuicPaddingFrame(padding_bytes)}; queued_frames_.insert(queued_frames_.begin(), frame); packet_size_ += padding_bytes; - packet_.nonretransmittable_frames.push_back(frame); + packet_.nonretransmissible_frames.push_back(frame); if (packet_.transmission_type == NOT_RETRANSMISSION) { packet_.bytes_not_retransmitted.emplace( packet_.bytes_not_retransmitted.value_or(0) + padding_bytes); @@ -2247,7 +2247,7 @@ bool QuicPacketCreator::AddPaddedFrameWithRetry(const QuicFrame& frame) { } // Frame was not queued but queued frames were flushed. QUICHE_DCHECK(!HasPendingFrames()) << ENDPOINT; - if (!delegate_->ShouldGeneratePacket(NO_RETRANSMITTABLE_DATA, + if (!delegate_->ShouldGeneratePacket(NO_RETRANSMISSIBLE_DATA, NOT_HANDSHAKE)) { return false; } diff --git a/quiche/quic/core/quic_packet_creator.h b/quiche/quic/core/quic_packet_creator.h index fcabc9abb..dca3d7d64 100644 --- a/quiche/quic/core/quic_packet_creator.h +++ b/quiche/quic/core/quic_packet_creator.h @@ -58,7 +58,7 @@ class QUICHE_EXPORT QuicPacketCreator { const std::string& error_details) = 0; // Consults delegate whether a packet should be generated. - virtual bool ShouldGeneratePacket(HasRetransmittableData retransmittable, + virtual bool ShouldGeneratePacket(HasRetransmissibleData retransmissible, IsHandshake handshake) = 0; // Called when there is data to be sent. Gives delegate a chance to bundle // anything with to-be-sent data. @@ -191,8 +191,8 @@ class QUICHE_EXPORT QuicPacketCreator { // Returns the information of pending frames as a string. std::string GetPendingFramesInfo() const; - // Returns true if there are retransmittable frames pending to be serialized. - bool HasPendingRetransmittableFrames() const; + // Returns true if there are retransmissible frames pending to be serialized. + bool HasPendingRetransmissibleFrames() const; // Returns true if there are stream frames for |id| pending to be serialized. bool HasPendingStreamFramesOfStream(QuicStreamId id) const; @@ -256,7 +256,7 @@ class QUICHE_EXPORT QuicPacketCreator { bool AddPathResponseFrame(const QuicPathFrameBuffer& data_buffer); // Add PATH_CHALLENGE to current packet, flush before or afterwards if needed. - // This is a best effort adding. It may fail becasue of delegate state, but + // This is a best effort adding. It may fail because of delegate state, but // it's okay because of path validation retry mechanism. void AddPathChallengeFrame(const QuicPathFrameBuffer& payload); @@ -336,9 +336,9 @@ class QUICHE_EXPORT QuicPacketCreator { // Sets the retry token to be sent over the wire in IETF Initial packets. void SetRetryToken(absl::string_view retry_token); - // Consumes retransmittable control |frame|. Returns true if the frame is + // Consumes retransmissible control |frame|. Returns true if the frame is // successfully consumed. Returns false otherwise. - bool ConsumeRetransmittableControlFrame(const QuicFrame& frame); + bool ConsumeRetransmissibleControlFrame(const QuicFrame& frame); // Given some data, may consume part or all of it and pass it to the // packet creator to be serialized into packets. If not in batch @@ -447,7 +447,7 @@ class QUICHE_EXPORT QuicPacketCreator { // Serialize a probing response packet that uses IETF QUIC's PATH RESPONSE // frame. Also fills the packet with padding if |is_padded| is - // true. |payloads| is always emptied, even if the packet can not be + // true. |payloads| is always emptied, even if the packet cannot be // successfully built. size_t BuildPathResponsePacket( const QuicPacketHeader& header, char* buffer, size_t packet_length, @@ -518,7 +518,7 @@ class QUICHE_EXPORT QuicPacketCreator { void MaybeAddPadding(); // Serializes all frames which have been added and adds any which should be - // retransmitted to packet_.retransmittable_frames. All frames must fit into + // retransmitted to packet_.retransmissible_frames. All frames must fit into // a single packet. Returns true on success, otherwise, returns false. // Fails if |encrypted_buffer| is not large enough for the encrypted packet. // @@ -528,14 +528,14 @@ class QUICHE_EXPORT QuicPacketCreator { QuicOwnedPacketBuffer encrypted_buffer, size_t encrypted_buffer_len, bool allow_padding); - // Called after a new SerialiedPacket is created to call the delegate's + // Called after a new SerializedPacket is created to call the delegate's // OnSerializedPacket and reset state. void OnSerializedPacket(); // Clears all fields of packet_ that should be cleared between serializations. void ClearPacket(); - // Re-serialzes frames of ENCRYPTION_INITIAL packet in coalesced packet with + // Reserializes frames of ENCRYPTION_INITIAL packet in coalesced packet with // the original packet's packet number and packet number length. // |padding_size| indicates the size of necessary padding. Returns 0 if // serialization fails. diff --git a/quiche/quic/core/quic_packet_creator_test.cc b/quiche/quic/core/quic_packet_creator_test.cc index ebaf724e4..50131b3c7 100644 --- a/quiche/quic/core/quic_packet_creator_test.cc +++ b/quiche/quic/core/quic_packet_creator_test.cc @@ -1430,11 +1430,11 @@ TEST_P(QuicPacketCreatorTest, AddFrameAndFlush) { // Ensure the packet is successfully created. ASSERT_TRUE(serialized_packet_->encrypted_buffer); - ASSERT_FALSE(serialized_packet_->retransmittable_frames.empty()); - const QuicFrames& retransmittable = - serialized_packet_->retransmittable_frames; - ASSERT_EQ(1u, retransmittable.size()); - EXPECT_EQ(STREAM_FRAME, retransmittable[0].type); + ASSERT_FALSE(serialized_packet_->retransmissible_frames.empty()); + const QuicFrames& retransmissible = + serialized_packet_->retransmissible_frames; + ASSERT_EQ(1u, retransmissible.size()); + EXPECT_EQ(STREAM_FRAME, retransmissible[0].type); EXPECT_TRUE(serialized_packet_->has_ack); EXPECT_EQ(QuicPacketNumber(10u), serialized_packet_->largest_acked); DeleteSerializedPacket(); @@ -1476,11 +1476,11 @@ TEST_P(QuicPacketCreatorTest, SerializeAndSendStreamFrame) { // Ensure the packet is successfully created. ASSERT_TRUE(serialized_packet_->encrypted_buffer); - ASSERT_FALSE(serialized_packet_->retransmittable_frames.empty()); - const QuicFrames& retransmittable = - serialized_packet_->retransmittable_frames; - ASSERT_EQ(1u, retransmittable.size()); - EXPECT_EQ(STREAM_FRAME, retransmittable[0].type); + ASSERT_FALSE(serialized_packet_->retransmissible_frames.empty()); + const QuicFrames& retransmissible = + serialized_packet_->retransmissible_frames; + ASSERT_EQ(1u, retransmissible.size()); + EXPECT_EQ(STREAM_FRAME, retransmissible[0].type); DeleteSerializedPacket(); EXPECT_FALSE(creator_.HasPendingFrames()); @@ -1507,7 +1507,7 @@ TEST_P(QuicPacketCreatorTest, SerializeStreamFrameWithPadding) { // Check that a packet is created. ASSERT_TRUE(serialized_packet_->encrypted_buffer); - ASSERT_FALSE(serialized_packet_->retransmittable_frames.empty()); + ASSERT_FALSE(serialized_packet_->retransmissible_frames.empty()); ASSERT_EQ(serialized_packet_->packet_number_length, PACKET_1BYTE_PACKET_NUMBER); { @@ -1892,21 +1892,21 @@ TEST_P(QuicPacketCreatorTest, PacketTransmissionType) { QuicAckFrame temp_ack_frame = InitAckFrame(1); QuicFrame ack_frame(&temp_ack_frame); - ASSERT_FALSE(QuicUtils::IsRetransmittableFrame(ack_frame.type)); + ASSERT_FALSE(QuicUtils::IsRetransmissibleFrame(ack_frame.type)); QuicStreamId stream_id = QuicUtils::GetFirstBidirectionalStreamId( client_framer_.transport_version(), Perspective::IS_CLIENT); QuicFrame stream_frame(QuicStreamFrame(stream_id, /*fin=*/false, 0u, absl::string_view())); - ASSERT_TRUE(QuicUtils::IsRetransmittableFrame(stream_frame.type)); + ASSERT_TRUE(QuicUtils::IsRetransmissibleFrame(stream_frame.type)); QuicFrame stream_frame_2(QuicStreamFrame(stream_id, /*fin=*/false, 1u, absl::string_view())); QuicFrame padding_frame{QuicPaddingFrame()}; - ASSERT_FALSE(QuicUtils::IsRetransmittableFrame(padding_frame.type)); + ASSERT_FALSE(QuicUtils::IsRetransmissibleFrame(padding_frame.type)); EXPECT_CALL(delegate_, OnSerializedPacket(_)) .WillOnce(Invoke(this, &QuicPacketCreatorTest::SaveSerializedPacket)); @@ -1924,7 +1924,7 @@ TEST_P(QuicPacketCreatorTest, PacketTransmissionType) { creator_.FlushCurrentPacket(); ASSERT_TRUE(serialized_packet_->encrypted_buffer); - // The last retransmittable frame on packet is a stream frame, the packet's + // The last retransmissible frame on packet is a stream frame, the packet's // transmission type should be the same as the stream frame's. EXPECT_EQ(serialized_packet_->transmission_type, PATH_RETRANSMISSION); DeleteSerializedPacket(); @@ -2195,24 +2195,24 @@ TEST_P(QuicPacketCreatorTest, CoalesceStreamFrames) { ProcessPacket(*serialized_packet_); } -TEST_P(QuicPacketCreatorTest, SaveNonRetransmittableFrames) { +TEST_P(QuicPacketCreatorTest, SaveNonRetransmissibleFrames) { QuicAckFrame ack_frame(InitAckFrame(1)); frames_.push_back(QuicFrame(&ack_frame)); frames_.push_back(QuicFrame(QuicPaddingFrame(-1))); SerializedPacket serialized = SerializeAllFrames(frames_); - ASSERT_EQ(2u, serialized.nonretransmittable_frames.size()); - EXPECT_EQ(ACK_FRAME, serialized.nonretransmittable_frames[0].type); - EXPECT_EQ(PADDING_FRAME, serialized.nonretransmittable_frames[1].type); + ASSERT_EQ(2u, serialized.nonretransmissible_frames.size()); + EXPECT_EQ(ACK_FRAME, serialized.nonretransmissible_frames[0].type); + EXPECT_EQ(PADDING_FRAME, serialized.nonretransmissible_frames[1].type); // Verify full padding frame is translated to a padding frame with actual // bytes of padding. EXPECT_LT( 0, - serialized.nonretransmittable_frames[1].padding_frame.num_padding_bytes); + serialized.nonretransmissible_frames[1].padding_frame.num_padding_bytes); frames_.clear(); // Serialize another packet with the same frames. SerializedPacket packet = QuicPacketCreatorPeer::SerializeAllFrames( - &creator_, serialized.nonretransmittable_frames, buffer_, + &creator_, serialized.nonretransmissible_frames, buffer_, kMaxOutgoingPacketSize); // Verify the packet length of both packets are equal. EXPECT_EQ(serialized.encrypted_length, packet.encrypted_length); @@ -2384,7 +2384,7 @@ TEST_P(QuicPacketCreatorTest, EXPECT_EQ(creator_.max_packet_length(), min_acceptable_packet_size); // Now set the encryption level to handshake which increases the header size. creator_.set_encryption_level(ENCRYPTION_HANDSHAKE); - // Make sure that adding a frame removes the the soft max packet length. + // Make sure that adding a frame removes the soft max packet length. QuicAckFrame ack_frame(InitAckFrame(1)); frames_.push_back(QuicFrame(&ack_frame)); SerializedPacket serialized = SerializeAllFrames(frames_); @@ -2474,7 +2474,7 @@ class MockDelegate : public QuicPacketCreator::DelegateInterface { ~MockDelegate() override {} MOCK_METHOD(bool, ShouldGeneratePacket, - (HasRetransmittableData retransmittable, IsHandshake handshake), + (HasRetransmissibleData retransmissible, IsHandshake handshake), (override)); MOCK_METHOD(const QuicFrames, MaybeBundleOpportunistically, (), (override)); MOCK_METHOD(QuicPacketBuffer, GetPacketBuffer, (), (override)); @@ -2486,22 +2486,22 @@ class MockDelegate : public QuicPacketCreator::DelegateInterface { void SetCanWriteAnything() { EXPECT_CALL(*this, ShouldGeneratePacket(_, _)).WillRepeatedly(Return(true)); - EXPECT_CALL(*this, ShouldGeneratePacket(NO_RETRANSMITTABLE_DATA, _)) + EXPECT_CALL(*this, ShouldGeneratePacket(NO_RETRANSMISSIBLE_DATA, _)) .WillRepeatedly(Return(true)); } void SetCanNotWrite() { EXPECT_CALL(*this, ShouldGeneratePacket(_, _)) .WillRepeatedly(Return(false)); - EXPECT_CALL(*this, ShouldGeneratePacket(NO_RETRANSMITTABLE_DATA, _)) + EXPECT_CALL(*this, ShouldGeneratePacket(NO_RETRANSMISSIBLE_DATA, _)) .WillRepeatedly(Return(false)); } // Use this when only ack frames should be allowed to be written. - void SetCanWriteOnlyNonRetransmittable() { + void SetCanWriteOnlyNonRetransmissible() { EXPECT_CALL(*this, ShouldGeneratePacket(_, _)) .WillRepeatedly(Return(false)); - EXPECT_CALL(*this, ShouldGeneratePacket(NO_RETRANSMITTABLE_DATA, _)) + EXPECT_CALL(*this, ShouldGeneratePacket(NO_RETRANSMISSIBLE_DATA, _)) .WillRepeatedly(Return(true)); } }; @@ -2546,7 +2546,7 @@ class MultiplePacketsTestPacketCreator : public QuicPacketCreator { delegate_(static_cast(delegate)), producer_(producer) {} - bool ConsumeRetransmittableControlFrame(const QuicFrame& frame, + bool ConsumeRetransmissibleControlFrame(const QuicFrame& frame, bool bundle_ack) { QuicFrames frames; if (bundle_ack) { @@ -2559,13 +2559,13 @@ class MultiplePacketsTestPacketCreator : public QuicPacketCreator { return QuicFrames(); })); } else if (!has_ack()) { - if (delegate_->ShouldGeneratePacket(NO_RETRANSMITTABLE_DATA, + if (delegate_->ShouldGeneratePacket(NO_RETRANSMISSIBLE_DATA, NOT_HANDSHAKE)) { EXPECT_CALL(*delegate_, MaybeBundleOpportunistically()) .WillOnce(Return(frames)); } } - return QuicPacketCreator::ConsumeRetransmittableControlFrame(frame); + return QuicPacketCreator::ConsumeRetransmissibleControlFrame(frame); } QuicConsumedData ConsumeDataFastPath(QuicStreamId id, @@ -2589,7 +2589,7 @@ class MultiplePacketsTestPacketCreator : public QuicPacketCreator { if (GetQuicReloadableFlag(quic_flush_ack_in_maybe_bundle)) { EXPECT_CALL(*delegate_, MaybeBundleOpportunistically()).Times(1); } else if (!has_ack() && delegate_->ShouldGeneratePacket( - NO_RETRANSMITTABLE_DATA, NOT_HANDSHAKE)) { + NO_RETRANSMISSIBLE_DATA, NOT_HANDSHAKE)) { EXPECT_CALL(*delegate_, MaybeBundleOpportunistically()).Times(1); } return QuicPacketCreator::ConsumeData(id, data.length(), offset, state); @@ -2597,7 +2597,7 @@ class MultiplePacketsTestPacketCreator : public QuicPacketCreator { MessageStatus AddMessageFrame(QuicMessageId message_id, quiche::QuicheMemSlice message) { - if (!has_ack() && delegate_->ShouldGeneratePacket(NO_RETRANSMITTABLE_DATA, + if (!has_ack() && delegate_->ShouldGeneratePacket(NO_RETRANSMISSIBLE_DATA, NOT_HANDSHAKE)) { EXPECT_CALL(*delegate_, MaybeBundleOpportunistically()).Times(1); } @@ -2611,7 +2611,7 @@ class MultiplePacketsTestPacketCreator : public QuicPacketCreator { if (GetQuicReloadableFlag(quic_flush_ack_in_maybe_bundle)) { EXPECT_CALL(*delegate_, MaybeBundleOpportunistically()).Times(1); } else if (!has_ack() && delegate_->ShouldGeneratePacket( - NO_RETRANSMITTABLE_DATA, NOT_HANDSHAKE)) { + NO_RETRANSMISSIBLE_DATA, NOT_HANDSHAKE)) { EXPECT_CALL(*delegate_, MaybeBundleOpportunistically()).Times(1); } return QuicPacketCreator::ConsumeCryptoData(level, data.length(), offset); @@ -2668,20 +2668,20 @@ class QuicPacketCreatorMultiplePacketsTest : public QuicTest { size_t packet_index) { ASSERT_GT(packets_.size(), packet_index); const SerializedPacket& packet = packets_[packet_index]; - size_t num_retransmittable_frames = + size_t num_retransmissible_frames = contents.num_connection_close_frames + contents.num_goaway_frames + contents.num_rst_stream_frames + contents.num_stream_frames + contents.num_crypto_frames + contents.num_ping_frames; size_t num_frames = contents.num_ack_frames + contents.num_stop_waiting_frames + contents.num_mtu_discovery_frames + contents.num_padding_frames + - num_retransmittable_frames; + num_retransmissible_frames; - if (num_retransmittable_frames == 0) { - ASSERT_TRUE(packet.retransmittable_frames.empty()); + if (num_retransmissible_frames == 0) { + ASSERT_TRUE(packet.retransmissible_frames.empty()); } else { - EXPECT_EQ(num_retransmittable_frames, - packet.retransmittable_frames.size()); + EXPECT_EQ(num_retransmissible_frames, + packet.retransmissible_frames.size()); } ASSERT_TRUE(packet.encrypted_buffer != nullptr); @@ -2718,8 +2718,8 @@ class QuicPacketCreatorMultiplePacketsTest : public QuicTest { void CheckPacketHasSingleStreamFrame(size_t packet_index) { ASSERT_GT(packets_.size(), packet_index); const SerializedPacket& packet = packets_[packet_index]; - ASSERT_FALSE(packet.retransmittable_frames.empty()); - EXPECT_EQ(1u, packet.retransmittable_frames.size()); + ASSERT_FALSE(packet.retransmissible_frames.empty()); + EXPECT_EQ(1u, packet.retransmissible_frames.size()); ASSERT_TRUE(packet.encrypted_buffer != nullptr); ASSERT_TRUE(simple_framer_.ProcessPacket( QuicEncryptedPacket(packet.encrypted_buffer, packet.encrypted_length))); @@ -2753,11 +2753,11 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, AddControlFrame_NotWritable) { QuicRstStreamFrame* rst_frame = CreateRstStreamFrame(); const bool consumed = - creator_.ConsumeRetransmittableControlFrame(QuicFrame(rst_frame), + creator_.ConsumeRetransmissibleControlFrame(QuicFrame(rst_frame), /*bundle_ack=*/false); EXPECT_FALSE(consumed); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); delete rst_frame; } @@ -2779,15 +2779,15 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, } TEST_F(QuicPacketCreatorMultiplePacketsTest, AddControlFrame_OnlyAckWritable) { - delegate_.SetCanWriteOnlyNonRetransmittable(); + delegate_.SetCanWriteOnlyNonRetransmissible(); QuicRstStreamFrame* rst_frame = CreateRstStreamFrame(); const bool consumed = - creator_.ConsumeRetransmittableControlFrame(QuicFrame(rst_frame), + creator_.ConsumeRetransmissibleControlFrame(QuicFrame(rst_frame), /*bundle_ack=*/false); EXPECT_FALSE(consumed); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); delete rst_frame; } @@ -2795,10 +2795,10 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, AddControlFrame_WritableAndShouldNotFlush) { delegate_.SetCanWriteAnything(); - creator_.ConsumeRetransmittableControlFrame(QuicFrame(CreateRstStreamFrame()), + creator_.ConsumeRetransmissibleControlFrame(QuicFrame(CreateRstStreamFrame()), /*bundle_ack=*/false); EXPECT_TRUE(creator_.HasPendingFrames()); - EXPECT_TRUE(creator_.HasPendingRetransmittableFrames()); + EXPECT_TRUE(creator_.HasPendingRetransmissibleFrames()); } TEST_F(QuicPacketCreatorMultiplePacketsTest, @@ -2807,11 +2807,11 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, QuicRstStreamFrame* rst_frame = CreateRstStreamFrame(); const bool consumed = - creator_.ConsumeRetransmittableControlFrame(QuicFrame(rst_frame), + creator_.ConsumeRetransmissibleControlFrame(QuicFrame(rst_frame), /*bundle_ack=*/false); EXPECT_FALSE(consumed); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); delete rst_frame; } @@ -2823,11 +2823,11 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, .WillOnce( Invoke(this, &QuicPacketCreatorMultiplePacketsTest::SavePacket)); - creator_.ConsumeRetransmittableControlFrame(QuicFrame(CreateRstStreamFrame()), + creator_.ConsumeRetransmissibleControlFrame(QuicFrame(CreateRstStreamFrame()), /*bundle_ack=*/false); creator_.Flush(); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); PacketContents contents; contents.num_rst_stream_frames = 1; @@ -2846,7 +2846,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, ConsumeCryptoData) { creator_.Flush(); EXPECT_EQ(data.length(), consumed_bytes); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); PacketContents contents; contents.num_crypto_frames = 1; @@ -2865,7 +2865,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, creator_.Flush(); EXPECT_EQ(0u, consumed_bytes); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); } TEST_F(QuicPacketCreatorMultiplePacketsTest, ConsumeData_NotWritable) { @@ -2878,7 +2878,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, ConsumeData_NotWritable) { EXPECT_EQ(0u, consumed.bytes_consumed); EXPECT_FALSE(consumed.fin_consumed); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); } TEST_F(QuicPacketCreatorMultiplePacketsTest, @@ -2892,7 +2892,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, EXPECT_EQ(3u, consumed.bytes_consumed); EXPECT_TRUE(consumed.fin_consumed); EXPECT_TRUE(creator_.HasPendingFrames()); - EXPECT_TRUE(creator_.HasPendingRetransmittableFrames()); + EXPECT_TRUE(creator_.HasPendingRetransmissibleFrames()); } TEST_F(QuicPacketCreatorMultiplePacketsTest, @@ -2910,7 +2910,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, EXPECT_EQ(3u, consumed.bytes_consumed); EXPECT_TRUE(consumed.fin_consumed); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); PacketContents contents; contents.num_stream_frames = 1; @@ -2940,7 +2940,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, ConsumeData_Handshake) { } EXPECT_EQ(7u, consumed_bytes); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); PacketContents contents; if (QuicVersionUsesCryptoFrames(framer_.transport_version())) { @@ -2981,7 +2981,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, } EXPECT_EQ(3u, bytes_consumed); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); PacketContents contents; if (QuicVersionUsesCryptoFrames(framer_.transport_version())) { @@ -3026,7 +3026,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, EXPECT_EQ(4u, consumed.bytes_consumed); EXPECT_FALSE(consumed.fin_consumed); EXPECT_TRUE(creator_.HasPendingFrames()); - EXPECT_TRUE(creator_.HasPendingRetransmittableFrames()); + EXPECT_TRUE(creator_.HasPendingRetransmissibleFrames()); } TEST_F(QuicPacketCreatorMultiplePacketsTest, ConsumeData_BatchOperations) { @@ -3042,7 +3042,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, ConsumeData_BatchOperations) { EXPECT_EQ(4u, consumed.bytes_consumed); EXPECT_TRUE(consumed.fin_consumed); EXPECT_TRUE(creator_.HasPendingFrames()); - EXPECT_TRUE(creator_.HasPendingRetransmittableFrames()); + EXPECT_TRUE(creator_.HasPendingRetransmissibleFrames()); // Now both frames will be flushed out. EXPECT_CALL(delegate_, OnSerializedPacket(_)) @@ -3050,7 +3050,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, ConsumeData_BatchOperations) { Invoke(this, &QuicPacketCreatorMultiplePacketsTest::SavePacket)); creator_.Flush(); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); PacketContents contents; contents.num_stream_frames = 1; @@ -3100,7 +3100,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, EXPECT_EQ(3u, consumed.bytes_consumed); EXPECT_FALSE(consumed.fin_consumed); EXPECT_TRUE(creator_.HasPendingFrames()); - EXPECT_TRUE(creator_.HasPendingRetransmittableFrames()); + EXPECT_TRUE(creator_.HasPendingRetransmissibleFrames()); // This frame will not fit with the existing frame, causing the queued frame // to be serialized, and it will be added to a new open packet. @@ -3111,11 +3111,11 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, EXPECT_EQ(3u, consumed.bytes_consumed); EXPECT_TRUE(consumed.fin_consumed); EXPECT_TRUE(creator_.HasPendingFrames()); - EXPECT_TRUE(creator_.HasPendingRetransmittableFrames()); + EXPECT_TRUE(creator_.HasPendingRetransmissibleFrames()); creator_.FlushCurrentPacket(); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); PacketContents contents; contents.num_stream_frames = 1; @@ -3138,18 +3138,18 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, ConsumeDataFastPath) { EXPECT_EQ(10000u, consumed.bytes_consumed); EXPECT_TRUE(consumed.fin_consumed); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); PacketContents contents; contents.num_stream_frames = 1; CheckPacketContains(contents, 0); EXPECT_FALSE(packets_.empty()); SerializedPacket& packet = packets_.back(); - EXPECT_TRUE(!packet.retransmittable_frames.empty()); + EXPECT_TRUE(!packet.retransmissible_frames.empty()); EXPECT_EQ(LOSS_RETRANSMISSION, packet.transmission_type); - EXPECT_EQ(STREAM_FRAME, packet.retransmittable_frames.front().type); + EXPECT_EQ(STREAM_FRAME, packet.retransmissible_frames.front().type); const QuicStreamFrame& stream_frame = - packet.retransmittable_frames.front().stream_frame; + packet.retransmissible_frames.front().stream_frame; EXPECT_EQ(10000u, stream_frame.data_length + stream_frame.offset); } @@ -3167,17 +3167,17 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, ConsumeDataLarge) { EXPECT_EQ(10000u, consumed.bytes_consumed); EXPECT_TRUE(consumed.fin_consumed); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); PacketContents contents; contents.num_stream_frames = 1; CheckPacketContains(contents, 0); EXPECT_FALSE(packets_.empty()); SerializedPacket& packet = packets_.back(); - EXPECT_TRUE(!packet.retransmittable_frames.empty()); - EXPECT_EQ(STREAM_FRAME, packet.retransmittable_frames.front().type); + EXPECT_TRUE(!packet.retransmissible_frames.empty()); + EXPECT_EQ(STREAM_FRAME, packet.retransmissible_frames.front().type); const QuicStreamFrame& stream_frame = - packet.retransmittable_frames.front().stream_frame; + packet.retransmissible_frames.front().stream_frame; EXPECT_EQ(10000u, stream_frame.data_length + stream_frame.offset); } @@ -3186,22 +3186,22 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, ConsumeDataLargeSendAckFalse) { QuicRstStreamFrame* rst_frame = CreateRstStreamFrame(); const bool success = - creator_.ConsumeRetransmittableControlFrame(QuicFrame(rst_frame), + creator_.ConsumeRetransmissibleControlFrame(QuicFrame(rst_frame), /*bundle_ack=*/true); EXPECT_FALSE(success); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); delegate_.SetCanWriteAnything(); - creator_.ConsumeRetransmittableControlFrame(QuicFrame(rst_frame), + creator_.ConsumeRetransmissibleControlFrame(QuicFrame(rst_frame), /*bundle_ack=*/false); const std::string data(10000, '?'); EXPECT_CALL(delegate_, OnSerializedPacket(_)) .WillRepeatedly( Invoke(this, &QuicPacketCreatorMultiplePacketsTest::SavePacket)); - creator_.ConsumeRetransmittableControlFrame(QuicFrame(CreateRstStreamFrame()), + creator_.ConsumeRetransmissibleControlFrame(QuicFrame(CreateRstStreamFrame()), /*bundle_ack=*/true); QuicConsumedData consumed = creator_.ConsumeData( QuicUtils::GetFirstBidirectionalStreamId(framer_.transport_version(), @@ -3212,14 +3212,14 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, ConsumeDataLargeSendAckFalse) { EXPECT_EQ(10000u, consumed.bytes_consumed); EXPECT_TRUE(consumed.fin_consumed); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); EXPECT_FALSE(packets_.empty()); SerializedPacket& packet = packets_.back(); - EXPECT_TRUE(!packet.retransmittable_frames.empty()); - EXPECT_EQ(STREAM_FRAME, packet.retransmittable_frames.front().type); + EXPECT_TRUE(!packet.retransmissible_frames.empty()); + EXPECT_EQ(STREAM_FRAME, packet.retransmissible_frames.front().type); const QuicStreamFrame& stream_frame = - packet.retransmittable_frames.front().stream_frame; + packet.retransmissible_frames.front().stream_frame; EXPECT_EQ(10000u, stream_frame.data_length + stream_frame.offset); } @@ -3240,14 +3240,14 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, ConsumeDataLargeSendAckTrue) { EXPECT_EQ(10000u, consumed.bytes_consumed); EXPECT_TRUE(consumed.fin_consumed); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); EXPECT_FALSE(packets_.empty()); SerializedPacket& packet = packets_.back(); - EXPECT_TRUE(!packet.retransmittable_frames.empty()); - EXPECT_EQ(STREAM_FRAME, packet.retransmittable_frames.front().type); + EXPECT_TRUE(!packet.retransmissible_frames.empty()); + EXPECT_EQ(STREAM_FRAME, packet.retransmissible_frames.front().type); const QuicStreamFrame& stream_frame = - packet.retransmittable_frames.front().stream_frame; + packet.retransmissible_frames.front().stream_frame; EXPECT_EQ(10000u, stream_frame.data_length + stream_frame.offset); } @@ -3256,22 +3256,22 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, NotWritableThenBatchOperations) { QuicRstStreamFrame* rst_frame = CreateRstStreamFrame(); const bool consumed = - creator_.ConsumeRetransmittableControlFrame(QuicFrame(rst_frame), + creator_.ConsumeRetransmissibleControlFrame(QuicFrame(rst_frame), /*bundle_ack=*/true); EXPECT_FALSE(consumed); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); EXPECT_FALSE(creator_.HasPendingStreamFramesOfStream(3)); delegate_.SetCanWriteAnything(); EXPECT_TRUE( - creator_.ConsumeRetransmittableControlFrame(QuicFrame(rst_frame), + creator_.ConsumeRetransmissibleControlFrame(QuicFrame(rst_frame), /*bundle_ack=*/false)); // Send some data and a control frame creator_.ConsumeData(3, "quux", 0, NO_FIN); if (!VersionHasIetfQuicFrames(framer_.transport_version())) { - creator_.ConsumeRetransmittableControlFrame(QuicFrame(CreateGoAwayFrame()), + creator_.ConsumeRetransmissibleControlFrame(QuicFrame(CreateGoAwayFrame()), /*bundle_ack=*/false); } EXPECT_TRUE(creator_.HasPendingStreamFramesOfStream(3)); @@ -3282,7 +3282,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, NotWritableThenBatchOperations) { Invoke(this, &QuicPacketCreatorMultiplePacketsTest::SavePacket)); creator_.Flush(); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); EXPECT_FALSE(creator_.HasPendingStreamFramesOfStream(3)); PacketContents contents; @@ -3303,11 +3303,11 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, NotWritableThenBatchOperations2) { QuicRstStreamFrame* rst_frame = CreateRstStreamFrame(); const bool success = - creator_.ConsumeRetransmittableControlFrame(QuicFrame(rst_frame), + creator_.ConsumeRetransmissibleControlFrame(QuicFrame(rst_frame), /*bundle_ack=*/true); EXPECT_FALSE(success); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); delegate_.SetCanWriteAnything(); @@ -3322,7 +3322,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, NotWritableThenBatchOperations2) { Invoke(this, &QuicPacketCreatorMultiplePacketsTest::SavePacket)); } EXPECT_TRUE( - creator_.ConsumeRetransmittableControlFrame(QuicFrame(rst_frame), + creator_.ConsumeRetransmissibleControlFrame(QuicFrame(rst_frame), /*bundle_ack=*/false)); // Send enough data to exceed one packet size_t data_len = kDefaultMaxPacketSize + 100; @@ -3331,13 +3331,13 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, NotWritableThenBatchOperations2) { EXPECT_EQ(data_len, consumed.bytes_consumed); EXPECT_TRUE(consumed.fin_consumed); if (!VersionHasIetfQuicFrames(framer_.transport_version())) { - creator_.ConsumeRetransmittableControlFrame(QuicFrame(CreateGoAwayFrame()), + creator_.ConsumeRetransmissibleControlFrame(QuicFrame(CreateGoAwayFrame()), /*bundle_ack=*/false); } creator_.Flush(); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); // The first packet should have the queued data and part of the stream data. PacketContents contents; @@ -3375,7 +3375,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, PacketTransmissionType) { << "Test setup failed: Please increase data_len to " << data_len + creator_.BytesFree() << " bytes."; - // The second ConsumeData can not be added to the packet and will flush. + // The second ConsumeData cannot be added to the packet and will flush. creator_.SetTransmissionType(NOT_RETRANSMISSION); EXPECT_CALL(delegate_, OnSerializedPacket(_)) @@ -3390,9 +3390,9 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, PacketTransmissionType) { // Ensure the packet is successfully created. ASSERT_EQ(1u, packets_.size()); ASSERT_TRUE(packets_[0].encrypted_buffer); - ASSERT_EQ(1u, packets_[0].retransmittable_frames.size()); + ASSERT_EQ(1u, packets_[0].retransmissible_frames.size()); EXPECT_EQ(stream1_id, - packets_[0].retransmittable_frames[0].stream_frame.stream_id); + packets_[0].retransmissible_frames[0].stream_frame.stream_id); // Since the second frame was not added, the packet's transmission type // should be the first frame's type. @@ -3435,7 +3435,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, SetMaxPacketLength_Initial) { EXPECT_EQ(data_len, consumed.bytes_consumed); EXPECT_TRUE(consumed.fin_consumed); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); // We expect three packets, and first two of them have to be of packet_len // size. We check multiple packets (instead of just one) because we want to @@ -3475,7 +3475,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, SetMaxPacketLength_Middle) { EXPECT_EQ(data_len, consumed.bytes_consumed); EXPECT_FALSE(consumed.fin_consumed); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); // Make sure we already have two packets. ASSERT_EQ(2u, packets_.size()); @@ -3494,7 +3494,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, SetMaxPacketLength_Middle) { EXPECT_EQ(data_len, consumed.bytes_consumed); EXPECT_TRUE(consumed.fin_consumed); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); // We expect first data chunk to get fragmented, but the second one to fit // into a single packet. @@ -3526,7 +3526,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, EXPECT_EQ(first_write_len, consumed.bytes_consumed); EXPECT_FALSE(consumed.fin_consumed); EXPECT_TRUE(creator_.HasPendingFrames()); - EXPECT_TRUE(creator_.HasPendingRetransmittableFrames()); + EXPECT_TRUE(creator_.HasPendingRetransmissibleFrames()); // Make sure we have no packets so far. ASSERT_EQ(0u, packets_.size()); @@ -3542,7 +3542,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, creator_.SetMaxPacketLength(packet_len); EXPECT_EQ(packet_len, creator_.max_packet_length()); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); // We expect to see exactly one packet serialized after that, because we send // a value somewhat exceeding new max packet size, and the tail data does not @@ -3562,7 +3562,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, EXPECT_EQ(second_write_len, consumed.bytes_consumed); EXPECT_TRUE(consumed.fin_consumed); EXPECT_TRUE(creator_.HasPendingFrames()); - EXPECT_TRUE(creator_.HasPendingRetransmittableFrames()); + EXPECT_TRUE(creator_.HasPendingRetransmissibleFrames()); // We expect the first packet to be underfilled, and the second packet be up // to the new max packet size. @@ -3616,7 +3616,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, creator_.GenerateMtuDiscoveryPacket(target_mtu); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); ASSERT_EQ(1u, packets_.size()); EXPECT_EQ(target_mtu, packets_[0].encrypted_length); @@ -3657,12 +3657,12 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, EXPECT_EQ(data_len, consumed.bytes_consumed); EXPECT_FALSE(consumed.fin_consumed); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); // Send the MTU probe. creator_.GenerateMtuDiscoveryPacket(target_mtu); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); // Send data after the MTU probe. creator_.AttachPacketFlusher(); @@ -3675,7 +3675,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, EXPECT_EQ(data_len, consumed.bytes_consumed); EXPECT_TRUE(consumed.fin_consumed); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); ASSERT_EQ(5u, packets_.size()); EXPECT_EQ(kDefaultMaxPacketSize, packets_[0].encrypted_length); @@ -3705,10 +3705,10 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, framer_.transport_version(), kQuicErrorCode, NO_IETF_QUIC_ERROR, std::string(error_details), /*transport_close_frame_type=*/0); - creator_.ConsumeRetransmittableControlFrame(QuicFrame(frame), + creator_.ConsumeRetransmissibleControlFrame(QuicFrame(frame), /*bundle_ack=*/false); EXPECT_TRUE(creator_.HasPendingFrames()); - EXPECT_TRUE(creator_.HasPendingRetransmittableFrames()); + EXPECT_TRUE(creator_.HasPendingRetransmissibleFrames()); } TEST_F(QuicPacketCreatorMultiplePacketsTest, @@ -3745,7 +3745,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, creator_.Flush(); EXPECT_EQ(kStreamFramePayloadSize, consumed.bytes_consumed); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); EXPECT_EQ(1u, packets_.size()); PacketContents contents; @@ -3788,7 +3788,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, creator_.Flush(); EXPECT_EQ(kStreamFramePayloadSize, consumed.bytes_consumed); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); EXPECT_LE(1u, packets_.size()); PacketContents contents; @@ -3847,7 +3847,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, EXPECT_EQ(kStreamFramePayloadSize, consumed.bytes_consumed); creator_.Flush(); EXPECT_FALSE(creator_.HasPendingFrames()); - EXPECT_FALSE(creator_.HasPendingRetransmittableFrames()); + EXPECT_FALSE(creator_.HasPendingRetransmissibleFrames()); EXPECT_LE(2u, packets_.size()); PacketContents contents; @@ -3883,14 +3883,14 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, AddMessageFrame) { EXPECT_EQ(MESSAGE_STATUS_SUCCESS, creator_.AddMessageFrame(1, MemSliceFromString("message"))); EXPECT_TRUE(creator_.HasPendingFrames()); - EXPECT_TRUE(creator_.HasPendingRetransmittableFrames()); + EXPECT_TRUE(creator_.HasPendingRetransmissibleFrames()); // Add a message which causes the flush of current packet. EXPECT_EQ(MESSAGE_STATUS_SUCCESS, creator_.AddMessageFrame( 2, MemSliceFromString(std::string( creator_.GetCurrentLargestMessagePayload(), 'a')))); - EXPECT_TRUE(creator_.HasPendingRetransmittableFrames()); + EXPECT_TRUE(creator_.HasPendingRetransmissibleFrames()); // Failed to send messages which cannot fit into one packet. EXPECT_EQ(MESSAGE_STATUS_TOO_LARGE, @@ -3911,7 +3911,7 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, ConnectionId) { EXPECT_EQ(TestConnectionId(0x33), creator_.GetSourceConnectionId()); } -// Regresstion test for b/159812345. +// Regression test for b/159812345. TEST_F(QuicPacketCreatorMultiplePacketsTest, ExtraPaddingNeeded) { if (!framer_.version().HasHeaderProtection()) { return; @@ -3928,8 +3928,8 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, ExtraPaddingNeeded) { framer_.transport_version(), Perspective::IS_CLIENT), "", 0, FIN); creator_.Flush(); - ASSERT_FALSE(packets_[0].nonretransmittable_frames.empty()); - QuicFrame padding = packets_[0].nonretransmittable_frames[0]; + ASSERT_FALSE(packets_[0].nonretransmissible_frames.empty()); + QuicFrame padding = packets_[0].nonretransmissible_frames[0]; // Verify stream frame expansion is excluded. EXPECT_EQ(padding.padding_frame.num_padding_bytes, 1); } @@ -3970,9 +3970,9 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, EXPECT_CALL(delegate_, OnSerializedPacket(_)) .WillOnce(Invoke([=](SerializedPacket packet) { EXPECT_EQ(peer_addr, packet.peer_address); - ASSERT_EQ(2u, packet.retransmittable_frames.size()); - EXPECT_EQ(STREAM_FRAME, packet.retransmittable_frames.front().type); - EXPECT_EQ(STREAM_FRAME, packet.retransmittable_frames.back().type); + ASSERT_EQ(2u, packet.retransmissible_frames.size()); + EXPECT_EQ(STREAM_FRAME, packet.retransmissible_frames.front().type); + EXPECT_EQ(STREAM_FRAME, packet.retransmissible_frames.back().type); })); creator_.FlushCurrentPacket(); } @@ -3994,13 +3994,13 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, EXPECT_CALL(delegate_, OnSerializedPacket(_)) .WillOnce(Invoke([=](SerializedPacket packet) { EXPECT_EQ(peer_addr, packet.peer_address); - ASSERT_EQ(1u, packet.retransmittable_frames.size()); - EXPECT_EQ(STREAM_FRAME, packet.retransmittable_frames.front().type); + ASSERT_EQ(1u, packet.retransmissible_frames.size()); + EXPECT_EQ(STREAM_FRAME, packet.retransmissible_frames.front().type); })) .WillOnce(Invoke([=](SerializedPacket packet) { EXPECT_EQ(peer_addr1, packet.peer_address); - ASSERT_EQ(1u, packet.retransmittable_frames.size()); - EXPECT_EQ(STREAM_FRAME, packet.retransmittable_frames.front().type); + ASSERT_EQ(1u, packet.retransmissible_frames.size()); + EXPECT_EQ(STREAM_FRAME, packet.retransmissible_frames.front().type); })); EXPECT_TRUE(creator_.HasPendingFrames()); { @@ -4049,8 +4049,8 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, EXPECT_CALL(delegate_, OnSerializedPacket(_)) .WillOnce(Invoke([=](SerializedPacket packet) { EXPECT_EQ(peer_addr, packet.peer_address); - ASSERT_EQ(1u, packet.retransmittable_frames.size()); - EXPECT_EQ(STREAM_FRAME, packet.retransmittable_frames.front().type); + ASSERT_EQ(1u, packet.retransmissible_frames.size()); + EXPECT_EQ(STREAM_FRAME, packet.retransmissible_frames.front().type); QuicConnectionId client_connection_id2 = TestConnectionId(3); QuicConnectionId server_connection_id2 = TestConnectionId(4); @@ -4074,8 +4074,8 @@ TEST_F(QuicPacketCreatorMultiplePacketsTest, })) .WillOnce(Invoke([=](SerializedPacket packet) { EXPECT_EQ(peer_addr1, packet.peer_address); - ASSERT_EQ(1u, packet.retransmittable_frames.size()); - EXPECT_EQ(STREAM_FRAME, packet.retransmittable_frames.front().type); + ASSERT_EQ(1u, packet.retransmissible_frames.size()); + EXPECT_EQ(STREAM_FRAME, packet.retransmissible_frames.front().type); })); creator_.FlushCurrentPacket(); } diff --git a/quiche/quic/core/quic_packet_writer.h b/quiche/quic/core/quic_packet_writer.h index dfca5a846..1aa6a64e5 100644 --- a/quiche/quic/core/quic_packet_writer.h +++ b/quiche/quic/core/quic_packet_writer.h @@ -81,7 +81,7 @@ class QUICHE_EXPORT QuicPacketWriter { // If the writer is blocked, return WRITE_STATUS_BLOCKED immediately. // If the packet can be batched with other buffered packets, save the packet // to the internal buffer. - // If the packet can not be batched, or the internal buffer is near full after + // If the packet cannot be batched, or the internal buffer is near full after // it is buffered, the internal buffer is flushed to free up space. // Return WriteResult(WRITE_STATUS_OK, ) on success. When // is zero, it means the packet is buffered and not flushed. @@ -170,8 +170,8 @@ class QUICHE_EXPORT QuicPacketWriter { // - Return WRITE_STATUS_BLOCKED if the underlying socket is blocked while // sending. Some packets may have been sent, packets not sent will stay in // the internal buffer. - // - Return a status >= WRITE_STATUS_ERROR if an error was encuontered while - // sending. As this is not a re-tryable error, any batched packets which + // - Return a status >= WRITE_STATUS_ERROR if an error was encountered while + // sending. As this is not a retryable error, any batched packets which // were on memory acquired via GetNextWriteLocation() should be released and // the batch should be dropped. virtual WriteResult Flush() = 0; diff --git a/quiche/quic/core/quic_packets.cc b/quiche/quic/core/quic_packets.cc index 22628775e..7c2f48ce2 100644 --- a/quiche/quic/core/quic_packets.cc +++ b/quiche/quic/core/quic_packets.cc @@ -451,8 +451,8 @@ SerializedPacket::SerializedPacket(SerializedPacket&& other) release_encrypted_buffer = std::move(other.release_encrypted_buffer); other.release_encrypted_buffer = nullptr; - retransmittable_frames.swap(other.retransmittable_frames); - nonretransmittable_frames.swap(other.nonretransmittable_frames); + retransmissible_frames.swap(other.retransmissible_frames); + nonretransmissible_frames.swap(other.nonretransmissible_frames); } } @@ -461,10 +461,10 @@ SerializedPacket::~SerializedPacket() { release_encrypted_buffer(encrypted_buffer); } - if (!retransmittable_frames.empty()) { - DeleteFrames(&retransmittable_frames); + if (!retransmissible_frames.empty()) { + DeleteFrames(&retransmissible_frames); } - for (auto& frame : nonretransmittable_frames) { + for (auto& frame : nonretransmissible_frames) { if (!has_ack_frame_copy && frame.type == ACK_FRAME) { // Do not delete ack frame if the packet does not own a copy of it. continue; @@ -497,14 +497,14 @@ SerializedPacket* CopySerializedPacket(const SerializedPacket& serialized, copy->release_encrypted_buffer = [](const char* p) { delete[] p; }; } // Copy underlying frames. - copy->retransmittable_frames = - CopyQuicFrames(allocator, serialized.retransmittable_frames); - QUICHE_DCHECK(copy->nonretransmittable_frames.empty()); - for (const auto& frame : serialized.nonretransmittable_frames) { + copy->retransmissible_frames = + CopyQuicFrames(allocator, serialized.retransmissible_frames); + QUICHE_DCHECK(copy->nonretransmissible_frames.empty()); + for (const auto& frame : serialized.nonretransmissible_frames) { if (frame.type == ACK_FRAME) { copy->has_ack_frame_copy = true; } - copy->nonretransmittable_frames.push_back(CopyQuicFrame(allocator, frame)); + copy->nonretransmissible_frames.push_back(CopyQuicFrame(allocator, frame)); } return copy; } diff --git a/quiche/quic/core/quic_packets.h b/quiche/quic/core/quic_packets.h index 9bd17f97d..801e5a971 100644 --- a/quiche/quic/core/quic_packets.h +++ b/quiche/quic/core/quic_packets.h @@ -306,7 +306,7 @@ class QUICHE_EXPORT QuicReceivedPacket : public QuicEncryptedPacket { // Returns the time at which the packet was received. QuicTime receipt_time() const { return receipt_time_; } - // This is the TTL of the packet, assuming ttl_vaild_ is true. + // This is the TTL of the packet, assuming ttl_valid_ is true. int ttl() const { return ttl_; } // Start of packet headers. @@ -365,8 +365,8 @@ struct QUICHE_EXPORT SerializedPacket { QuicPacketLength encrypted_length; std::function release_encrypted_buffer; - QuicFrames retransmittable_frames; - QuicFrames nonretransmittable_frames; + QuicFrames retransmissible_frames; + QuicFrames nonretransmissible_frames; IsHandshake has_crypto_handshake; QuicPacketNumber packet_number; QuicPacketNumberLength packet_number_length; @@ -380,7 +380,7 @@ struct QUICHE_EXPORT SerializedPacket { // 0 otherwise. QuicPacketNumber largest_acked; // Indicates whether this packet has a copy of ack frame in - // nonretransmittable_frames. + // nonretransmissible_frames. bool has_ack_frame_copy; bool has_ack_frequency; bool has_message; diff --git a/quiche/quic/core/quic_packets_test.cc b/quiche/quic/core/quic_packets_test.cc index 4e6598ddb..1553c429b 100644 --- a/quiche/quic/core/quic_packets_test.cc +++ b/quiche/quic/core/quic_packets_test.cc @@ -86,24 +86,24 @@ TEST_F(QuicPacketsTest, CopySerializedPacket) { SerializedPacket packet(QuicPacketNumber(1), PACKET_1BYTE_PACKET_NUMBER, buffer.data(), buffer.length(), /*has_ack=*/false, /*has_stop_waiting=*/false); - packet.retransmittable_frames.push_back(QuicFrame(QuicWindowUpdateFrame())); - packet.retransmittable_frames.push_back(QuicFrame(QuicStreamFrame())); + packet.retransmissible_frames.push_back(QuicFrame(QuicWindowUpdateFrame())); + packet.retransmissible_frames.push_back(QuicFrame(QuicStreamFrame())); QuicAckFrame ack_frame(InitAckFrame(1)); - packet.nonretransmittable_frames.push_back(QuicFrame(&ack_frame)); - packet.nonretransmittable_frames.push_back(QuicFrame(QuicPaddingFrame(-1))); + packet.nonretransmissible_frames.push_back(QuicFrame(&ack_frame)); + packet.nonretransmissible_frames.push_back(QuicFrame(QuicPaddingFrame(-1))); std::unique_ptr copy = absl::WrapUnique( CopySerializedPacket(packet, &allocator, /*copy_buffer=*/true)); EXPECT_EQ(quic::QuicPacketNumber(1), copy->packet_number); EXPECT_EQ(PACKET_1BYTE_PACKET_NUMBER, copy->packet_number_length); - ASSERT_EQ(2u, copy->retransmittable_frames.size()); - EXPECT_EQ(WINDOW_UPDATE_FRAME, copy->retransmittable_frames[0].type); - EXPECT_EQ(STREAM_FRAME, copy->retransmittable_frames[1].type); + ASSERT_EQ(2u, copy->retransmissible_frames.size()); + EXPECT_EQ(WINDOW_UPDATE_FRAME, copy->retransmissible_frames[0].type); + EXPECT_EQ(STREAM_FRAME, copy->retransmissible_frames[1].type); - ASSERT_EQ(2u, copy->nonretransmittable_frames.size()); - EXPECT_EQ(ACK_FRAME, copy->nonretransmittable_frames[0].type); - EXPECT_EQ(PADDING_FRAME, copy->nonretransmittable_frames[1].type); + ASSERT_EQ(2u, copy->nonretransmissible_frames.size()); + EXPECT_EQ(ACK_FRAME, copy->nonretransmissible_frames[0].type); + EXPECT_EQ(PADDING_FRAME, copy->nonretransmissible_frames[1].type); EXPECT_EQ(1000u, copy->encrypted_length); quiche::test::CompareCharArraysWithHexError( "encrypted_buffer", copy->encrypted_buffer, copy->encrypted_length, diff --git a/quiche/quic/core/quic_path_validator.h b/quiche/quic/core/quic_path_validator.h index 37faca3f4..8f6d71b02 100644 --- a/quiche/quic/core/quic_path_validator.h +++ b/quiche/quic/core/quic_path_validator.h @@ -112,8 +112,8 @@ class QUICHE_EXPORT QuicPathValidator { public: virtual ~ResultDelegate() = default; - // Called when a PATH_RESPONSE is received with a matching PATH_CHALLANGE. - // |start_time| is the time when the matching PATH_CHALLANGE was sent. + // Called when a PATH_RESPONSE is received with a matching PATH_CHALLENGE. + // |start_time| is the time when the matching PATH_CHALLENGE was sent. virtual void OnPathValidationSuccess( std::unique_ptr context, QuicTime start_time) = 0; @@ -132,7 +132,7 @@ class QUICHE_EXPORT QuicPathValidator { PathValidationReason reason); // Called when a PATH_RESPONSE frame has been received. Matches the received - // PATH_RESPONSE payload with the payloads previously sent in PATH_CHALLANGE + // PATH_RESPONSE payload with the payloads previously sent in PATH_CHALLENGE // frames and the self address on which it was sent. void OnPathResponse(const QuicPathFrameBuffer& probing_data, QuicSocketAddress self_address); diff --git a/quiche/quic/core/quic_path_validator_test.cc b/quiche/quic/core/quic_path_validator_test.cc index 6d0be9e82..501014b22 100644 --- a/quiche/quic/core/quic_path_validator_test.cc +++ b/quiche/quic/core/quic_path_validator_test.cc @@ -149,7 +149,7 @@ TEST_F(QuicPathValidatorTest, RespondAfter1stRetry) { .WillOnce(Invoke([&](const QuicPathFrameBuffer& payload, const QuicSocketAddress&, const QuicSocketAddress&, const QuicSocketAddress&, QuicPacketWriter*) { - // Store up the 1st PATH_CHALLANGE payload. + // Store up the 1st PATH_CHALLENGE payload. memcpy(challenge_data.data(), payload.data(), payload.size()); return true; })) diff --git a/quiche/quic/core/quic_ping_manager.cc b/quiche/quic/core/quic_ping_manager.cc index 1574632b5..f6527aa9f 100644 --- a/quiche/quic/core/quic_ping_manager.cc +++ b/quiche/quic/core/quic_ping_manager.cc @@ -10,10 +10,10 @@ namespace quic { namespace { -// Maximum shift used to calculate retransmittable on wire timeout. For 200ms -// initial retransmittable on wire delay, this would get a maximum of 200ms * (1 +// Maximum shift used to calculate retransmissible on wire timeout. For 200ms +// initial retransmissible on wire delay, this would get a maximum of 200ms * (1 // << 10) = 204.8s -const int kMaxRetransmittableOnWireDelayShift = 10; +const int kMaxRetransmissibleOnWireDelayShift = 10; class AlarmDelegate : public QuicAlarm::DelegateWithContext { public: @@ -65,14 +65,14 @@ void QuicPingManager::OnAlarm() { } // Please note, alarm does not get re-armed here, and we are relying on caller // to SetAlarm later. - if (earliest_deadline == retransmittable_on_wire_deadline_) { - retransmittable_on_wire_deadline_ = QuicTime::Zero(); - if (GetQuicFlag(quic_max_aggressive_retransmittable_on_wire_ping_count) != + if (earliest_deadline == retransmissible_on_wire_deadline_) { + retransmissible_on_wire_deadline_ = QuicTime::Zero(); + if (GetQuicFlag(quic_max_aggressive_retransmissible_on_wire_ping_count) != 0) { - ++consecutive_retransmittable_on_wire_count_; + ++consecutive_retransmissible_on_wire_count_; } - ++retransmittable_on_wire_count_; - delegate_->OnRetransmittableOnWireTimeout(); + ++retransmissible_on_wire_count_; + delegate_->OnRetransmissibleOnWireTimeout(); return; } if (earliest_deadline == keep_alive_deadline_) { @@ -83,7 +83,7 @@ void QuicPingManager::OnAlarm() { void QuicPingManager::Stop() { alarm_->PermanentCancel(); - retransmittable_on_wire_deadline_ = QuicTime::Zero(); + retransmissible_on_wire_deadline_ = QuicTime::Zero(); keep_alive_deadline_ = QuicTime::Zero(); } @@ -93,63 +93,63 @@ void QuicPingManager::UpdateDeadlines(QuicTime now, bool should_keep_alive, // |now|). keep_alive_deadline_ = QuicTime::Zero(); if (perspective_ == Perspective::IS_SERVER && - initial_retransmittable_on_wire_timeout_.IsInfinite()) { + initial_retransmissible_on_wire_timeout_.IsInfinite()) { // The PING alarm exists to support two features: // 1) clients send PINGs every 15s to prevent NAT timeouts, - // 2) both clients and servers can send retransmittable on the wire PINGs + // 2) both clients and servers can send retransmissible on the wire PINGs // (ROWP) while ShouldKeepConnectionAlive is true and there is no packets in // flight. - QUICHE_DCHECK(!retransmittable_on_wire_deadline_.IsInitialized()); + QUICHE_DCHECK(!retransmissible_on_wire_deadline_.IsInitialized()); return; } if (!should_keep_alive) { // Don't send a ping unless the application (ie: HTTP/3) says to, usually // because it is expecting a response from the peer. - retransmittable_on_wire_deadline_ = QuicTime::Zero(); + retransmissible_on_wire_deadline_ = QuicTime::Zero(); return; } if (perspective_ == Perspective::IS_CLIENT) { // Clients send 15s PINGs to avoid NATs from timing out. keep_alive_deadline_ = now + keep_alive_timeout_; } - if (initial_retransmittable_on_wire_timeout_.IsInfinite() || + if (initial_retransmissible_on_wire_timeout_.IsInfinite() || has_in_flight_packets || - retransmittable_on_wire_count_ > - GetQuicFlag(quic_max_retransmittable_on_wire_ping_count)) { - // No need to set retransmittable-on-wire timeout. - retransmittable_on_wire_deadline_ = QuicTime::Zero(); + retransmissible_on_wire_count_ > + GetQuicFlag(quic_max_retransmissible_on_wire_ping_count)) { + // No need to set retransmissible-on-wire timeout. + retransmissible_on_wire_deadline_ = QuicTime::Zero(); return; } - QUICHE_DCHECK_LT(initial_retransmittable_on_wire_timeout_, + QUICHE_DCHECK_LT(initial_retransmissible_on_wire_timeout_, keep_alive_timeout_); - QuicTime::Delta retransmittable_on_wire_timeout = - initial_retransmittable_on_wire_timeout_; - const int max_aggressive_retransmittable_on_wire_count = - GetQuicFlag(quic_max_aggressive_retransmittable_on_wire_ping_count); - QUICHE_DCHECK_LE(0, max_aggressive_retransmittable_on_wire_count); - if (consecutive_retransmittable_on_wire_count_ > - max_aggressive_retransmittable_on_wire_count) { + QuicTime::Delta retransmissible_on_wire_timeout = + initial_retransmissible_on_wire_timeout_; + const int max_aggressive_retransmissible_on_wire_count = + GetQuicFlag(quic_max_aggressive_retransmissible_on_wire_ping_count); + QUICHE_DCHECK_LE(0, max_aggressive_retransmissible_on_wire_count); + if (consecutive_retransmissible_on_wire_count_ > + max_aggressive_retransmissible_on_wire_count) { // Exponentially back off the timeout if the number of consecutive - // retransmittable on wire pings has exceeds the allowance. - int shift = std::min(consecutive_retransmittable_on_wire_count_ - - max_aggressive_retransmittable_on_wire_count, - kMaxRetransmittableOnWireDelayShift); - retransmittable_on_wire_timeout = - initial_retransmittable_on_wire_timeout_ * (1 << shift); + // retransmissible on wire pings has exceeds the allowance. + int shift = std::min(consecutive_retransmissible_on_wire_count_ - + max_aggressive_retransmissible_on_wire_count, + kMaxRetransmissibleOnWireDelayShift); + retransmissible_on_wire_timeout = + initial_retransmissible_on_wire_timeout_ * (1 << shift); } - if (retransmittable_on_wire_deadline_.IsInitialized() && - retransmittable_on_wire_deadline_ < - now + retransmittable_on_wire_timeout) { + if (retransmissible_on_wire_deadline_.IsInitialized() && + retransmissible_on_wire_deadline_ < + now + retransmissible_on_wire_timeout) { // Alarm is set to an earlier time. Do not postpone it. return; } - retransmittable_on_wire_deadline_ = now + retransmittable_on_wire_timeout; + retransmissible_on_wire_deadline_ = now + retransmissible_on_wire_timeout; } QuicTime QuicPingManager::GetEarliestDeadline() const { QuicTime earliest_deadline = QuicTime::Zero(); - for (QuicTime t : {retransmittable_on_wire_deadline_, keep_alive_deadline_}) { + for (QuicTime t : {retransmissible_on_wire_deadline_, keep_alive_deadline_}) { if (!t.IsInitialized()) { continue; } diff --git a/quiche/quic/core/quic_ping_manager.h b/quiche/quic/core/quic_ping_manager.h index 4b9b536e6..e11042c34 100644 --- a/quiche/quic/core/quic_ping_manager.h +++ b/quiche/quic/core/quic_ping_manager.h @@ -22,7 +22,7 @@ class QuicPingManagerPeer; // QuicPingManager manages an alarm that has two modes: // 1) keep-alive. When alarm fires, send packet to extend idle timeout to keep // connection alive. -// 2) retransmittable-on-wire. When alarm fires, send packets to detect path +// 2) retransmissible-on-wire. When alarm fires, send packets to detect path // degrading (used in IP/port migrations). class QUICHE_EXPORT QuicPingManager { public: @@ -33,8 +33,8 @@ class QUICHE_EXPORT QuicPingManager { // Called when alarm fires in keep-alive mode. virtual void OnKeepAliveTimeout() = 0; - // Called when alarm fires in retransmittable-on-wire mode. - virtual void OnRetransmittableOnWireTimeout() = 0; + // Called when alarm fires in retransmissible-on-wire mode. + virtual void OnRetransmissibleOnWireTimeout() = 0; }; QuicPingManager(Perspective perspective, Delegate* delegate, @@ -56,25 +56,25 @@ class QUICHE_EXPORT QuicPingManager { keep_alive_timeout_ = keep_alive_timeout; } - void set_initial_retransmittable_on_wire_timeout( - QuicTime::Delta retransmittable_on_wire_timeout) { + void set_initial_retransmissible_on_wire_timeout( + QuicTime::Delta retransmissible_on_wire_timeout) { QUICHE_DCHECK(!alarm_->IsSet()); - initial_retransmittable_on_wire_timeout_ = retransmittable_on_wire_timeout; + initial_retransmissible_on_wire_timeout_ = retransmissible_on_wire_timeout; } - void reset_consecutive_retransmittable_on_wire_count() { - consecutive_retransmittable_on_wire_count_ = 0; + void reset_consecutive_retransmissible_on_wire_count() { + consecutive_retransmissible_on_wire_count_ = 0; } private: friend class test::QuicConnectionPeer; friend class test::QuicPingManagerPeer; - // Update |retransmittable_on_wire_deadline_| and |keep_alive_deadline_|. + // Update |retransmissible_on_wire_deadline_| and |keep_alive_deadline_|. void UpdateDeadlines(QuicTime now, bool should_keep_alive, bool has_in_flight_packets); - // Get earliest deadline of |retransmittable_on_wire_deadline_| and + // Get earliest deadline of |retransmissible_on_wire_deadline_| and // |keep_alive_deadline_|. Returns 0 if both deadlines are not initialized. QuicTime GetEarliestDeadline() const; @@ -82,21 +82,21 @@ class QUICHE_EXPORT QuicPingManager { Delegate* delegate_; // Not owned. - // Initial timeout for how long the wire can have no retransmittable packets. - QuicTime::Delta initial_retransmittable_on_wire_timeout_ = + // Initial timeout for how long the wire can have no retransmissible packets. + QuicTime::Delta initial_retransmissible_on_wire_timeout_ = QuicTime::Delta::Infinite(); - // Indicates how many consecutive retransmittable-on-wire has been armed + // Indicates how many consecutive retransmissible-on-wire has been armed // (since last reset). - int consecutive_retransmittable_on_wire_count_ = 0; + int consecutive_retransmissible_on_wire_count_ = 0; - // Indicates how many retransmittable-on-wire has been armed in total. - int retransmittable_on_wire_count_ = 0; + // Indicates how many retransmissible-on-wire has been armed in total. + int retransmissible_on_wire_count_ = 0; QuicTime::Delta keep_alive_timeout_ = QuicTime::Delta::FromSeconds(kPingTimeoutSecs); - QuicTime retransmittable_on_wire_deadline_ = QuicTime::Zero(); + QuicTime retransmissible_on_wire_deadline_ = QuicTime::Zero(); QuicTime keep_alive_deadline_ = QuicTime::Zero(); diff --git a/quiche/quic/core/quic_ping_manager_test.cc b/quiche/quic/core/quic_ping_manager_test.cc index d9acc7aa4..8a6fdefe2 100644 --- a/quiche/quic/core/quic_ping_manager_test.cc +++ b/quiche/quic/core/quic_ping_manager_test.cc @@ -31,7 +31,7 @@ const bool kHasInflightPackets = true; class MockDelegate : public QuicPingManager::Delegate { public: MOCK_METHOD(void, OnKeepAliveTimeout, (), (override)); - MOCK_METHOD(void, OnRetransmittableOnWireTimeout, (), (override)); + MOCK_METHOD(void, OnRetransmissibleOnWireTimeout, (), (override)); }; class QuicPingManagerTest : public QuicTest { @@ -132,11 +132,11 @@ TEST_F(QuicPingManagerTest, CustomizedKeepAliveTimeout) { EXPECT_FALSE(alarm_->IsSet()); } -TEST_F(QuicPingManagerTest, RetransmittableOnWireTimeout) { - const QuicTime::Delta kRtransmittableOnWireTimeout = +TEST_F(QuicPingManagerTest, RetransmissibleOnWireTimeout) { + const QuicTime::Delta kRetransmissibleOnWireTimeout = QuicTime::Delta::FromMilliseconds(50); - manager_.set_initial_retransmittable_on_wire_timeout( - kRtransmittableOnWireTimeout); + manager_.set_initial_retransmissible_on_wire_timeout( + kRetransmissibleOnWireTimeout); EXPECT_FALSE(alarm_->IsSet()); @@ -153,12 +153,12 @@ TEST_F(QuicPingManagerTest, RetransmittableOnWireTimeout) { manager_.SetAlarm(clock_.ApproximateNow(), kShouldKeepAlive, !kHasInflightPackets); EXPECT_TRUE(alarm_->IsSet()); - // Verify alarm is in retransmittable-on-wire mode. - EXPECT_EQ(kRtransmittableOnWireTimeout, + // Verify alarm is in retransmissible-on-wire mode. + EXPECT_EQ(kRetransmissibleOnWireTimeout, alarm_->deadline() - clock_.ApproximateNow()); - clock_.AdvanceTime(kRtransmittableOnWireTimeout); - EXPECT_CALL(delegate_, OnRetransmittableOnWireTimeout()); + clock_.AdvanceTime(kRetransmissibleOnWireTimeout); + EXPECT_CALL(delegate_, OnRetransmissibleOnWireTimeout()); alarm_->Fire(); EXPECT_FALSE(alarm_->IsSet()); // Reset alarm with in flight packets. @@ -170,14 +170,14 @@ TEST_F(QuicPingManagerTest, RetransmittableOnWireTimeout) { alarm_->deadline() - clock_.ApproximateNow()); } -TEST_F(QuicPingManagerTest, RetransmittableOnWireTimeoutExponentiallyBackOff) { - const int kMaxAggressiveRetransmittableOnWireCount = 5; - SetQuicFlag(quic_max_aggressive_retransmittable_on_wire_ping_count, - kMaxAggressiveRetransmittableOnWireCount); - const QuicTime::Delta initial_retransmittable_on_wire_timeout = +TEST_F(QuicPingManagerTest, RetransmissibleOnWireTimeoutExponentiallyBackOff) { + const int kMaxAggressiveRetransmissibleOnWireCount = 5; + SetQuicFlag(quic_max_aggressive_retransmissible_on_wire_ping_count, + kMaxAggressiveRetransmissibleOnWireCount); + const QuicTime::Delta initial_retransmissible_on_wire_timeout = QuicTime::Delta::FromMilliseconds(200); - manager_.set_initial_retransmittable_on_wire_timeout( - initial_retransmittable_on_wire_timeout); + manager_.set_initial_retransmissible_on_wire_timeout( + initial_retransmissible_on_wire_timeout); clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); EXPECT_FALSE(alarm_->IsSet()); @@ -188,19 +188,19 @@ TEST_F(QuicPingManagerTest, RetransmittableOnWireTimeoutExponentiallyBackOff) { EXPECT_EQ(QuicTime::Delta::FromSeconds(kPingTimeoutSecs), alarm_->deadline() - clock_.ApproximateNow()); - // Verify no exponential backoff on the first few retransmittable on wire + // Verify no exponential backoff on the first few retransmissible on wire // timeouts. - for (int i = 0; i <= kMaxAggressiveRetransmittableOnWireCount; ++i) { + for (int i = 0; i <= kMaxAggressiveRetransmissibleOnWireCount; ++i) { clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); // Reset alarm with no in flight packets. manager_.SetAlarm(clock_.ApproximateNow(), kShouldKeepAlive, !kHasInflightPackets); EXPECT_TRUE(alarm_->IsSet()); - // Verify alarm is in retransmittable-on-wire mode. - EXPECT_EQ(initial_retransmittable_on_wire_timeout, + // Verify alarm is in retransmissible-on-wire mode. + EXPECT_EQ(initial_retransmissible_on_wire_timeout, alarm_->deadline() - clock_.ApproximateNow()); - clock_.AdvanceTime(initial_retransmittable_on_wire_timeout); - EXPECT_CALL(delegate_, OnRetransmittableOnWireTimeout()); + clock_.AdvanceTime(initial_retransmissible_on_wire_timeout); + EXPECT_CALL(delegate_, OnRetransmissibleOnWireTimeout()); alarm_->Fire(); EXPECT_FALSE(alarm_->IsSet()); // Reset alarm with in flight packets. @@ -208,23 +208,23 @@ TEST_F(QuicPingManagerTest, RetransmittableOnWireTimeoutExponentiallyBackOff) { kHasInflightPackets); } - QuicTime::Delta retransmittable_on_wire_timeout = - initial_retransmittable_on_wire_timeout; + QuicTime::Delta retransmissible_on_wire_timeout = + initial_retransmissible_on_wire_timeout; - // Verify subsequent retransmittable-on-wire timeout is exponentially backed + // Verify subsequent retransmissible-on-wire timeout is exponentially backed // off. - while (retransmittable_on_wire_timeout * 2 < + while (retransmissible_on_wire_timeout * 2 < QuicTime::Delta::FromSeconds(kPingTimeoutSecs)) { - retransmittable_on_wire_timeout = retransmittable_on_wire_timeout * 2; + retransmissible_on_wire_timeout = retransmissible_on_wire_timeout * 2; clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); manager_.SetAlarm(clock_.ApproximateNow(), kShouldKeepAlive, !kHasInflightPackets); EXPECT_TRUE(alarm_->IsSet()); - EXPECT_EQ(retransmittable_on_wire_timeout, + EXPECT_EQ(retransmissible_on_wire_timeout, alarm_->deadline() - clock_.ApproximateNow()); - clock_.AdvanceTime(retransmittable_on_wire_timeout); - EXPECT_CALL(delegate_, OnRetransmittableOnWireTimeout()); + clock_.AdvanceTime(retransmissible_on_wire_timeout); + EXPECT_CALL(delegate_, OnRetransmissibleOnWireTimeout()); alarm_->Fire(); EXPECT_FALSE(alarm_->IsSet()); // Reset alarm with in flight packets. @@ -242,7 +242,7 @@ TEST_F(QuicPingManagerTest, RetransmittableOnWireTimeoutExponentiallyBackOff) { manager_.SetAlarm(clock_.ApproximateNow(), kShouldKeepAlive, !kHasInflightPackets); EXPECT_TRUE(alarm_->IsSet()); - // Verify alarm is in keep-alive mode because retransmittable-on-wire deadline + // Verify alarm is in keep-alive mode because retransmissible-on-wire deadline // is later. EXPECT_EQ(QuicTime::Delta::FromSeconds(kPingTimeoutSecs) - QuicTime::Delta::FromMilliseconds(5), @@ -255,14 +255,14 @@ TEST_F(QuicPingManagerTest, RetransmittableOnWireTimeoutExponentiallyBackOff) { } TEST_F(QuicPingManagerTest, - ResetRetransmitableOnWireTimeoutExponentiallyBackOff) { - const int kMaxAggressiveRetransmittableOnWireCount = 3; - SetQuicFlag(quic_max_aggressive_retransmittable_on_wire_ping_count, - kMaxAggressiveRetransmittableOnWireCount); - const QuicTime::Delta initial_retransmittable_on_wire_timeout = + ResetRetransmissibleOnWireTimeoutExponentiallyBackOff) { + const int kMaxAggressiveRetransmissibleOnWireCount = 3; + SetQuicFlag(quic_max_aggressive_retransmissible_on_wire_ping_count, + kMaxAggressiveRetransmissibleOnWireCount); + const QuicTime::Delta initial_retransmissible_on_wire_timeout = QuicTime::Delta::FromMilliseconds(200); - manager_.set_initial_retransmittable_on_wire_timeout( - initial_retransmittable_on_wire_timeout); + manager_.set_initial_retransmissible_on_wire_timeout( + initial_retransmissible_on_wire_timeout); clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); EXPECT_FALSE(alarm_->IsSet()); @@ -277,38 +277,38 @@ TEST_F(QuicPingManagerTest, manager_.SetAlarm(clock_.ApproximateNow(), kShouldKeepAlive, !kHasInflightPackets); EXPECT_TRUE(alarm_->IsSet()); - // Verify alarm is in retransmittable-on-wire mode. - EXPECT_EQ(initial_retransmittable_on_wire_timeout, + // Verify alarm is in retransmissible-on-wire mode. + EXPECT_EQ(initial_retransmissible_on_wire_timeout, alarm_->deadline() - clock_.ApproximateNow()); - EXPECT_CALL(delegate_, OnRetransmittableOnWireTimeout()); - clock_.AdvanceTime(initial_retransmittable_on_wire_timeout); + EXPECT_CALL(delegate_, OnRetransmissibleOnWireTimeout()); + clock_.AdvanceTime(initial_retransmissible_on_wire_timeout); alarm_->Fire(); clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); manager_.SetAlarm(clock_.ApproximateNow(), kShouldKeepAlive, !kHasInflightPackets); EXPECT_TRUE(alarm_->IsSet()); - EXPECT_EQ(initial_retransmittable_on_wire_timeout, + EXPECT_EQ(initial_retransmissible_on_wire_timeout, alarm_->deadline() - clock_.ApproximateNow()); - manager_.reset_consecutive_retransmittable_on_wire_count(); + manager_.reset_consecutive_retransmissible_on_wire_count(); manager_.SetAlarm(clock_.ApproximateNow(), kShouldKeepAlive, !kHasInflightPackets); - EXPECT_EQ(initial_retransmittable_on_wire_timeout, + EXPECT_EQ(initial_retransmissible_on_wire_timeout, alarm_->deadline() - clock_.ApproximateNow()); - EXPECT_CALL(delegate_, OnRetransmittableOnWireTimeout()); - clock_.AdvanceTime(initial_retransmittable_on_wire_timeout); + EXPECT_CALL(delegate_, OnRetransmissibleOnWireTimeout()); + clock_.AdvanceTime(initial_retransmissible_on_wire_timeout); alarm_->Fire(); - for (int i = 0; i < kMaxAggressiveRetransmittableOnWireCount; i++) { + for (int i = 0; i < kMaxAggressiveRetransmissibleOnWireCount; i++) { manager_.SetAlarm(clock_.ApproximateNow(), kShouldKeepAlive, !kHasInflightPackets); EXPECT_TRUE(alarm_->IsSet()); - EXPECT_EQ(initial_retransmittable_on_wire_timeout, + EXPECT_EQ(initial_retransmissible_on_wire_timeout, alarm_->deadline() - clock_.ApproximateNow()); - clock_.AdvanceTime(initial_retransmittable_on_wire_timeout); - EXPECT_CALL(delegate_, OnRetransmittableOnWireTimeout()); + clock_.AdvanceTime(initial_retransmissible_on_wire_timeout); + EXPECT_CALL(delegate_, OnRetransmissibleOnWireTimeout()); alarm_->Fire(); // Reset alarm with in flight packets. manager_.SetAlarm(clock_.ApproximateNow(), kShouldKeepAlive, @@ -320,33 +320,33 @@ TEST_F(QuicPingManagerTest, manager_.SetAlarm(clock_.ApproximateNow(), kShouldKeepAlive, !kHasInflightPackets); EXPECT_TRUE(alarm_->IsSet()); - EXPECT_EQ(initial_retransmittable_on_wire_timeout * 2, + EXPECT_EQ(initial_retransmissible_on_wire_timeout * 2, alarm_->deadline() - clock_.ApproximateNow()); - clock_.AdvanceTime(2 * initial_retransmittable_on_wire_timeout); - EXPECT_CALL(delegate_, OnRetransmittableOnWireTimeout()); + clock_.AdvanceTime(2 * initial_retransmissible_on_wire_timeout); + EXPECT_CALL(delegate_, OnRetransmissibleOnWireTimeout()); alarm_->Fire(); clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); - manager_.reset_consecutive_retransmittable_on_wire_count(); + manager_.reset_consecutive_retransmissible_on_wire_count(); manager_.SetAlarm(clock_.ApproximateNow(), kShouldKeepAlive, !kHasInflightPackets); EXPECT_TRUE(alarm_->IsSet()); - EXPECT_EQ(initial_retransmittable_on_wire_timeout, + EXPECT_EQ(initial_retransmissible_on_wire_timeout, alarm_->deadline() - clock_.ApproximateNow()); } -TEST_F(QuicPingManagerTest, RetransmittableOnWireLimit) { - static constexpr int kMaxRetransmittableOnWirePingCount = 3; - SetQuicFlag(quic_max_retransmittable_on_wire_ping_count, - kMaxRetransmittableOnWirePingCount); - static constexpr QuicTime::Delta initial_retransmittable_on_wire_timeout = +TEST_F(QuicPingManagerTest, RetransmissibleOnWireLimit) { + static constexpr int kMaxRetransmissibleOnWirePingCount = 3; + SetQuicFlag(quic_max_retransmissible_on_wire_ping_count, + kMaxRetransmissibleOnWirePingCount); + static constexpr QuicTime::Delta initial_retransmissible_on_wire_timeout = QuicTime::Delta::FromMilliseconds(200); static constexpr QuicTime::Delta kShortDelay = QuicTime::Delta::FromMilliseconds(5); - ASSERT_LT(kShortDelay * 10, initial_retransmittable_on_wire_timeout); - manager_.set_initial_retransmittable_on_wire_timeout( - initial_retransmittable_on_wire_timeout); + ASSERT_LT(kShortDelay * 10, initial_retransmissible_on_wire_timeout); + manager_.set_initial_retransmissible_on_wire_timeout( + initial_retransmissible_on_wire_timeout); clock_.AdvanceTime(kShortDelay); EXPECT_FALSE(alarm_->IsSet()); @@ -357,15 +357,15 @@ TEST_F(QuicPingManagerTest, RetransmittableOnWireLimit) { EXPECT_EQ(QuicTime::Delta::FromSeconds(kPingTimeoutSecs), alarm_->deadline() - clock_.ApproximateNow()); - for (int i = 0; i <= kMaxRetransmittableOnWirePingCount; i++) { + for (int i = 0; i <= kMaxRetransmissibleOnWirePingCount; i++) { clock_.AdvanceTime(kShortDelay); manager_.SetAlarm(clock_.ApproximateNow(), kShouldKeepAlive, !kHasInflightPackets); EXPECT_TRUE(alarm_->IsSet()); - EXPECT_EQ(initial_retransmittable_on_wire_timeout, + EXPECT_EQ(initial_retransmissible_on_wire_timeout, alarm_->deadline() - clock_.ApproximateNow()); - clock_.AdvanceTime(initial_retransmittable_on_wire_timeout); - EXPECT_CALL(delegate_, OnRetransmittableOnWireTimeout()); + clock_.AdvanceTime(initial_retransmissible_on_wire_timeout); + EXPECT_CALL(delegate_, OnRetransmissibleOnWireTimeout()); alarm_->Fire(); manager_.SetAlarm(clock_.ApproximateNow(), kShouldKeepAlive, kHasInflightPackets); @@ -383,24 +383,24 @@ TEST_F(QuicPingManagerTest, RetransmittableOnWireLimit) { EXPECT_FALSE(alarm_->IsSet()); } -TEST_F(QuicPingManagerTest, MaxRetransmittableOnWireDelayShift) { +TEST_F(QuicPingManagerTest, MaxRetransmissibleOnWireDelayShift) { QuicPingManagerPeer::SetPerspective(&manager_, Perspective::IS_SERVER); - const int kMaxAggressiveRetransmittableOnWireCount = 3; - SetQuicFlag(quic_max_aggressive_retransmittable_on_wire_ping_count, - kMaxAggressiveRetransmittableOnWireCount); - const QuicTime::Delta initial_retransmittable_on_wire_timeout = + const int kMaxAggressiveRetransmissibleOnWireCount = 3; + SetQuicFlag(quic_max_aggressive_retransmissible_on_wire_ping_count, + kMaxAggressiveRetransmissibleOnWireCount); + const QuicTime::Delta initial_retransmissible_on_wire_timeout = QuicTime::Delta::FromMilliseconds(200); - manager_.set_initial_retransmittable_on_wire_timeout( - initial_retransmittable_on_wire_timeout); + manager_.set_initial_retransmissible_on_wire_timeout( + initial_retransmissible_on_wire_timeout); - for (int i = 0; i <= kMaxAggressiveRetransmittableOnWireCount; i++) { + for (int i = 0; i <= kMaxAggressiveRetransmissibleOnWireCount; i++) { manager_.SetAlarm(clock_.ApproximateNow(), kShouldKeepAlive, !kHasInflightPackets); EXPECT_TRUE(alarm_->IsSet()); - EXPECT_EQ(initial_retransmittable_on_wire_timeout, + EXPECT_EQ(initial_retransmissible_on_wire_timeout, alarm_->deadline() - clock_.ApproximateNow()); - clock_.AdvanceTime(initial_retransmittable_on_wire_timeout); - EXPECT_CALL(delegate_, OnRetransmittableOnWireTimeout()); + clock_.AdvanceTime(initial_retransmissible_on_wire_timeout); + EXPECT_CALL(delegate_, OnRetransmissibleOnWireTimeout()); alarm_->Fire(); manager_.SetAlarm(clock_.ApproximateNow(), kShouldKeepAlive, kHasInflightPackets); @@ -410,15 +410,15 @@ TEST_F(QuicPingManagerTest, MaxRetransmittableOnWireDelayShift) { !kHasInflightPackets); EXPECT_TRUE(alarm_->IsSet()); if (i <= 10) { - EXPECT_EQ(initial_retransmittable_on_wire_timeout * (1 << i), + EXPECT_EQ(initial_retransmissible_on_wire_timeout * (1 << i), alarm_->deadline() - clock_.ApproximateNow()); } else { // Verify shift is capped. - EXPECT_EQ(initial_retransmittable_on_wire_timeout * (1 << 10), + EXPECT_EQ(initial_retransmissible_on_wire_timeout * (1 << 10), alarm_->deadline() - clock_.ApproximateNow()); } clock_.AdvanceTime(alarm_->deadline() - clock_.ApproximateNow()); - EXPECT_CALL(delegate_, OnRetransmittableOnWireTimeout()); + EXPECT_CALL(delegate_, OnRetransmissibleOnWireTimeout()); alarm_->Fire(); } } diff --git a/quiche/quic/core/quic_protocol_flags_list.h b/quiche/quic/core/quic_protocol_flags_list.h index 7644cbfb6..bcbf9960e 100644 --- a/quiche/quic/core/quic_protocol_flags_list.h +++ b/quiche/quic/core/quic_protocol_flags_list.h @@ -165,15 +165,15 @@ QUIC_PROTOCOL_FLAG( "The maximum amount of CRYPTO frame data that can be buffered.") QUIC_PROTOCOL_FLAG( - int32_t, quic_max_aggressive_retransmittable_on_wire_ping_count, 5, + int32_t, quic_max_aggressive_retransmissible_on_wire_ping_count, 5, "Maximum number of consecutive pings that can be sent with the " - "aggressive initial retransmittable on the wire timeout if there is " + "aggressive initial retransmissible on the wire timeout if there is " "no new stream data received. After this limit, the timeout will be " "doubled each ping until it exceeds the default ping timeout.") QUIC_PROTOCOL_FLAG( - int32_t, quic_max_retransmittable_on_wire_ping_count, 1000, - "Maximum number of pings that can be sent with the retransmittable " + int32_t, quic_max_retransmissible_on_wire_ping_count, 1000, + "Maximum number of pings that can be sent with the retransmissible " "on the wire timeout, over the lifetime of a connection. After this " "limit, the timeout will be the default ping timeout.") diff --git a/quiche/quic/core/quic_received_packet_manager.cc b/quiche/quic/core/quic_received_packet_manager.cc index 46cc259c4..f5c515936 100644 --- a/quiche/quic/core/quic_received_packet_manager.cc +++ b/quiche/quic/core/quic_received_packet_manager.cc @@ -43,9 +43,9 @@ QuicReceivedPacketManager::QuicReceivedPacketManager(QuicConnectionStats* stats) save_timestamps_(false), save_timestamps_for_in_order_packets_(false), stats_(stats), - num_retransmittable_packets_received_since_last_ack_sent_(0), + num_retransmissible_packets_received_since_last_ack_sent_(0), min_received_before_ack_decimation_(kMinReceivedBeforeAckDecimation), - ack_frequency_(kDefaultRetransmittablePacketsBeforeAck), + ack_frequency_(kDefaultRetransmissiblePacketsBeforeAck), ack_decimation_delay_(kAckDecimationDelay), unlimited_ack_decimation_(false), one_immediate_ack_(false), @@ -270,7 +270,7 @@ void QuicReceivedPacketManager::MaybeUpdateAckFrequency( } ack_frequency_ = unlimited_ack_decimation_ ? std::numeric_limits::max() - : kMaxRetransmittablePacketsBeforeAck; + : kMaxRetransmissiblePacketsBeforeAck; } void QuicReceivedPacketManager::MaybeUpdateAckTimeout( @@ -296,10 +296,10 @@ void QuicReceivedPacketManager::MaybeUpdateAckTimeout( return; } - ++num_retransmittable_packets_received_since_last_ack_sent_; + ++num_retransmissible_packets_received_since_last_ack_sent_; MaybeUpdateAckFrequency(last_received_packet_number); - if (num_retransmittable_packets_received_since_last_ack_sent_ >= + if (num_retransmissible_packets_received_since_last_ack_sent_ >= ack_frequency_) { ack_timeout_ = now; return; @@ -321,7 +321,7 @@ void QuicReceivedPacketManager::MaybeUpdateAckTimeout( void QuicReceivedPacketManager::ResetAckStates() { ack_frame_updated_ = false; ack_timeout_ = QuicTime::Zero(); - num_retransmittable_packets_received_since_last_ack_sent_ = 0; + num_retransmissible_packets_received_since_last_ack_sent_ = 0; last_sent_largest_acked_ = LargestAcked(ack_frame_); } diff --git a/quiche/quic/core/quic_received_packet_manager.h b/quiche/quic/core/quic_received_packet_manager.h index 1d24651e2..d1ce94b53 100644 --- a/quiche/quic/core/quic_received_packet_manager.h +++ b/quiche/quic/core/quic_received_packet_manager.h @@ -147,7 +147,7 @@ class QUICHE_EXPORT QuicReceivedPacketManager { void MaybeTrimAckRanges(); - // Least packet number of the the packet sent by the peer for which it + // Least packet number of the packet sent by the peer for which it // hasn't received an ack. QuicPacketNumber peer_least_packet_awaiting_ack_; @@ -178,8 +178,8 @@ class QUICHE_EXPORT QuicReceivedPacketManager { QuicConnectionStats* stats_; - // How many retransmittable packets have arrived without sending an ack. - QuicPacketCount num_retransmittable_packets_received_since_last_ack_sent_; + // How many retransmissible packets have arrived without sending an ack. + QuicPacketCount num_retransmissible_packets_received_since_last_ack_sent_; // Ack decimation will start happening after this many packets are received. size_t min_received_before_ack_decimation_; // Ack every n-th packet. diff --git a/quiche/quic/core/quic_received_packet_manager_test.cc b/quiche/quic/core/quic_received_packet_manager_test.cc index c09c21970..728321741 100644 --- a/quiche/quic/core/quic_received_packet_manager_test.cc +++ b/quiche/quic/core/quic_received_packet_manager_test.cc @@ -594,7 +594,7 @@ TEST_F(QuicReceivedPacketManagerTest, } TEST_F(QuicReceivedPacketManagerTest, - DisableMissingPaketsAckByIgnoreOrderFromAckFrequencyFrame) { + DisableMissingPacketsAckByIgnoreOrderFromAckFrequencyFrame) { EXPECT_FALSE(HasPendingAck()); QuicConfig config; config.SetConnectionOptionsToSend({kAFFE}); diff --git a/quiche/quic/core/quic_sent_packet_manager.cc b/quiche/quic/core/quic_sent_packet_manager.cc index 5786764ed..a77ad8e10 100644 --- a/quiche/quic/core/quic_sent_packet_manager.cc +++ b/quiche/quic/core/quic_sent_packet_manager.cc @@ -31,7 +31,7 @@ namespace quic { namespace { static const int64_t kDefaultRetransmissionTimeMs = 500; -// Ensure the handshake timer isnt't faster than 10ms. +// Ensure the handshake timer isn't faster than 10ms. // This limits the tenth retransmitted packet to 10s after the initial CHLO. static const int64_t kMinHandshakeTimeoutMs = 10; @@ -413,7 +413,7 @@ void QuicSentPacketManager::MarkInitialPacketsForRetransmission() { if (transmission_info->in_flight) { unacked_packets_.RemoveFromInFlight(transmission_info); } - if (unacked_packets_.HasRetransmittableFrames(*transmission_info)) { + if (unacked_packets_.HasRetransmissibleFrames(*transmission_info)) { MarkForRetransmission(packet_number, ALL_INITIAL_RETRANSMISSION); } } @@ -435,7 +435,7 @@ void QuicSentPacketManager::MarkZeroRttPacketsForRetransmission() { // because neither can be processed by the peer. unacked_packets_.RemoveFromInFlight(transmission_info); } - if (unacked_packets_.HasRetransmittableFrames(*transmission_info)) { + if (unacked_packets_.HasRetransmissibleFrames(*transmission_info)) { MarkForRetransmission(packet_number, ALL_ZERO_RTT_RETRANSMISSION); } } @@ -497,17 +497,17 @@ void QuicSentPacketManager::MarkForRetransmission( QuicPacketNumber packet_number, TransmissionType transmission_type) { QuicTransmissionInfo* transmission_info = unacked_packets_.GetMutableTransmissionInfo(packet_number); - // Packets without retransmittable frames can only be marked for loss + // Packets without retransmissible frames can only be marked for loss // retransmission. QUIC_BUG_IF(quic_bug_12552_2, transmission_type != LOSS_RETRANSMISSION && - !unacked_packets_.HasRetransmittableFrames( + !unacked_packets_.HasRetransmissibleFrames( *transmission_info)) << "packet number " << packet_number << " transmission_type: " << transmission_type << " transmission_info " << transmission_info->DebugString(); if (ShouldForceRetransmission(transmission_type)) { if (!unacked_packets_.RetransmitFrames( - QuicFrames(transmission_info->retransmittable_frames), + QuicFrames(transmission_info->retransmissible_frames), transmission_type)) { // Do not set packet state if the data is not fully retransmitted. // This should only happen if packet payload size decreases which can be @@ -524,7 +524,7 @@ void QuicSentPacketManager::MarkForRetransmission( } else { unacked_packets_.NotifyFramesLost(*transmission_info, transmission_type); - if (!transmission_info->retransmittable_frames.empty()) { + if (!transmission_info->retransmissible_frames.empty()) { if (transmission_type == LOSS_RETRANSMISSION) { // Record the first packet sent after loss, which allows to wait 1 // more RTT before giving up on this lost packet. @@ -564,7 +564,7 @@ void QuicSentPacketManager::MarkPacketHandled(QuicPacketNumber packet_number, QuicTime::Delta ack_delay_time, QuicTime receive_timestamp) { if (info->has_ack_frequency) { - for (const auto& frame : info->retransmittable_frames) { + for (const auto& frame : info->retransmissible_frames) { if (frame.type == ACK_FREQUENCY_FRAME) { OnAckFrequencyFrameAcked(*frame.ack_frequency_frame); } @@ -613,7 +613,7 @@ void QuicSentPacketManager::MarkPacketHandled(QuicPacketNumber packet_number, network_change_visitor_->OnPathMtuIncreased(largest_mtu_acked_); } unacked_packets_.RemoveFromInFlight(info); - unacked_packets_.RemoveRetransmittability(info); + unacked_packets_.RemoveRetransmissibility(info); info->state = ACKED; } @@ -631,7 +631,7 @@ QuicAckFrequencyFrame QuicSentPacketManager::GetUpdatedAckFrequencyFrame() } QUIC_RELOADABLE_FLAG_COUNT_N(quic_can_send_ack_frequency, 1, 3); - frame.packet_tolerance = kMaxRetransmittablePacketsBeforeAck; + frame.packet_tolerance = kMaxRetransmissiblePacketsBeforeAck; auto rtt = use_smoothed_rtt_in_ack_delay_ ? rtt_stats_.SmoothedOrInitialRtt() : rtt_stats_.MinOrInitialRtt(); frame.max_ack_delay = rtt * kAckDecimationDelay; @@ -669,7 +669,7 @@ void QuicSentPacketManager::RecordEcnMarkingSent(QuicEcnCodepoint ecn_codepoint, bool QuicSentPacketManager::OnPacketSent( SerializedPacket* mutable_packet, QuicTime sent_time, TransmissionType transmission_type, - HasRetransmittableData has_retransmittable_data, bool measure_rtt, + HasRetransmissibleData has_retransmissible_data, bool measure_rtt, QuicEcnCodepoint ecn_codepoint) { const SerializedPacket& packet = *mutable_packet; QuicPacketNumber packet_number = packet.packet_number; @@ -681,9 +681,9 @@ bool QuicSentPacketManager::OnPacketSent( --pending_timer_transmission_count_; } - bool in_flight = has_retransmittable_data == HAS_RETRANSMITTABLE_DATA; - if (ignore_pings_ && mutable_packet->retransmittable_frames.size() == 1 && - mutable_packet->retransmittable_frames[0].type == PING_FRAME) { + bool in_flight = has_retransmissible_data == HAS_RETRANSMISSIBLE_DATA; + if (ignore_pings_ && mutable_packet->retransmissible_frames.size() == 1 && + mutable_packet->retransmissible_frames[0].type == PING_FRAME) { // Dot not use PING only packet for RTT measure or congestion control. in_flight = false; measure_rtt = false; @@ -691,17 +691,17 @@ bool QuicSentPacketManager::OnPacketSent( if (using_pacing_) { pacing_sender_.OnPacketSent(sent_time, unacked_packets_.bytes_in_flight(), packet_number, packet.encrypted_length, - has_retransmittable_data); + has_retransmissible_data); } else { send_algorithm_->OnPacketSent(sent_time, unacked_packets_.bytes_in_flight(), packet_number, packet.encrypted_length, - has_retransmittable_data); + has_retransmissible_data); } // Deallocate message data in QuicMessageFrame immediately after packet // sent. if (packet.has_message) { - for (auto& frame : mutable_packet->retransmittable_frames) { + for (auto& frame : mutable_packet->retransmissible_frames) { if (frame.type == MESSAGE_FRAME) { frame.message_frame->message_data.clear(); frame.message_frame->message_length = 0; @@ -710,7 +710,7 @@ bool QuicSentPacketManager::OnPacketSent( } if (packet.has_ack_frequency) { - for (const auto& frame : packet.retransmittable_frames) { + for (const auto& frame : packet.retransmissible_frames) { if (frame.type == ACK_FREQUENCY_FRAME) { OnAckFrequencyFrameSent(*frame.ack_frequency_frame); } @@ -781,7 +781,7 @@ void QuicSentPacketManager::RetransmitCryptoPackets() { if (!transmission_info->in_flight || transmission_info->state != OUTSTANDING || !transmission_info->has_crypto_handshake || - !unacked_packets_.HasRetransmittableFrames(*transmission_info)) { + !unacked_packets_.HasRetransmissibleFrames(*transmission_info)) { continue; } packet_retransmitted = true; @@ -808,7 +808,7 @@ bool QuicSentPacketManager::MaybeRetransmitOldestPacket(TransmissionType type) { // sent. if (!transmission_info->in_flight || transmission_info->state != OUTSTANDING || - !unacked_packets_.HasRetransmittableFrames(*transmission_info)) { + !unacked_packets_.HasRetransmissibleFrames(*transmission_info)) { continue; } MarkForRetransmission(packet_number, type); @@ -816,7 +816,7 @@ bool QuicSentPacketManager::MaybeRetransmitOldestPacket(TransmissionType type) { } } QUIC_DVLOG(1) - << "No retransmittable packets, so RetransmitOldestPacket failed."; + << "No retransmissible packets, so RetransmitOldestPacket failed."; return false; } @@ -845,7 +845,7 @@ void QuicSentPacketManager::MaybeSendProbePacket() { QuicTransmissionInfo* transmission_info = unacked_packets_.GetMutableTransmissionInfo(packet_number); if (transmission_info->state == OUTSTANDING && - unacked_packets_.HasRetransmittableFrames(*transmission_info) && + unacked_packets_.HasRetransmissibleFrames(*transmission_info) && (!supports_multiple_packet_number_spaces() || unacked_packets_.GetPacketNumberSpace( transmission_info->encryption_level) == packet_number_space)) { @@ -887,7 +887,7 @@ void QuicSentPacketManager::RetransmitDataOfSpaceIfAny( QuicTransmissionInfo* transmission_info = unacked_packets_.GetMutableTransmissionInfo(packet_number); if (transmission_info->state == OUTSTANDING && - unacked_packets_.HasRetransmittableFrames(*transmission_info) && + unacked_packets_.HasRetransmissibleFrames(*transmission_info) && unacked_packets_.GetPacketNumberSpace( transmission_info->encryption_level) == space) { QUICHE_DCHECK(transmission_info->in_flight); @@ -1197,7 +1197,7 @@ QuicSentPacketManager::OnConnectionMigration(bool reset_send_algorithm) { unacked_packets_.RemoveFromInFlight(packet_number); // Retransmitting these packets with PATH_CHANGE_RETRANSMISSION will mark // them as useless, thus not contributing to RTT stats. - if (unacked_packets_.HasRetransmittableFrames(packet_number)) { + if (unacked_packets_.HasRetransmissibleFrames(packet_number)) { MarkForRetransmission(packet_number, PATH_RETRANSMISSION); QUICHE_DCHECK_EQ(it->state, NOT_CONTRIBUTING_RTT); } diff --git a/quiche/quic/core/quic_sent_packet_manager.h b/quiche/quic/core/quic_sent_packet_manager.h index 133b7ae3d..9f6ad21fb 100644 --- a/quiche/quic/core/quic_sent_packet_manager.h +++ b/quiche/quic/core/quic_sent_packet_manager.h @@ -42,7 +42,7 @@ struct QuicConnectionStats; // Class which tracks the set of packets sent on a QUIC connection and contains // a send algorithm to decide when to send new packets. It keeps track of any -// retransmittable data associated with each packet. If a packet is +// retransmissible data associated with each packet. If a packet is // retransmitted, it will keep track of each version of a packet so that if a // previous transmission is acked, the data will not be retransmitted. class QUICHE_EXPORT QuicSentPacketManager { @@ -197,7 +197,7 @@ class QUICHE_EXPORT QuicSentPacketManager { // Retransmits the oldest pending packet. bool MaybeRetransmitOldestPacket(TransmissionType type); - // Removes the retransmittable frames from all unencrypted packets to ensure + // Removes the retransmissible frames from all unencrypted packets to ensure // they don't get retransmitted. void NeuterUnencryptedPackets(); @@ -223,7 +223,7 @@ class QUICHE_EXPORT QuicSentPacketManager { // retransmission timer. bool OnPacketSent(SerializedPacket* mutable_packet, QuicTime sent_time, TransmissionType transmission_type, - HasRetransmittableData has_retransmittable_data, + HasRetransmissibleData has_retransmissible_data, bool measure_rtt, QuicEcnCodepoint ecn_codepoint); bool CanSendAckFrequency() const; @@ -243,7 +243,7 @@ class QUICHE_EXPORT QuicSentPacketManager { // Returns the current delay for the retransmission timer, which may send // either a tail loss probe or do a full RTO. Returns QuicTime::Zero() if - // there are no retransmittable packets. + // there are no retransmissible packets. const QuicTime GetRetransmissionTime() const; // Returns the current delay for the path degrading timer, which is used to @@ -254,7 +254,7 @@ class QUICHE_EXPORT QuicSentPacketManager { const QuicTime::Delta GetNetworkBlackholeDelay( int8_t num_rtos_for_blackhole_detection) const; - // Returns the delay before reducing max packet size. This delay is guranteed + // Returns the delay before reducing max packet size. This delay is guaranteed // to be smaller than the network blackhole delay. QuicTime::Delta GetMtuReductionDelay( int8_t num_rtos_for_blackhole_detection) const; @@ -304,7 +304,7 @@ class QUICHE_EXPORT QuicSentPacketManager { return send_algorithm_->PacingRate(GetBytesInFlight()); } - // Returns the size of the slow start congestion window in nume of 1460 byte + // Returns the size of the slow start congestion window in number of 1460 byte // TCP segments, aka ssthresh. Some send algorithms do not define a slow // start threshold and will return 0. QuicPacketCount GetSlowStartThresholdInTcpMss() const { @@ -526,7 +526,7 @@ class QUICHE_EXPORT QuicSentPacketManager { absl::optional ecn_counts, const QuicEcnCounts& previous_counts); - // Removes the retransmittability and in flight properties from the packet at + // Removes the retransmissibility and in flight properties from the packet at // |info| due to receipt by the peer. void MarkPacketHandled(QuicPacketNumber packet_number, QuicTransmissionInfo* info, QuicTime ack_receive_time, @@ -554,7 +554,7 @@ class QUICHE_EXPORT QuicSentPacketManager { // this function. void RecordOneSpuriousRetransmission(const QuicTransmissionInfo& info); - // Called when handshake is confirmed to remove the retransmittable frames + // Called when handshake is confirmed to remove the retransmissible frames // from all packets of HANDSHAKE_DATA packet number space to ensure they don't // get retransmitted and will eventually be removed from unacked packets map. void NeuterHandshakePackets(); @@ -595,13 +595,13 @@ class QUICHE_EXPORT QuicSentPacketManager { void RecordEcnMarkingSent(QuicEcnCodepoint ecn_codepoint, EncryptionLevel level); - // Newly serialized retransmittable packets are added to this map, which + // Newly serialized retransmissible packets are added to this map, which // contains owning pointers to any contained frames. If a packet is // retransmitted, this map will contain entries for both the old and the new - // packet. The old packet's retransmittable frames entry will be nullptr, + // packet. The old packet's retransmissible frames entry will be nullptr, // while the new packet's entry will contain the frames to retransmit. // If the old packet is acked before the new packet, then the old entry will - // be removed from the map and the new entry's retransmittable frames will be + // be removed from the map and the new entry's retransmissible frames will be // set to nullptr. QuicUnackedPacketMap unacked_packets_; diff --git a/quiche/quic/core/quic_sent_packet_manager_test.cc b/quiche/quic/core/quic_sent_packet_manager_test.cc index d222b6b37..459231292 100644 --- a/quiche/quic/core/quic_sent_packet_manager_test.cc +++ b/quiche/quic/core/quic_sent_packet_manager_test.cc @@ -66,13 +66,13 @@ class QuicSentPacketManagerTest : public QuicTest { EXPECT_CALL( *send_algorithm_, OnPacketSent(_, BytesInFlight(), QuicPacketNumber(packet_number), - kDefaultLength, HAS_RETRANSMITTABLE_DATA)); + kDefaultLength, HAS_RETRANSMISSIBLE_DATA)); SerializedPacket packet(CreatePacket(packet_number, false)); - packet.retransmittable_frames.push_back( + packet.retransmissible_frames.push_back( QuicFrame(QuicStreamFrame(1, false, 0, absl::string_view()))); packet.has_crypto_handshake = IS_HANDSHAKE; manager_.OnPacketSent(&packet, clock_.Now(), HANDSHAKE_RETRANSMISSION, - HAS_RETRANSMITTABLE_DATA, true, ECN_NOT_ECT); + HAS_RETRANSMISSIBLE_DATA, true, ECN_NOT_ECT); return true; } @@ -81,10 +81,10 @@ class QuicSentPacketManagerTest : public QuicTest { EXPECT_CALL( *send_algorithm_, OnPacketSent(_, BytesInFlight(), QuicPacketNumber(packet_number), - kDefaultLength, HAS_RETRANSMITTABLE_DATA)); + kDefaultLength, HAS_RETRANSMISSIBLE_DATA)); SerializedPacket packet(CreatePacket(packet_number, true)); packet.encryption_level = level; - manager_.OnPacketSent(&packet, clock_.Now(), type, HAS_RETRANSMITTABLE_DATA, + manager_.OnPacketSent(&packet, clock_.Now(), type, HAS_RETRANSMISSIBLE_DATA, true, ECN_NOT_ECT); return true; } @@ -129,7 +129,7 @@ class QuicSentPacketManagerTest : public QuicTest { void VerifyUnackedPackets(uint64_t* packets, size_t num_packets) { if (num_packets == 0) { EXPECT_TRUE(manager_.unacked_packets().empty()); - EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetNumRetransmittablePackets( + EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetNumRetransmissiblePackets( &manager_)); return; } @@ -143,12 +143,12 @@ class QuicSentPacketManagerTest : public QuicTest { } } - void VerifyRetransmittablePackets(uint64_t* packets, size_t num_packets) { + void VerifyRetransmissiblePackets(uint64_t* packets, size_t num_packets) { EXPECT_EQ( num_packets, - QuicSentPacketManagerPeer::GetNumRetransmittablePackets(&manager_)); + QuicSentPacketManagerPeer::GetNumRetransmissiblePackets(&manager_)); for (size_t i = 0; i < num_packets; ++i) { - EXPECT_TRUE(QuicSentPacketManagerPeer::HasRetransmittableFrames( + EXPECT_TRUE(QuicSentPacketManagerPeer::HasRetransmissibleFrames( &manager_, packets[i])) << " packets[" << i << "]:" << packets[i]; } @@ -229,22 +229,22 @@ class QuicSentPacketManagerTest : public QuicTest { EXPECT_CALL( *send_algorithm_, OnPacketSent(_, BytesInFlight(), QuicPacketNumber(new_packet_number), - kDefaultLength, HAS_RETRANSMITTABLE_DATA)); + kDefaultLength, HAS_RETRANSMISSIBLE_DATA)); SerializedPacket packet(CreatePacket(new_packet_number, true)); manager_.OnPacketSent(&packet, clock_.Now(), transmission_type, - HAS_RETRANSMITTABLE_DATA, true, ECN_NOT_ECT); + HAS_RETRANSMISSIBLE_DATA, true, ECN_NOT_ECT); } SerializedPacket CreateDataPacket(uint64_t packet_number) { return CreatePacket(packet_number, true); } - SerializedPacket CreatePacket(uint64_t packet_number, bool retransmittable) { + SerializedPacket CreatePacket(uint64_t packet_number, bool retransmissible) { SerializedPacket packet(QuicPacketNumber(packet_number), PACKET_4BYTE_PACKET_NUMBER, nullptr, kDefaultLength, false, false); - if (retransmittable) { - packet.retransmittable_frames.push_back( + if (retransmissible) { + packet.retransmissible_frames.push_back( QuicFrame(QuicStreamFrame(kStreamId, false, 0, absl::string_view()))); } return packet; @@ -254,7 +254,7 @@ class QuicSentPacketManagerTest : public QuicTest { SerializedPacket packet(QuicPacketNumber(packet_number), PACKET_4BYTE_PACKET_NUMBER, nullptr, kDefaultLength, false, false); - packet.retransmittable_frames.push_back(QuicFrame(QuicPingFrame())); + packet.retransmissible_frames.push_back(QuicFrame(QuicPingFrame())); return packet; } @@ -275,7 +275,7 @@ class QuicSentPacketManagerTest : public QuicTest { SerializedPacket packet(CreateDataPacket(packet_number)); packet.encryption_level = encryption_level; manager_.OnPacketSent(&packet, clock_.Now(), NOT_RETRANSMISSION, - HAS_RETRANSMITTABLE_DATA, true, ecn_codepoint); + HAS_RETRANSMISSIBLE_DATA, true, ecn_codepoint); } void SendPingPacket(uint64_t packet_number, @@ -286,20 +286,20 @@ class QuicSentPacketManagerTest : public QuicTest { SerializedPacket packet(CreatePingPacket(packet_number)); packet.encryption_level = encryption_level; manager_.OnPacketSent(&packet, clock_.Now(), NOT_RETRANSMISSION, - HAS_RETRANSMITTABLE_DATA, true, ECN_NOT_ECT); + HAS_RETRANSMISSIBLE_DATA, true, ECN_NOT_ECT); } void SendCryptoPacket(uint64_t packet_number) { EXPECT_CALL( *send_algorithm_, OnPacketSent(_, BytesInFlight(), QuicPacketNumber(packet_number), - kDefaultLength, HAS_RETRANSMITTABLE_DATA)); + kDefaultLength, HAS_RETRANSMISSIBLE_DATA)); SerializedPacket packet(CreatePacket(packet_number, false)); - packet.retransmittable_frames.push_back( + packet.retransmissible_frames.push_back( QuicFrame(QuicStreamFrame(1, false, 0, absl::string_view()))); packet.has_crypto_handshake = IS_HANDSHAKE; manager_.OnPacketSent(&packet, clock_.Now(), NOT_RETRANSMISSION, - HAS_RETRANSMITTABLE_DATA, true, ECN_NOT_ECT); + HAS_RETRANSMISSIBLE_DATA, true, ECN_NOT_ECT); EXPECT_CALL(notifier_, HasUnackedCryptoData()).WillRepeatedly(Return(true)); } @@ -312,12 +312,12 @@ class QuicSentPacketManagerTest : public QuicTest { EXPECT_CALL( *send_algorithm_, OnPacketSent(_, BytesInFlight(), QuicPacketNumber(packet_number), - kDefaultLength, NO_RETRANSMITTABLE_DATA)); + kDefaultLength, NO_RETRANSMISSIBLE_DATA)); SerializedPacket packet(CreatePacket(packet_number, false)); packet.largest_acked = QuicPacketNumber(largest_acked); packet.encryption_level = level; manager_.OnPacketSent(&packet, clock_.Now(), NOT_RETRANSMISSION, - NO_RETRANSMITTABLE_DATA, true, ECN_NOT_ECT); + NO_RETRANSMISSIBLE_DATA, true, ECN_NOT_ECT); } quiche::SimpleBufferAllocator allocator_; @@ -335,9 +335,9 @@ TEST_F(QuicSentPacketManagerTest, IsUnacked) { uint64_t unacked[] = {1}; VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); - uint64_t retransmittable[] = {1}; - VerifyRetransmittablePackets(retransmittable, - ABSL_ARRAYSIZE(retransmittable)); + uint64_t retransmissible[] = {1}; + VerifyRetransmissiblePackets(retransmissible, + ABSL_ARRAYSIZE(retransmissible)); } TEST_F(QuicSentPacketManagerTest, IsUnAckedRetransmit) { @@ -347,8 +347,8 @@ TEST_F(QuicSentPacketManagerTest, IsUnAckedRetransmit) { EXPECT_TRUE(QuicSentPacketManagerPeer::IsRetransmission(&manager_, 2)); uint64_t unacked[] = {1, 2}; VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); - std::vector retransmittable = {1, 2}; - VerifyRetransmittablePackets(&retransmittable[0], retransmittable.size()); + std::vector retransmissible = {1, 2}; + VerifyRetransmissiblePackets(&retransmissible[0], retransmissible.size()); } TEST_F(QuicSentPacketManagerTest, RetransmitThenAck) { @@ -364,11 +364,11 @@ TEST_F(QuicSentPacketManagerTest, RetransmitThenAck) { manager_.OnAckFrameEnd(clock_.Now(), QuicPacketNumber(1), ENCRYPTION_INITIAL, kEmptyCounts)); EXPECT_CALL(notifier_, IsFrameOutstanding(_)).WillRepeatedly(Return(false)); - // Packet 1 is unacked, pending, but not retransmittable. + // Packet 1 is unacked, pending, but not retransmissible. uint64_t unacked[] = {1}; VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); EXPECT_TRUE(manager_.HasInFlightPackets()); - VerifyRetransmittablePackets(nullptr, 0); + VerifyRetransmissiblePackets(nullptr, 0); } TEST_F(QuicSentPacketManagerTest, RetransmitThenAckBeforeSend) { @@ -392,7 +392,7 @@ TEST_F(QuicSentPacketManagerTest, RetransmitThenAckBeforeSend) { uint64_t unacked[] = {2}; VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); // We do not know packet 2 is a spurious retransmission until it gets acked. - VerifyRetransmittablePackets(nullptr, 0); + VerifyRetransmissiblePackets(nullptr, 0); EXPECT_EQ(0u, stats_.packets_spuriously_retransmitted); } @@ -406,7 +406,7 @@ TEST_F(QuicSentPacketManagerTest, RetransmitThenStopRetransmittingBeforeSend) { uint64_t unacked[] = {1}; VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); - VerifyRetransmittablePackets(nullptr, 0); + VerifyRetransmissiblePackets(nullptr, 0); EXPECT_EQ(0u, stats_.packets_spuriously_retransmitted); } @@ -425,11 +425,11 @@ TEST_F(QuicSentPacketManagerTest, RetransmitThenAckPrevious) { manager_.OnAckFrameEnd(clock_.Now(), QuicPacketNumber(1), ENCRYPTION_INITIAL, kEmptyCounts)); EXPECT_CALL(notifier_, IsFrameOutstanding(_)).WillRepeatedly(Return(false)); - // 2 remains unacked, but no packets have retransmittable data. + // 2 remains unacked, but no packets have retransmissible data. uint64_t unacked[] = {2}; VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); EXPECT_TRUE(manager_.HasInFlightPackets()); - VerifyRetransmittablePackets(nullptr, 0); + VerifyRetransmissiblePackets(nullptr, 0); // Ack 2 causes 2 be considered as spurious retransmission. EXPECT_CALL(notifier_, OnFrameAcked(_, _, _)).WillOnce(Return(false)); ExpectAck(2); @@ -449,7 +449,7 @@ TEST_F(QuicSentPacketManagerTest, RetransmitThenAckPreviousThenNackRetransmit) { QuicTime::Delta rtt = QuicTime::Delta::FromMilliseconds(15); clock_.AdvanceTime(rtt); - // First, ACK packet 1 which makes packet 2 non-retransmittable. + // First, ACK packet 1 which makes packet 2 non-retransmissible. ExpectAck(1); manager_.OnAckFrameStart(QuicPacketNumber(1), QuicTime::Delta::Infinite(), clock_.Now()); @@ -496,10 +496,10 @@ TEST_F(QuicSentPacketManagerTest, RetransmitThenAckPreviousThenNackRetransmit) { uint64_t unacked[] = {2}; VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); EXPECT_FALSE(manager_.HasInFlightPackets()); - VerifyRetransmittablePackets(nullptr, 0); + VerifyRetransmissiblePackets(nullptr, 0); // Verify that the retransmission alarm would not fire, - // since there is no retransmittable data outstanding. + // since there is no retransmissible data outstanding. EXPECT_EQ(QuicTime::Zero(), manager_.GetRetransmissionTime()); } @@ -528,10 +528,10 @@ TEST_F(QuicSentPacketManagerTest, uint64_t unacked[] = {2}; VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); EXPECT_FALSE(manager_.HasInFlightPackets()); - VerifyRetransmittablePackets(nullptr, 0); + VerifyRetransmissiblePackets(nullptr, 0); // Verify that the retransmission alarm would not fire, - // since there is no retransmittable data outstanding. + // since there is no retransmissible data outstanding. EXPECT_EQ(QuicTime::Zero(), manager_.GetRetransmissionTime()); } @@ -561,11 +561,11 @@ TEST_F(QuicSentPacketManagerTest, RetransmitTwiceThenAckFirst) { .Times(2) .WillRepeatedly(Return(false)); - // 2 and 3 remain unacked, but no packets have retransmittable data. + // 2 and 3 remain unacked, but no packets have retransmissible data. uint64_t unacked[] = {2, 3}; VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); EXPECT_TRUE(manager_.HasInFlightPackets()); - VerifyRetransmittablePackets(nullptr, 0); + VerifyRetransmissiblePackets(nullptr, 0); // Ensure packet 2 is lost when 4 is sent and 3 and 4 are acked. SendDataPacket(4); @@ -956,7 +956,7 @@ TEST_F(QuicSentPacketManagerTest, EXPECT_FALSE(manager_.HasUnackedCryptoPackets()); uint64_t unacked[] = {1, 2, 3}; VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); - VerifyRetransmittablePackets(nullptr, 0); + VerifyRetransmissiblePackets(nullptr, 0); EXPECT_FALSE(manager_.HasUnackedCryptoPackets()); EXPECT_FALSE(manager_.HasInFlightPackets()); @@ -970,7 +970,7 @@ TEST_F(QuicSentPacketManagerTest, manager_.OnAckFrameEnd(clock_.Now(), QuicPacketNumber(1), ENCRYPTION_INITIAL, kEmptyCounts)); VerifyUnackedPackets(nullptr, 0); - VerifyRetransmittablePackets(nullptr, 0); + VerifyRetransmissiblePackets(nullptr, 0); } TEST_F(QuicSentPacketManagerTest, GetTransmissionTime) { @@ -1521,7 +1521,7 @@ TEST_F(QuicSentPacketManagerTest, EXPECT_EQ(QuicTime::Delta::FromMilliseconds(30), manager_.GetRttStats()->latest_rtt()); - // Migrate again with in-flight packet5 whose retransmittable frames are all + // Migrate again with in-flight packet5 whose retransmissible frames are all // ACKed. Packet5 should be marked for retransmission but nothing to // retransmit. EXPECT_CALL(notifier_, IsFrameOutstanding(_)).WillOnce(Return(false)); @@ -1561,7 +1561,7 @@ TEST_F(QuicSentPacketManagerTest, PathMtuIncreased) { SerializedPacket packet(QuicPacketNumber(1), PACKET_4BYTE_PACKET_NUMBER, nullptr, kDefaultLength + 100, false, false); manager_.OnPacketSent(&packet, clock_.Now(), NOT_RETRANSMISSION, - HAS_RETRANSMITTABLE_DATA, true, ECN_NOT_ECT); + HAS_RETRANSMISSIBLE_DATA, true, ECN_NOT_ECT); // Ack the large packet and expect the path MTU to increase. ExpectAck(1); @@ -1650,18 +1650,18 @@ TEST_F(QuicSentPacketManagerTest, MultiplePacketNumberSpaces) { QuicSentPacketManagerPeer::GetUnackedPacketMap(&manager_); EXPECT_FALSE( unacked_packets - ->GetLargestSentRetransmittableOfPacketNumberSpace(INITIAL_DATA) + ->GetLargestSentRetransmissibleOfPacketNumberSpace(INITIAL_DATA) .IsInitialized()); EXPECT_FALSE( manager_.GetLargestAckedPacket(ENCRYPTION_INITIAL).IsInitialized()); // Send packet 1. SendDataPacket(1, ENCRYPTION_INITIAL); EXPECT_EQ(QuicPacketNumber(1), - unacked_packets->GetLargestSentRetransmittableOfPacketNumberSpace( + unacked_packets->GetLargestSentRetransmissibleOfPacketNumberSpace( INITIAL_DATA)); EXPECT_FALSE( unacked_packets - ->GetLargestSentRetransmittableOfPacketNumberSpace(HANDSHAKE_DATA) + ->GetLargestSentRetransmissibleOfPacketNumberSpace(HANDSHAKE_DATA) .IsInitialized()); // Ack packet 1. ExpectAck(1); @@ -1679,14 +1679,14 @@ TEST_F(QuicSentPacketManagerTest, MultiplePacketNumberSpaces) { SendDataPacket(2, ENCRYPTION_HANDSHAKE); SendDataPacket(3, ENCRYPTION_HANDSHAKE); EXPECT_EQ(QuicPacketNumber(1), - unacked_packets->GetLargestSentRetransmittableOfPacketNumberSpace( + unacked_packets->GetLargestSentRetransmissibleOfPacketNumberSpace( INITIAL_DATA)); EXPECT_EQ(QuicPacketNumber(3), - unacked_packets->GetLargestSentRetransmittableOfPacketNumberSpace( + unacked_packets->GetLargestSentRetransmissibleOfPacketNumberSpace( HANDSHAKE_DATA)); EXPECT_FALSE( unacked_packets - ->GetLargestSentRetransmittableOfPacketNumberSpace(APPLICATION_DATA) + ->GetLargestSentRetransmissibleOfPacketNumberSpace(APPLICATION_DATA) .IsInitialized()); // Ack packet 2. ExpectAck(2); @@ -1716,13 +1716,13 @@ TEST_F(QuicSentPacketManagerTest, MultiplePacketNumberSpaces) { SendDataPacket(4, ENCRYPTION_ZERO_RTT); SendDataPacket(5, ENCRYPTION_ZERO_RTT); EXPECT_EQ(QuicPacketNumber(1), - unacked_packets->GetLargestSentRetransmittableOfPacketNumberSpace( + unacked_packets->GetLargestSentRetransmissibleOfPacketNumberSpace( INITIAL_DATA)); EXPECT_EQ(QuicPacketNumber(3), - unacked_packets->GetLargestSentRetransmittableOfPacketNumberSpace( + unacked_packets->GetLargestSentRetransmissibleOfPacketNumberSpace( HANDSHAKE_DATA)); EXPECT_EQ(QuicPacketNumber(5), - unacked_packets->GetLargestSentRetransmittableOfPacketNumberSpace( + unacked_packets->GetLargestSentRetransmissibleOfPacketNumberSpace( APPLICATION_DATA)); // Ack packet 5. ExpectAck(5); @@ -1744,13 +1744,13 @@ TEST_F(QuicSentPacketManagerTest, MultiplePacketNumberSpaces) { SendDataPacket(7, ENCRYPTION_FORWARD_SECURE); SendDataPacket(8, ENCRYPTION_FORWARD_SECURE); EXPECT_EQ(QuicPacketNumber(1), - unacked_packets->GetLargestSentRetransmittableOfPacketNumberSpace( + unacked_packets->GetLargestSentRetransmissibleOfPacketNumberSpace( INITIAL_DATA)); EXPECT_EQ(QuicPacketNumber(3), - unacked_packets->GetLargestSentRetransmittableOfPacketNumberSpace( + unacked_packets->GetLargestSentRetransmissibleOfPacketNumberSpace( HANDSHAKE_DATA)); EXPECT_EQ(QuicPacketNumber(8), - unacked_packets->GetLargestSentRetransmittableOfPacketNumberSpace( + unacked_packets->GetLargestSentRetransmissibleOfPacketNumberSpace( APPLICATION_DATA)); // Ack all packets. uint64_t acked[] = {4, 6, 7, 8}; @@ -2464,7 +2464,7 @@ TEST_F(QuicSentPacketManagerTest, SetHandshakeConfirmed) { manager_.SetHandshakeConfirmed(); } -// Regresstion test for b/148841700. +// Regression test for b/148841700. TEST_F(QuicSentPacketManagerTest, NeuterUnencryptedPackets) { SendCryptoPacket(1); SendPingPacket(2, ENCRYPTION_INITIAL); @@ -2740,11 +2740,11 @@ TEST_F(QuicSentPacketManagerTest, SendPathChallengeAndGetAck) { SerializedPacket packet(packet_number, PACKET_4BYTE_PACKET_NUMBER, nullptr, kDefaultLength, false, false); QuicPathFrameBuffer path_frame_buffer{0, 1, 2, 3, 4, 5, 6, 7}; - packet.nonretransmittable_frames.push_back( + packet.nonretransmissible_frames.push_back( QuicFrame(QuicPathChallengeFrame(0, path_frame_buffer))); packet.encryption_level = ENCRYPTION_FORWARD_SECURE; manager_.OnPacketSent(&packet, clock_.Now(), NOT_RETRANSMISSION, - NO_RETRANSMITTABLE_DATA, false, ECN_NOT_ECT); + NO_RETRANSMISSIBLE_DATA, false, ECN_NOT_ECT); clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(10)); EXPECT_CALL( *send_algorithm_, @@ -2771,7 +2771,7 @@ SerializedPacket MakePacketWithAckFrequencyFrame( PACKET_4BYTE_PACKET_NUMBER, nullptr, kDefaultLength, /*has_ack=*/false, /*has_stop_waiting=*/false); - packet.retransmittable_frames.push_back(QuicFrame(ack_frequency_frame)); + packet.retransmissible_frames.push_back(QuicFrame(ack_frequency_frame)); packet.has_ack_frequency = true; packet.encryption_level = ENCRYPTION_FORWARD_SECURE; return packet; @@ -2796,7 +2796,7 @@ TEST_F(QuicSentPacketManagerTest, plus_1_ms_delay); // Higher on the fly max_ack_delay changes peer_max_ack_delay. manager_.OnPacketSent(&packet1, clock_.Now(), NOT_RETRANSMISSION, - HAS_RETRANSMITTABLE_DATA, /*measure_rtt=*/true, + HAS_RETRANSMISSIBLE_DATA, /*measure_rtt=*/true, ECN_NOT_ECT); EXPECT_EQ(manager_.peer_max_ack_delay(), plus_1_ms_delay); manager_.OnAckFrameStart(QuicPacketNumber(1), QuicTime::Delta::Infinite(), @@ -2812,7 +2812,7 @@ TEST_F(QuicSentPacketManagerTest, minus_1_ms_delay); // Lower on the fly max_ack_delay does not change peer_max_ack_delay. manager_.OnPacketSent(&packet2, clock_.Now(), NOT_RETRANSMISSION, - HAS_RETRANSMITTABLE_DATA, /*measure_rtt=*/true, + HAS_RETRANSMISSIBLE_DATA, /*measure_rtt=*/true, ECN_NOT_ECT); EXPECT_EQ(manager_.peer_max_ack_delay(), plus_1_ms_delay); manager_.OnAckFrameStart(QuicPacketNumber(2), QuicTime::Delta::Infinite(), @@ -2843,21 +2843,21 @@ TEST_F(QuicSentPacketManagerTest, SerializedPacket packet3 = MakePacketWithAckFrequencyFrame( /*packet_number=*/3, /*ack_frequency_sequence_number=*/3, extra_2_ms); - // Send frame1, farme2, frame3. + // Send frame1, frame2, frame3. manager_.OnPacketSent(&packet1, clock_.Now(), NOT_RETRANSMISSION, - HAS_RETRANSMITTABLE_DATA, /*measure_rtt=*/true, + HAS_RETRANSMISSIBLE_DATA, /*measure_rtt=*/true, ECN_NOT_ECT); EXPECT_EQ(manager_.peer_max_ack_delay(), extra_1_ms); manager_.OnPacketSent(&packet2, clock_.Now(), NOT_RETRANSMISSION, - HAS_RETRANSMITTABLE_DATA, /*measure_rtt=*/true, + HAS_RETRANSMISSIBLE_DATA, /*measure_rtt=*/true, ECN_NOT_ECT); EXPECT_EQ(manager_.peer_max_ack_delay(), extra_3_ms); manager_.OnPacketSent(&packet3, clock_.Now(), NOT_RETRANSMISSION, - HAS_RETRANSMITTABLE_DATA, /*measure_rtt=*/true, + HAS_RETRANSMISSIBLE_DATA, /*measure_rtt=*/true, ECN_NOT_ECT); EXPECT_EQ(manager_.peer_max_ack_delay(), extra_3_ms); - // Ack frame1, farme2, frame3. + // Ack frame1, frame2, frame3. manager_.OnAckFrameStart(QuicPacketNumber(1), QuicTime::Delta::Infinite(), clock_.Now()); manager_.OnAckRange(QuicPacketNumber(1), QuicPacketNumber(2)); @@ -2901,18 +2901,18 @@ TEST_F(QuicSentPacketManagerTest, SerializedPacket packet4 = MakePacketWithAckFrequencyFrame( /*packet_number=*/4, /*ack_frequency_sequence_number=*/4, extra_1_ms); - // Send frame1, farme2, frame3, frame4. + // Send frame1, frame2, frame3, frame4. manager_.OnPacketSent(&packet1, clock_.Now(), NOT_RETRANSMISSION, - HAS_RETRANSMITTABLE_DATA, /*measure_rtt=*/true, + HAS_RETRANSMISSIBLE_DATA, /*measure_rtt=*/true, ECN_NOT_ECT); manager_.OnPacketSent(&packet2, clock_.Now(), NOT_RETRANSMISSION, - HAS_RETRANSMITTABLE_DATA, /*measure_rtt=*/true, + HAS_RETRANSMISSIBLE_DATA, /*measure_rtt=*/true, ECN_NOT_ECT); manager_.OnPacketSent(&packet3, clock_.Now(), NOT_RETRANSMISSION, - HAS_RETRANSMITTABLE_DATA, /*measure_rtt=*/true, + HAS_RETRANSMISSIBLE_DATA, /*measure_rtt=*/true, ECN_NOT_ECT); manager_.OnPacketSent(&packet4, clock_.Now(), NOT_RETRANSMISSION, - NO_RETRANSMITTABLE_DATA, /*measure_rtt=*/true, + NO_RETRANSMISSIBLE_DATA, /*measure_rtt=*/true, ECN_NOT_ECT); EXPECT_EQ(manager_.peer_max_ack_delay(), extra_4_ms); @@ -2962,10 +2962,10 @@ TEST_F(QuicSentPacketManagerTest, ClearDataInMessageFrameAfterPacketSent) { /*has_ack=*/false, /*has_stop_waiting*/ false); packet.encryption_level = ENCRYPTION_FORWARD_SECURE; - packet.retransmittable_frames.push_back(QuicFrame(message_frame)); + packet.retransmissible_frames.push_back(QuicFrame(message_frame)); packet.has_message = true; manager_.OnPacketSent(&packet, clock_.Now(), NOT_RETRANSMISSION, - HAS_RETRANSMITTABLE_DATA, /*measure_rtt=*/true, + HAS_RETRANSMISSIBLE_DATA, /*measure_rtt=*/true, ECN_NOT_ECT); } diff --git a/quiche/quic/core/quic_session.cc b/quiche/quic/core/quic_session.cc index f9811fff0..6f4ebcf11 100644 --- a/quiche/quic/core/quic_session.cc +++ b/quiche/quic/core/quic_session.cc @@ -206,7 +206,7 @@ void QuicSession::MaybeProcessPendingStream(PendingStream* pending) { } // At this point, none of the bytes has been successfully consumed by the // application layer. We should close the pending stream even if it is - // bidirectionl as no application will be able to write in a bidirectional + // bidirectional as no application will be able to write in a bidirectional // stream with zero byte as input. if (pending->sequencer()->IsClosed()) { ClosePendingStream(stream_id); @@ -355,7 +355,7 @@ void QuicSession::PendingStreamOnRstStream(const QuicRstStreamFrame& frame) { pending->OnRstStreamFrame(frame); // At this point, none of the bytes has been consumed by the application - // layer. It is safe to close the pending stream even if it is bidirectionl as + // layer. It is safe to close the pending stream even if it is bidirectional as // no application will be able to write in a bidirectional stream with zero // byte as input. ClosePendingStream(stream_id); @@ -1167,7 +1167,7 @@ void QuicSession::OnConfigNegotiated() { max_streams < ietf_streamid_manager_.outgoing_bidirectional_stream_count()) { connection_->CloseConnection( - QUIC_ZERO_RTT_UNRETRANSMITTABLE, + QUIC_ZERO_RTT_UNRETRANSMISSIBLE, absl::StrCat( "Server rejected 0-RTT, aborting because new bidirectional " "initial stream limit ", @@ -1209,7 +1209,7 @@ void QuicSession::OnConfigNegotiated() { max_streams < ietf_streamid_manager_.outgoing_unidirectional_stream_count()) { connection_->CloseConnection( - QUIC_ZERO_RTT_UNRETRANSMITTABLE, + QUIC_ZERO_RTT_UNRETRANSMISSIBLE, absl::StrCat( "Server rejected 0-RTT, aborting because new unidirectional " "initial stream limit ", @@ -1578,7 +1578,7 @@ void QuicSession::OnNewSessionFlowControlWindow(QuicStreamOffset new_window) { ", which is below currently used: ", flow_controller_.bytes_sent()); QUIC_LOG(ERROR) << error_details; connection_->CloseConnection( - QUIC_ZERO_RTT_UNRETRANSMITTABLE, error_details, + QUIC_ZERO_RTT_UNRETRANSMISSIBLE, error_details, ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); return; } @@ -2161,7 +2161,7 @@ bool QuicSession::HasDataToWrite() const { control_frame_manager_.WillingToWrite(); } -void QuicSession::OnAckNeedsRetransmittableFrame() { +void QuicSession::OnAckNeedsRetransmissibleFrame() { flow_controller_.SendWindowUpdate(); } @@ -2214,14 +2214,14 @@ bool QuicSession::IsStreamFlowControlBlocked() { size_t QuicSession::MaxAvailableBidirectionalStreams() const { if (VersionHasIetfQuicFrames(transport_version())) { - return ietf_streamid_manager_.GetMaxAllowdIncomingBidirectionalStreams(); + return ietf_streamid_manager_.GetMaxAllowedIncomingBidirectionalStreams(); } return stream_id_manager_.MaxAvailableStreams(); } size_t QuicSession::MaxAvailableUnidirectionalStreams() const { if (VersionHasIetfQuicFrames(transport_version())) { - return ietf_streamid_manager_.GetMaxAllowdIncomingUnidirectionalStreams(); + return ietf_streamid_manager_.GetMaxAllowedIncomingUnidirectionalStreams(); } return stream_id_manager_.MaxAvailableStreams(); } @@ -2288,7 +2288,7 @@ bool QuicSession::OnFrameAcked(const QuicFrame& frame, frame.type == MAX_STREAMS_FRAME) { // Since there is a 2 frame limit on the number of outstanding max_streams // frames, when an outstanding max_streams frame is ack'd that frees up - // room to potntially send another. + // room to potentially send another. QUIC_RELOADABLE_FLAG_COUNT_N(quic_limit_sending_max_streams, 2, 2); ietf_streamid_manager_.MaybeSendMaxStreamsFrame(); } @@ -2462,7 +2462,7 @@ bool QuicSession::CanWriteStreamData() const { if (HasPendingHandshake()) { return true; } - return connection_->CanWrite(HAS_RETRANSMITTABLE_DATA); + return connection_->CanWrite(HAS_RETRANSMISSIBLE_DATA); } bool QuicSession::RetransmitLostData() { @@ -2628,14 +2628,14 @@ bool QuicSession::OnStreamsBlockedFrame(const QuicStreamsBlockedFrame& frame) { size_t QuicSession::max_open_incoming_bidirectional_streams() const { if (VersionHasIetfQuicFrames(transport_version())) { - return ietf_streamid_manager_.GetMaxAllowdIncomingBidirectionalStreams(); + return ietf_streamid_manager_.GetMaxAllowedIncomingBidirectionalStreams(); } return stream_id_manager_.max_open_incoming_streams(); } size_t QuicSession::max_open_incoming_unidirectional_streams() const { if (VersionHasIetfQuicFrames(transport_version())) { - return ietf_streamid_manager_.GetMaxAllowdIncomingUnidirectionalStreams(); + return ietf_streamid_manager_.GetMaxAllowedIncomingUnidirectionalStreams(); } return stream_id_manager_.max_open_incoming_streams(); } diff --git a/quiche/quic/core/quic_session.h b/quiche/quic/core/quic_session.h index 71dae7b8d..21d392e17 100644 --- a/quiche/quic/core/quic_session.h +++ b/quiche/quic/core/quic_session.h @@ -149,7 +149,7 @@ class QUICHE_EXPORT QuicSession void OnCongestionWindowChange(QuicTime /*now*/) override {} void OnConnectionMigration(AddressChangeType /*type*/) override {} // Adds a connection level WINDOW_UPDATE frame. - void OnAckNeedsRetransmittableFrame() override; + void OnAckNeedsRetransmissibleFrame() override; void SendAckFrequency(const QuicAckFrequencyFrame& frame) override; void SendNewConnectionId(const QuicNewConnectionIdFrame& frame) override; void SendRetireConnectionId(uint64_t sequence_number) override; @@ -691,7 +691,7 @@ class QUICHE_EXPORT QuicSession // Creates a new stream to handle a peer-initiated stream. // Caller does not own the returned stream. - // Returns nullptr and does error handling if the stream can not be created. + // Returns nullptr and does error handling if the stream cannot be created. virtual QuicStream* CreateIncomingStream(QuicStreamId id) = 0; virtual QuicStream* CreateIncomingStream(PendingStream* pending) = 0; @@ -729,7 +729,7 @@ class QUICHE_EXPORT QuicSession virtual void OnFinalByteOffsetReceived(QuicStreamId id, QuicStreamOffset final_byte_offset); - // Returns true if a frame with the given type and id can be prcoessed by a + // Returns true if a frame with the given type and id can be processed by a // PendingStream. However, the frame will always be processed by a QuicStream // if one exists with the given stream_id. virtual bool UsesPendingStreamForFrame(QuicFrameType /*type*/, @@ -826,7 +826,7 @@ class QUICHE_EXPORT QuicSession // indicated by |unidirectional|. QuicStreamId GetLargestPeerCreatedStreamId(bool unidirectional) const; - // Deletes the connection and sets it to nullptr, so calling it mulitiple + // Deletes the connection and sets it to nullptr, so calling it multiple // times is safe. void DeleteConnection(); @@ -922,7 +922,7 @@ class QUICHE_EXPORT QuicSession // pending stream. Can return NULL, e.g., if the stream ID is invalid. PendingStream* PendingStreamOnStreamFrame(const QuicStreamFrame& frame); - // Creates or gets pending strea, feed it with |frame|, and closes the pending + // Creates or gets pending stream, feed it with |frame|, and closes the pending // stream. void PendingStreamOnRstStream(const QuicRstStreamFrame& frame); @@ -954,7 +954,7 @@ class QUICHE_EXPORT QuicSession Visitor* visitor_; // A list of streams which need to write more data. Stream register - // themselves in their constructor, and unregisterm themselves in their + // themselves in their constructor, and unregister themselves in their // destructors, so the write blocked list must outlive all streams. std::unique_ptr write_blocked_streams_; diff --git a/quiche/quic/core/quic_session_test.cc b/quiche/quic/core/quic_session_test.cc index d1553e8bc..2a56c5dd9 100644 --- a/quiche/quic/core/quic_session_test.cc +++ b/quiche/quic/core/quic_session_test.cc @@ -957,7 +957,7 @@ TEST_P(QuicSessionTestServer, ManyAvailableUnidirectionalStreams) { // Now try to get the last possible bidirectional stream. EXPECT_NE(nullptr, session_.GetOrCreateStream( GetNthClientInitiatedBidirectionalId(49))); - // and this should fail because it exceeds the bnidirectional limit + // and this should fail because it exceeds the bidirectional limit // (but not the uni-) std::string error_detail; if (QuicVersionUsesCryptoFrames(transport_version())) { diff --git a/quiche/quic/core/quic_stream.cc b/quiche/quic/core/quic_stream.cc index f2a264528..75bf8792b 100644 --- a/quiche/quic/core/quic_stream.cc +++ b/quiche/quic/core/quic_stream.cc @@ -217,7 +217,7 @@ void PendingStream::OnRstStreamFrame(const QuicRstStreamFrame& frame) { QUICHE_DCHECK_EQ(frame.stream_id, id_); if (frame.byte_offset > kMaxStreamLength) { - // Peer are not suppose to write bytes more than maxium allowed. + // Peer are not suppose to write bytes more than maximum allowed. OnUnrecoverableError(QUIC_STREAM_LENGTH_OVERFLOW, "Reset frame stream offset overflow."); return; @@ -515,7 +515,7 @@ int QuicStream::num_duplicate_frames_received() const { void QuicStream::OnStreamReset(const QuicRstStreamFrame& frame) { rst_received_ = true; if (frame.byte_offset > kMaxStreamLength) { - // Peer are not suppose to write bytes more than maxium allowed. + // Peer are not suppose to write bytes more than maximum allowed. OnUnrecoverableError(QUIC_STREAM_LENGTH_OVERFLOW, "Reset frame stream offset overflow."); return; @@ -1032,7 +1032,7 @@ bool QuicStream::MaybeConfigSendWindowOffset(QuicStreamOffset new_offset, QUIC_BUG_IF(quic_bug_12570_8, perspective_ == Perspective::IS_SERVER) << "Server streams' flow control should never be configured twice."; OnUnrecoverableError( - QUIC_ZERO_RTT_UNRETRANSMITTABLE, + QUIC_ZERO_RTT_UNRETRANSMISSIBLE, absl::StrCat( "Server rejected 0-RTT, aborting because new stream max data ", new_offset, " for stream ", id_, " is less than currently used: ", @@ -1114,7 +1114,7 @@ void QuicStream::OnStreamFrameRetransmitted(QuicStreamOffset offset, void QuicStream::OnStreamFrameLost(QuicStreamOffset offset, QuicByteCount data_length, bool fin_lost) { - QUIC_DVLOG(1) << ENDPOINT << "stream " << id_ << " Losting " + QUIC_DVLOG(1) << ENDPOINT << "stream " << id_ << " Lost " << "[" << offset << ", " << offset + data_length << "]" << " fin = " << fin_lost; if (data_length > 0) { @@ -1390,7 +1390,7 @@ void QuicStream::OnDeadlinePassed() { Reset(QUIC_STREAM_TTL_EXPIRED); } bool QuicStream::IsFlowControlBlocked() const { if (!flow_controller_.has_value()) { QUIC_BUG(quic_bug_10586_15) - << "Trying to access non-existent flow controller."; + << "Trying to access nonexistent flow controller."; return false; } return flow_controller_->IsBlocked(); @@ -1399,7 +1399,7 @@ bool QuicStream::IsFlowControlBlocked() const { QuicStreamOffset QuicStream::highest_received_byte_offset() const { if (!flow_controller_.has_value()) { QUIC_BUG(quic_bug_10586_16) - << "Trying to access non-existent flow controller."; + << "Trying to access nonexistent flow controller."; return 0; } return flow_controller_->highest_received_byte_offset(); @@ -1408,7 +1408,7 @@ QuicStreamOffset QuicStream::highest_received_byte_offset() const { void QuicStream::UpdateReceiveWindowSize(QuicStreamOffset size) { if (!flow_controller_.has_value()) { QUIC_BUG(quic_bug_10586_17) - << "Trying to access non-existent flow controller."; + << "Trying to access nonexistent flow controller."; return; } flow_controller_->UpdateReceiveWindowSize(size); diff --git a/quiche/quic/core/quic_stream.h b/quiche/quic/core/quic_stream.h index 69abe7d07..616a3add0 100644 --- a/quiche/quic/core/quic_stream.h +++ b/quiche/quic/core/quic_stream.h @@ -139,7 +139,7 @@ class QUICHE_EXPORT QuicStream : public QuicStreamSequencer::StreamInterface { public: // Creates a new stream with stream_id |id| associated with |session|. If // |is_static| is true, then the stream will be given precedence - // over other streams when determing what streams should write next. + // over other streams when determining what streams should write next. // |type| indicates whether the stream is bidirectional, read unidirectional // or write unidirectional. // TODO(fayang): Remove |type| when IETF stream ID numbering fully kicks in. diff --git a/quiche/quic/core/quic_stream_id_manager.cc b/quiche/quic/core/quic_stream_id_manager.cc index abfff030f..1e9d261cd 100644 --- a/quiche/quic/core/quic_stream_id_manager.cc +++ b/quiche/quic/core/quic_stream_id_manager.cc @@ -211,7 +211,7 @@ bool QuicStreamIdManager::IsAvailableStream(QuicStreamId id) const { QUICHE_DCHECK_NE(QuicUtils::IsBidirectionalStreamId(id, version_), unidirectional_); if (QuicUtils::IsOutgoingStreamId(version_, id, perspective_)) { - // Stream IDs under next_ougoing_stream_id_ are either open or previously + // Stream IDs under next_outgoing_stream_id_ are either open or previously // open but now closed. return id >= next_outgoing_stream_id_; } diff --git a/quiche/quic/core/quic_stream_id_manager.h b/quiche/quic/core/quic_stream_id_manager.h index 5dd8b2707..1b8c22d95 100644 --- a/quiche/quic/core/quic_stream_id_manager.h +++ b/quiche/quic/core/quic_stream_id_manager.h @@ -86,7 +86,7 @@ class QUICHE_EXPORT QuicStreamIdManager { bool MaybeAllowNewOutgoingStreams(QuicStreamCount max_open_streams); // Checks if the incoming stream ID exceeds the MAX_STREAMS limit. If the - // limit is exceeded, populates |error_detials| and returns false. + // limit is exceeded, populates |error_details| and returns false. bool MaybeIncreaseLargestPeerStreamId(const QuicStreamId stream_id, std::string* error_details); @@ -141,7 +141,7 @@ class QUICHE_EXPORT QuicStreamIdManager { // Back reference to the session containing this Stream ID Manager. DelegateInterface* delegate_; - // Whether this stream id manager is for unidrectional (true) or bidirectional + // Whether this stream id manager is for unidirectional (true) or bidirectional // (false) streams. const bool unidirectional_; diff --git a/quiche/quic/core/quic_stream_id_manager_test.cc b/quiche/quic/core/quic_stream_id_manager_test.cc index f57a89f53..67bea01d1 100644 --- a/quiche/quic/core/quic_stream_id_manager_test.cc +++ b/quiche/quic/core/quic_stream_id_manager_test.cc @@ -249,7 +249,7 @@ TEST_P(QuicStreamIdManagerTest, OnStreamsBlockedFrame) { // The STREAMS_BLOCKED frame contains the previous advertised count, // not the one that the peer would have received as a result of the - // MAX_STREAMS sent earler. + // MAX_STREAMS sent earlier. frame.stream_count = advertised_stream_count; EXPECT_CALL(delegate_, CanSendMaxStreams()).WillOnce(testing::Return(true)); @@ -292,11 +292,11 @@ TEST_P(QuicStreamIdManagerTest, OnStreamsBlockedFrameCantSend) { // The STREAMS_BLOCKED frame contains the previous advertised count, // not the one that the peer would have received as a result of the - // MAX_STREAMS sent earler. + // MAX_STREAMS sent earlier. frame.stream_count = advertised_stream_count; // Since the delegate returns false, no MAX_STREAMS frame should be sent, - // and the advertised limit should not increse. + // and the advertised limit should not increase. EXPECT_CALL(delegate_, CanSendMaxStreams()).WillOnce(testing::Return(false)); EXPECT_CALL(delegate_, SendMaxStreams(_, _)).Times(0); diff --git a/quiche/quic/core/quic_stream_send_buffer_test.cc b/quiche/quic/core/quic_stream_send_buffer_test.cc index f4d6b50b9..02384ff2b 100644 --- a/quiche/quic/core/quic_stream_send_buffer_test.cc +++ b/quiche/quic/core/quic_stream_send_buffer_test.cc @@ -90,7 +90,7 @@ TEST_F(QuicStreamSendBufferTest, CopyDataToBuffer) { ASSERT_TRUE(send_buffer_.WriteStreamData(3072, 768, &writer)); EXPECT_EQ(copy4, absl::string_view(buf + 3072, 768)); - // Test data piece across boundries. + // Test data piece across boundaries. QuicDataWriter writer2(4000, buf, quiche::HOST_BYTE_ORDER); std::string copy5 = std::string(536, 'a') + std::string(256, 'b') + std::string(232, 'c'); @@ -162,7 +162,7 @@ TEST_F(QuicStreamSendBufferTest, RemoveStreamFrame) { EXPECT_EQ(0u, send_buffer_.size()); } -TEST_F(QuicStreamSendBufferTest, RemoveStreamFrameAcrossBoundries) { +TEST_F(QuicStreamSendBufferTest, RemoveStreamFrameAcrossBoundaries) { WriteAllData(); QuicByteCount newly_acked_length; diff --git a/quiche/quic/core/quic_stream_sequencer.h b/quiche/quic/core/quic_stream_sequencer.h index 2d5bfcfb3..8c8d3480d 100644 --- a/quiche/quic/core/quic_stream_sequencer.h +++ b/quiche/quic/core/quic_stream_sequencer.h @@ -24,7 +24,7 @@ class QuicStreamSequencerPeer; // up to the next layer. class QUICHE_EXPORT QuicStreamSequencer final { public: - // Interface that thie Sequencer uses to communicate with the Stream. + // Interface that this Sequencer uses to communicate with the Stream. class QUICHE_EXPORT StreamInterface { public: virtual ~StreamInterface() = default; @@ -105,7 +105,7 @@ class QUICHE_EXPORT QuicStreamSequencer final { // data as consumed. void Read(std::string* buffer); - // Returns true if the sequncer has bytes available for reading. + // Returns true if the sequencer has bytes available for reading. bool HasBytesToRead() const; // Number of bytes available to read. diff --git a/quiche/quic/core/quic_stream_sequencer_buffer.cc b/quiche/quic/core/quic_stream_sequencer_buffer.cc index d364d61bc..b3b2548ec 100644 --- a/quiche/quic/core/quic_stream_sequencer_buffer.cc +++ b/quiche/quic/core/quic_stream_sequencer_buffer.cc @@ -322,7 +322,7 @@ int QuicStreamSequencerBuffer::GetReadableRegions(struct iovec* iov, size_t end_block_offset = GetInBlockOffset(readable_offset_end); size_t end_block_idx = GetBlockIndex(readable_offset_end); - // If readable region is within one block, deal with it seperately. + // If readable region is within one block, deal with it separately. if (start_block_idx == end_block_idx && ReadOffset() <= end_block_offset) { iov[0].iov_base = blocks_[start_block_idx]->buffer + ReadOffset(); iov[0].iov_len = ReadableBytes(); diff --git a/quiche/quic/core/quic_stream_sequencer_buffer_test.cc b/quiche/quic/core/quic_stream_sequencer_buffer_test.cc index d1cdf341c..70d828748 100644 --- a/quiche/quic/core/quic_stream_sequencer_buffer_test.cc +++ b/quiche/quic/core/quic_stream_sequencer_buffer_test.cc @@ -328,7 +328,7 @@ TEST_F(QuicStreamSequencerBufferTest, Readv100Bytes) { TEST_F(QuicStreamSequencerBufferTest, ReadvAcrossBlocks) { std::string source(kBlockSizeBytes + 50, 'a'); - // Write 1st block to full and extand 50 bytes to next block. + // Write 1st block to full and extend 50 bytes to next block. buffer_->OnStreamData(0, source, &written_, &error_details_); EXPECT_EQ(source.size(), helper_->ReadableBytes()); // Iteratively read 512 bytes from buffer_-> Overwrite dest[] each time. @@ -342,7 +342,7 @@ TEST_F(QuicStreamSequencerBufferTest, ReadvAcrossBlocks) { } // The last read only reads the rest 50 bytes in 2nd block. EXPECT_EQ(std::string(50, 'a'), std::string(dest, 50)); - EXPECT_EQ(0, dest[50]) << "Dest[50] shouln't be filled."; + EXPECT_EQ(0, dest[50]) << "Dest[50] shouldn't be filled."; EXPECT_EQ(source.size(), buffer_->BytesConsumed()); EXPECT_TRUE(buffer_->Empty()); EXPECT_TRUE(helper_->CheckBufferInvariants()); @@ -728,7 +728,7 @@ TEST_F(QuicStreamSequencerBufferTest, PeekAfterConsumed) { EXPECT_FALSE(buffer_->PeekRegion(1500, &iov)); } -TEST_F(QuicStreamSequencerBufferTest, PeekContinously) { +TEST_F(QuicStreamSequencerBufferTest, PeekContinuously) { std::string source1(kBlockSizeBytes, 'a'); buffer_->OnStreamData(0, source1, &written_, &error_details_); @@ -1074,7 +1074,7 @@ TEST_F(QuicStreamSequencerBufferRandomIOTest, RandomWriteAndConsumeInPlace) { << num_read << " readable regions, actually get " << actually_num_read << " from offset: " << total_bytes_read_ - << "\nprocesse bytes: " << bytes_processed; + << "\nprocessed bytes: " << bytes_processed; total_bytes_read_ += bytes_processed; ASSERT_EQ(total_bytes_read_, buffer_->BytesConsumed()); ASSERT_TRUE(helper_->CheckBufferInvariants()); diff --git a/quiche/quic/core/quic_stream_sequencer_test.cc b/quiche/quic/core/quic_stream_sequencer_test.cc index 3ac6d88ba..ddf2902c3 100644 --- a/quiche/quic/core/quic_stream_sequencer_test.cc +++ b/quiche/quic/core/quic_stream_sequencer_test.cc @@ -684,7 +684,7 @@ TEST_F(QuicStreamSequencerTest, OnDataAvailableWhenReadableBytesIncrease) { // Without consuming the buffer bytes, continue receiving [12, 13). QuicStreamFrame frame3(id, false, 5, "a"); - // OnDataAvailable shouldn't be called becasue there are still only 11 bytes + // OnDataAvailable shouldn't be called because there are still only 11 bytes // available. EXPECT_CALL(stream_, OnDataAvailable()).Times(0); sequencer_->OnStreamFrame(frame3); diff --git a/quiche/quic/core/quic_stream_test.cc b/quiche/quic/core/quic_stream_test.cc index 7afbb1954..da091577f 100644 --- a/quiche/quic/core/quic_stream_test.cc +++ b/quiche/quic/core/quic_stream_test.cc @@ -242,12 +242,12 @@ TEST_P(PendingStreamTest, PendingStreamTooMuchDataInRstStream) { CloseConnection(QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA, _, _)); pending1.OnRstStreamFrame(frame1); - QuicStreamId bidirection_stream_id = QuicUtils::GetFirstBidirectionalStreamId( + QuicStreamId bidirectional_stream_id = QuicUtils::GetFirstBidirectionalStreamId( session_->transport_version(), Perspective::IS_CLIENT); - PendingStream pending2(bidirection_stream_id, session_.get()); + PendingStream pending2(bidirectional_stream_id, session_.get()); // Receive a rst stream frame that violates flow control: the byte offset is // higher than the receive window offset. - QuicRstStreamFrame frame2(kInvalidControlFrameId, bidirection_stream_id, + QuicRstStreamFrame frame2(kInvalidControlFrameId, bidirectional_stream_id, QUIC_STREAM_CANCELLED, kInitialSessionFlowControlWindowForTest + 1); // Bidirectional Pending stream should not accept the frame, and the @@ -273,10 +273,10 @@ TEST_P(PendingStreamTest, PendingStreamRstStream) { TEST_P(PendingStreamTest, PendingStreamWindowUpdate) { Initialize(); - QuicStreamId bidirection_stream_id = QuicUtils::GetFirstBidirectionalStreamId( + QuicStreamId bidirectional_stream_id = QuicUtils::GetFirstBidirectionalStreamId( session_->transport_version(), Perspective::IS_CLIENT); - PendingStream pending(bidirection_stream_id, session_.get()); - QuicWindowUpdateFrame frame(kInvalidControlFrameId, bidirection_stream_id, + PendingStream pending(bidirectional_stream_id, session_.get()); + QuicWindowUpdateFrame frame(kInvalidControlFrameId, bidirectional_stream_id, kDefaultFlowControlSendWindow * 2); pending.OnWindowUpdateFrame(frame); TestStream stream(&pending, session_.get(), false); @@ -288,9 +288,9 @@ TEST_P(PendingStreamTest, PendingStreamWindowUpdate) { TEST_P(PendingStreamTest, PendingStreamStopSending) { Initialize(); - QuicStreamId bidirection_stream_id = QuicUtils::GetFirstBidirectionalStreamId( + QuicStreamId bidirectional_stream_id = QuicUtils::GetFirstBidirectionalStreamId( session_->transport_version(), Perspective::IS_CLIENT); - PendingStream pending(bidirection_stream_id, session_.get()); + PendingStream pending(bidirectional_stream_id, session_.get()); QuicResetStreamError error = QuicResetStreamError::FromInternal(QUIC_STREAM_INTERNAL_ERROR); pending.OnStopSending(error); diff --git a/quiche/quic/core/quic_time_wait_list_manager.h b/quiche/quic/core/quic_time_wait_list_manager.h index 3fee7981a..329a265fa 100644 --- a/quiche/quic/core/quic_time_wait_list_manager.h +++ b/quiche/quic/core/quic_time_wait_list_manager.h @@ -287,9 +287,9 @@ class QUICHE_EXPORT QuicTimeWaitListManager // and remove the indirect map. // A connection can have multiple unretired ConnectionIds when it is closed. // These Ids have the same ConnectionIdData entry in connection_id_map_. To - // find the entry, look up the cannoical ConnectionId in + // find the entry, look up the canonical ConnectionId in // indirect_connection_id_map_ first, and look up connection_id_map_ with the - // cannoical ConnectionId. + // canonical ConnectionId. absl::flat_hash_map indirect_connection_id_map_; diff --git a/quiche/quic/core/quic_trace_visitor.cc b/quiche/quic/core/quic_trace_visitor.cc index 790653619..78f8b2b7c 100644 --- a/quiche/quic/core/quic_trace_visitor.cc +++ b/quiche/quic/core/quic_trace_visitor.cc @@ -51,8 +51,8 @@ QuicTraceVisitor::QuicTraceVisitor(const QuicConnection* connection) void QuicTraceVisitor::OnPacketSent( QuicPacketNumber packet_number, QuicPacketLength packet_length, bool /*has_crypto_handshake*/, TransmissionType /*transmission_type*/, - EncryptionLevel encryption_level, const QuicFrames& retransmittable_frames, - const QuicFrames& /*nonretransmittable_frames*/, QuicTime sent_time, + EncryptionLevel encryption_level, const QuicFrames& retransmissible_frames, + const QuicFrames& /*nonretransmissible_frames*/, QuicTime sent_time, uint32_t /*batch_id*/) { quic_trace::Event* event = trace_.add_events(); event->set_event_type(quic_trace::PACKET_SENT); @@ -61,7 +61,7 @@ void QuicTraceVisitor::OnPacketSent( event->set_packet_size(packet_length); event->set_encryption_level(EncryptionLevelToProto(encryption_level)); - for (const QuicFrame& frame : retransmittable_frames) { + for (const QuicFrame& frame : retransmissible_frames) { switch (frame.type) { case STREAM_FRAME: case RST_STREAM_FRAME: @@ -79,8 +79,8 @@ void QuicTraceVisitor::OnPacketSent( case STOP_WAITING_FRAME: case ACK_FRAME: QUIC_BUG(quic_bug_12732_1) - << "Frames of type are not retransmittable and are not supposed " - "to be in retransmittable_frames"; + << "Frames of type are not retransmissible and are not supposed " + "to be in retransmissible_frames"; break; // New IETF frames, not used in current gQUIC version. diff --git a/quiche/quic/core/quic_trace_visitor.h b/quiche/quic/core/quic_trace_visitor.h index 3307dd04a..e336b84a7 100644 --- a/quiche/quic/core/quic_trace_visitor.h +++ b/quiche/quic/core/quic_trace_visitor.h @@ -22,8 +22,8 @@ class QUICHE_NO_EXPORT QuicTraceVisitor : public QuicConnectionDebugVisitor { QuicPacketLength packet_length, bool has_crypto_handshake, TransmissionType transmission_type, EncryptionLevel encryption_level, - const QuicFrames& retransmittable_frames, - const QuicFrames& nonretransmittable_frames, + const QuicFrames& retransmissible_frames, + const QuicFrames& nonretransmissible_frames, QuicTime sent_time, uint32_t batch_id) override; void OnIncomingAck(QuicPacketNumber ack_packet_number, diff --git a/quiche/quic/core/quic_transmission_info.cc b/quiche/quic/core/quic_transmission_info.cc index 6263216e2..ac8bef3c6 100644 --- a/quiche/quic/core/quic_transmission_info.cc +++ b/quiche/quic/core/quic_transmission_info.cc @@ -49,7 +49,7 @@ std::string QuicTransmissionInfo::DebugString() const { ", has_ack_frequency: ", has_ack_frequency, ", first_sent_after_loss: ", first_sent_after_loss.ToString(), ", largest_acked: ", largest_acked.ToString(), - ", retransmittable_frames: ", QuicFramesToString(retransmittable_frames), + ", retransmissible_frames: ", QuicFramesToString(retransmissible_frames), "}"); } diff --git a/quiche/quic/core/quic_transmission_info.h b/quiche/quic/core/quic_transmission_info.h index bc6d49b35..c0b537a30 100644 --- a/quiche/quic/core/quic_transmission_info.h +++ b/quiche/quic/core/quic_transmission_info.h @@ -32,7 +32,7 @@ struct QUICHE_EXPORT QuicTransmissionInfo { std::string DebugString() const; - QuicFrames retransmittable_frames; + QuicFrames retransmissible_frames; QuicTime sent_time; QuicPacketLength bytes_sent; EncryptionLevel encryption_level; diff --git a/quiche/quic/core/quic_types.h b/quiche/quic/core/quic_types.h index 727eb73b5..9c6132a7e 100644 --- a/quiche/quic/core/quic_types.h +++ b/quiche/quic/core/quic_types.h @@ -35,7 +35,7 @@ using QuicMessageId = uint32_t; // 62-bit numbers. However, we have decided to only support up to 2^32-1 streams // in order to reduce the size of data structures such as QuicStreamFrame // and QuicTransmissionInfo, as that allows them to fit in cache lines and has -// visible perfomance impact. +// visible performance impact. using QuicStreamId = uint32_t; // Count of stream IDs. Used in MAX_STREAMS and STREAMS_BLOCKED frames. @@ -206,9 +206,9 @@ QUICHE_EXPORT std::string TransmissionTypeToString( QUICHE_EXPORT std::ostream& operator<<(std::ostream& os, TransmissionType transmission_type); -enum HasRetransmittableData : uint8_t { - NO_RETRANSMITTABLE_DATA, - HAS_RETRANSMITTABLE_DATA, +enum HasRetransmissibleData : uint8_t { + NO_RETRANSMISSIBLE_DATA, + HAS_RETRANSMISSIBLE_DATA, }; enum IsHandshake : uint8_t { NOT_HANDSHAKE, IS_HANDSHAKE }; @@ -287,7 +287,7 @@ QUICHE_EXPORT std::ostream& operator<<(std::ostream& os, // Ietf frame types. These are defined in the IETF QUIC Specification. // Explicit values are given in the enum so that we can be sure that // the symbol will map to the correct stream type. -// All types are defined here, even if we have not yet implmented the +// All types are defined here, even if we have not yet implemented the // quic/core/stream/.... stuff needed. // Note: The protocol specifies that frame types are varint-62 encoded, // further stating that the shortest encoding must be used. The current set of @@ -794,7 +794,7 @@ struct QUICHE_EXPORT QuicOwnedPacketBuffer : public QuicPacketBuffer { QuicOwnedPacketBuffer(QuicOwnedPacketBuffer&& owned_buffer) : QuicPacketBuffer(std::move(owned_buffer)) { - // |owned_buffer| does not own a buffer any more. + // |owned_buffer| does not own a buffer anymore. owned_buffer.buffer = nullptr; } diff --git a/quiche/quic/core/quic_unacked_packet_map.cc b/quiche/quic/core/quic_unacked_packet_map.cc index a89cf8042..40f290b8a 100644 --- a/quiche/quic/core/quic_unacked_packet_map.cc +++ b/quiche/quic/core/quic_unacked_packet_map.cc @@ -127,7 +127,7 @@ QuicUnackedPacketMap::QuicUnackedPacketMap(Perspective perspective) QuicUnackedPacketMap::~QuicUnackedPacketMap() { for (QuicTransmissionInfo& transmission_info : unacked_packets_) { - DeleteFrames(&(transmission_info.retransmittable_frames)); + DeleteFrames(&(transmission_info.retransmissible_frames)); } } @@ -160,10 +160,10 @@ void QuicUnackedPacketMap::AddSentPacket(SerializedPacket* mutable_packet, QUIC_BUG_IF(quic_bug_12645_2, set_in_flight) << "Packet " << mutable_packet->packet_number << ", transmission type " << TransmissionTypeToString(mutable_packet->transmission_type) - << ", retransmittable frames: " - << QuicFramesToString(mutable_packet->retransmittable_frames) - << ", nonretransmittable_frames: " - << QuicFramesToString(mutable_packet->nonretransmittable_frames); + << ", retransmissible frames: " + << QuicFramesToString(mutable_packet->retransmissible_frames) + << ", nonretransmissible_frames: " + << QuicFramesToString(mutable_packet->nonretransmissible_frames); info.state = NOT_CONTRIBUTING_RTT; } @@ -175,19 +175,19 @@ void QuicUnackedPacketMap::AddSentPacket(SerializedPacket* mutable_packet, bytes_in_flight_per_packet_number_space_[packet_number_space] += bytes_sent; ++packets_in_flight_; info.in_flight = true; - largest_sent_retransmittable_packets_[packet_number_space] = packet_number; + largest_sent_retransmissible_packets_[packet_number_space] = packet_number; last_inflight_packet_sent_time_ = sent_time; last_inflight_packets_sent_time_[packet_number_space] = sent_time; } unacked_packets_.push_back(std::move(info)); - // Swap the retransmittable frames to avoid allocations. + // Swap the retransmissible frames to avoid allocations. // TODO(ianswett): Could use emplace_back when Chromium can. if (has_crypto_handshake) { last_crypto_packet_sent_time_ = sent_time; } - mutable_packet->retransmittable_frames.swap( - unacked_packets_.back().retransmittable_frames); + mutable_packet->retransmissible_frames.swap( + unacked_packets_.back().retransmissible_frames); } void QuicUnackedPacketMap::RemoveObsoletePackets() { @@ -195,27 +195,27 @@ void QuicUnackedPacketMap::RemoveObsoletePackets() { if (!IsPacketUseless(least_unacked_, unacked_packets_.front())) { break; } - DeleteFrames(&unacked_packets_.front().retransmittable_frames); + DeleteFrames(&unacked_packets_.front().retransmissible_frames); unacked_packets_.pop_front(); ++least_unacked_; } } -bool QuicUnackedPacketMap::HasRetransmittableFrames( +bool QuicUnackedPacketMap::HasRetransmissibleFrames( QuicPacketNumber packet_number) const { QUICHE_DCHECK_GE(packet_number, least_unacked_); QUICHE_DCHECK_LT(packet_number, least_unacked_ + unacked_packets_.size()); - return HasRetransmittableFrames( + return HasRetransmissibleFrames( unacked_packets_[packet_number - least_unacked_]); } -bool QuicUnackedPacketMap::HasRetransmittableFrames( +bool QuicUnackedPacketMap::HasRetransmissibleFrames( const QuicTransmissionInfo& info) const { if (!QuicUtils::IsAckable(info.state)) { return false; } - for (const auto& frame : info.retransmittable_frames) { + for (const auto& frame : info.retransmissible_frames) { if (session_notifier_->IsFrameOutstanding(frame)) { return true; } @@ -223,19 +223,19 @@ bool QuicUnackedPacketMap::HasRetransmittableFrames( return false; } -void QuicUnackedPacketMap::RemoveRetransmittability( +void QuicUnackedPacketMap::RemoveRetransmissibility( QuicTransmissionInfo* info) { - DeleteFrames(&info->retransmittable_frames); + DeleteFrames(&info->retransmissible_frames); info->first_sent_after_loss.Clear(); } -void QuicUnackedPacketMap::RemoveRetransmittability( +void QuicUnackedPacketMap::RemoveRetransmissibility( QuicPacketNumber packet_number) { QUICHE_DCHECK_GE(packet_number, least_unacked_); QUICHE_DCHECK_LT(packet_number, least_unacked_ + unacked_packets_.size()); QuicTransmissionInfo* info = &unacked_packets_[packet_number - least_unacked_]; - RemoveRetransmittability(info); + RemoveRetransmissibility(info); } void QuicUnackedPacketMap::IncreaseLargestAcked( @@ -265,7 +265,7 @@ bool QuicUnackedPacketMap::IsPacketUsefulForCongestionControl( return info.in_flight; } -bool QuicUnackedPacketMap::IsPacketUsefulForRetransmittableData( +bool QuicUnackedPacketMap::IsPacketUsefulForRetransmissibleData( const QuicTransmissionInfo& info) const { // Wait for 1 RTT before giving up on the lost packet. return info.first_sent_after_loss.IsInitialized() && @@ -277,7 +277,7 @@ bool QuicUnackedPacketMap::IsPacketUseless( QuicPacketNumber packet_number, const QuicTransmissionInfo& info) const { return !IsPacketUsefulForMeasuringRtt(packet_number, info) && !IsPacketUsefulForCongestionControl(info) && - !IsPacketUsefulForRetransmittableData(info); + !IsPacketUsefulForRetransmissibleData(info); } bool QuicUnackedPacketMap::IsUnacked(QuicPacketNumber packet_number) const { @@ -333,11 +333,11 @@ QuicUnackedPacketMap::NeuterUnencryptedPackets() { QuicPacketNumber packet_number = GetLeastUnacked(); for (QuicUnackedPacketMap::iterator it = begin(); it != end(); ++it, ++packet_number) { - if (!it->retransmittable_frames.empty() && + if (!it->retransmissible_frames.empty() && it->encryption_level == ENCRYPTION_INITIAL) { QUIC_DVLOG(2) << "Neutering unencrypted packet " << packet_number; - // Once the connection swithes to forward secure, no unencrypted packets - // will be sent. The data has been abandoned in the cryto stream. Remove + // Once the connection switches to forward secure, no unencrypted packets + // will be sent. The data has been abandoned in the crypto stream. Remove // it from in flight. RemoveFromInFlight(packet_number); it->state = NEUTERED; @@ -346,7 +346,7 @@ QuicUnackedPacketMap::NeuterUnencryptedPackets() { // send algorithm). // TODO(b/148868195): use NotifyFramesNeutered. NotifyFramesAcked(*it, QuicTime::Delta::Zero(), QuicTime::Zero()); - QUICHE_DCHECK(!HasRetransmittableFrames(*it)); + QUICHE_DCHECK(!HasRetransmissibleFrames(*it)); } } QUICHE_DCHECK(!supports_multiple_packet_number_spaces_ || @@ -361,7 +361,7 @@ QuicUnackedPacketMap::NeuterHandshakePackets() { QuicPacketNumber packet_number = GetLeastUnacked(); for (QuicUnackedPacketMap::iterator it = begin(); it != end(); ++it, ++packet_number) { - if (!it->retransmittable_frames.empty() && + if (!it->retransmissible_frames.empty() && GetPacketNumberSpace(it->encryption_level) == HANDSHAKE_DATA) { QUIC_DVLOG(2) << "Neutering handshake packet " << packet_number; RemoveFromInFlight(packet_number); @@ -432,9 +432,9 @@ bool QuicUnackedPacketMap::HasPendingCryptoPackets() const { return session_notifier_->HasUnackedCryptoData(); } -bool QuicUnackedPacketMap::HasUnackedRetransmittableFrames() const { +bool QuicUnackedPacketMap::HasUnackedRetransmissibleFrames() const { for (auto it = rbegin(); it != rend(); ++it) { - if (it->in_flight && HasRetransmittableFrames(*it)) { + if (it->in_flight && HasRetransmissibleFrames(*it)) { return true; } } @@ -457,7 +457,7 @@ bool QuicUnackedPacketMap::NotifyFramesAcked(const QuicTransmissionInfo& info, return false; } bool new_data_acked = false; - for (const QuicFrame& frame : info.retransmittable_frames) { + for (const QuicFrame& frame : info.retransmissible_frames) { if (session_notifier_->OnFrameAcked(frame, ack_delay, receive_timestamp)) { new_data_acked = true; } @@ -467,7 +467,7 @@ bool QuicUnackedPacketMap::NotifyFramesAcked(const QuicTransmissionInfo& info, void QuicUnackedPacketMap::NotifyFramesLost(const QuicTransmissionInfo& info, TransmissionType /*type*/) { - for (const QuicFrame& frame : info.retransmittable_frames) { + for (const QuicFrame& frame : info.retransmissible_frames) { session_notifier_->OnFrameLost(frame); } } @@ -483,7 +483,7 @@ void QuicUnackedPacketMap::MaybeAggregateAckedStreamFrame( if (session_notifier_ == nullptr) { return; } - for (const auto& frame : info.retransmittable_frames) { + for (const auto& frame : info.retransmissible_frames) { // Determine whether acked stream frame can be aggregated. const bool can_aggregate = frame.type == STREAM_FRAME && @@ -580,14 +580,14 @@ QuicTime QuicUnackedPacketMap::GetLastInFlightPacketSentTime( } QuicPacketNumber -QuicUnackedPacketMap::GetLargestSentRetransmittableOfPacketNumberSpace( +QuicUnackedPacketMap::GetLargestSentRetransmissibleOfPacketNumberSpace( PacketNumberSpace packet_number_space) const { if (packet_number_space >= NUM_PACKET_NUMBER_SPACES) { QUIC_BUG(quic_bug_10518_6) << "Invalid packet number space: " << packet_number_space; return QuicPacketNumber(); } - return largest_sent_retransmittable_packets_[packet_number_space]; + return largest_sent_retransmissible_packets_[packet_number_space]; } const QuicTransmissionInfo* @@ -634,13 +634,13 @@ void QuicUnackedPacketMap::EnableMultiplePacketNumberSpacesSupport() { int32_t QuicUnackedPacketMap::GetLastPacketContent() const { if (empty()) { - // Use -1 to distinguish with packets with no retransmittable frames nor + // Use -1 to distinguish with packets with no retransmissible frames nor // acks. return -1; } int32_t content = 0; const QuicTransmissionInfo& last_packet = unacked_packets_.back(); - for (const auto& frame : last_packet.retransmittable_frames) { + for (const auto& frame : last_packet.retransmissible_frames) { content |= GetFrameTypeBitfield(frame.type); } if (last_packet.largest_acked.IsInitialized()) { diff --git a/quiche/quic/core/quic_unacked_packet_map.h b/quiche/quic/core/quic_unacked_packet_map.h index 67ed28ded..460551006 100644 --- a/quiche/quic/core/quic_unacked_packet_map.h +++ b/quiche/quic/core/quic_unacked_packet_map.h @@ -24,7 +24,7 @@ class QuicUnackedPacketMapPeer; } // namespace test // Class which tracks unacked packets for three purposes: -// 1) Track retransmittable data, including multiple transmissions of frames. +// 1) Track retransmissible data, including multiple transmissions of frames. // 2) Track packets and bytes in flight for congestion control. // 3) Track sent time of packets to provide RTT measurements from acks. class QUICHE_EXPORT QuicUnackedPacketMap { @@ -38,7 +38,7 @@ class QUICHE_EXPORT QuicUnackedPacketMap { // Marks the packet as in flight if |set_in_flight| is true. // Packets marked as in flight are expected to be marked as missing when they // don't arrive, indicating the need for retransmission. - // Any retransmittible_frames in |mutable_packet| are swapped from + // Any retransmissible_frames in |mutable_packet| are swapped from // |mutable_packet| into the QuicTransmissionInfo. void AddSentPacket(SerializedPacket* mutable_packet, TransmissionType transmission_type, QuicTime sent_time, @@ -76,19 +76,19 @@ class QUICHE_EXPORT QuicUnackedPacketMap { // TODO(fayang): Consider to combine this with NeuterUnencryptedPackets. absl::InlinedVector NeuterHandshakePackets(); - // Returns true if |packet_number| has retransmittable frames. This will - // return false if all frames of this packet are either non-retransmittable or + // Returns true if |packet_number| has retransmissible frames. This will + // return false if all frames of this packet are either non-retransmissible or // have been acked. - bool HasRetransmittableFrames(QuicPacketNumber packet_number) const; + bool HasRetransmissibleFrames(QuicPacketNumber packet_number) const; - // Returns true if |info| has retransmittable frames. This will return false - // if all frames of this packet are either non-retransmittable or have been + // Returns true if |info| has retransmissible frames. This will return false + // if all frames of this packet are either non-retransmissible or have been // acked. - bool HasRetransmittableFrames(const QuicTransmissionInfo& info) const; + bool HasRetransmissibleFrames(const QuicTransmissionInfo& info) const; - // Returns true if there are any unacked packets which have retransmittable + // Returns true if there are any unacked packets which have retransmissible // frames. - bool HasUnackedRetransmittableFrames() const; + bool HasUnackedRetransmissibleFrames() const; // Returns true if there are no packets present in the unacked packet map. bool empty() const { return unacked_packets_.empty(); } @@ -158,14 +158,14 @@ class QUICHE_EXPORT QuicUnackedPacketMap { return session_notifier_->HasUnackedStreamData(); } - // Removes any retransmittable frames from this transmission or an associated + // Removes any retransmissible frames from this transmission or an associated // transmission. It removes now useless transmissions, and disconnects any // other packets from other transmissions. - void RemoveRetransmittability(QuicTransmissionInfo* info); + void RemoveRetransmissibility(QuicTransmissionInfo* info); // Looks up the QuicTransmissionInfo by |packet_number| and calls - // RemoveRetransmittability. - void RemoveRetransmittability(QuicPacketNumber packet_number); + // RemoveRetransmissibility. + void RemoveRetransmissibility(QuicPacketNumber packet_number); // Increases the largest acked. Any packets less or equal to // |largest_acked| are discarded if they are only for the RTT purposes. @@ -205,9 +205,9 @@ class QUICHE_EXPORT QuicUnackedPacketMap { QuicPacketNumber GetLargestAckedOfPacketNumberSpace( PacketNumberSpace packet_number_space) const; - // Returns largest sent retransmittable packet number of + // Returns largest sent retransmissible packet number of // |packet_number_space|. - QuicPacketNumber GetLargestSentRetransmittableOfPacketNumberSpace( + QuicPacketNumber GetLargestSentRetransmissibleOfPacketNumberSpace( PacketNumberSpace packet_number_space) const; // Returns largest sent packet number of |encryption_level|. @@ -230,7 +230,7 @@ class QUICHE_EXPORT QuicUnackedPacketMap { void EnableMultiplePacketNumberSpacesSupport(); - // Returns a bitfield of retransmittable frames of last packet in + // Returns a bitfield of retransmissible frames of last packet in // unacked_packets_. For example, if the packet contains STREAM_FRAME, content // & (1 << STREAM_FRAME) would be set. Returns max uint32_t if // unacked_packets_ is empty. @@ -267,9 +267,9 @@ class QUICHE_EXPORT QuicUnackedPacketMap { bool IsPacketUsefulForCongestionControl( const QuicTransmissionInfo& info) const; - // Returns true if packet may be associated with retransmittable data + // Returns true if packet may be associated with retransmissible data // directly or through retransmissions. - bool IsPacketUsefulForRetransmittableData( + bool IsPacketUsefulForRetransmissibleData( const QuicTransmissionInfo& info) const; // Returns true if the packet no longer has a purpose in the map. @@ -282,7 +282,7 @@ class QUICHE_EXPORT QuicUnackedPacketMap { // The largest sent packet we expect to receive an ack for per packet number // space. QuicPacketNumber - largest_sent_retransmittable_packets_[NUM_PACKET_NUMBER_SPACES]; + largest_sent_retransmissible_packets_[NUM_PACKET_NUMBER_SPACES]; // The largest sent largest_acked in an ACK frame. QuicPacketNumber largest_sent_largest_acked_; // The largest received largest_acked from an ACK frame. @@ -290,13 +290,13 @@ class QUICHE_EXPORT QuicUnackedPacketMap { // The largest received largest_acked from ACK frame per packet number space. QuicPacketNumber largest_acked_packets_[NUM_PACKET_NUMBER_SPACES]; - // Newly serialized retransmittable packets are added to this map, which + // Newly serialized retransmissible packets are added to this map, which // contains owning pointers to any contained frames. If a packet is // retransmitted, this map will contain entries for both the old and the new - // packet. The old packet's retransmittable frames entry will be nullptr, + // packet. The old packet's retransmissible frames entry will be nullptr, // while the new packet's entry will contain the frames to retransmit. // If the old packet is acked before the new packet, then the old entry will - // be removed from the map and the new entry's retransmittable frames will be + // be removed from the map and the new entry's retransmissible frames will be // set to nullptr. quiche::QuicheCircularDeque unacked_packets_; diff --git a/quiche/quic/core/quic_unacked_packet_map_test.cc b/quiche/quic/core/quic_unacked_packet_map_test.cc index a8510db81..2001b7e7a 100644 --- a/quiche/quic/core/quic_unacked_packet_map_test.cc +++ b/quiche/quic/core/quic_unacked_packet_map_test.cc @@ -40,25 +40,25 @@ class QuicUnackedPacketMapTest : public QuicTestWithParam { ~QuicUnackedPacketMapTest() override {} - SerializedPacket CreateRetransmittablePacket(uint64_t packet_number) { - return CreateRetransmittablePacketForStream( + SerializedPacket CreateRetransmissiblePacket(uint64_t packet_number) { + return CreateRetransmissiblePacketForStream( packet_number, QuicUtils::GetFirstBidirectionalStreamId( CurrentSupportedVersions()[0].transport_version, Perspective::IS_CLIENT)); } - SerializedPacket CreateRetransmittablePacketForStream( + SerializedPacket CreateRetransmissiblePacketForStream( uint64_t packet_number, QuicStreamId stream_id) { SerializedPacket packet(QuicPacketNumber(packet_number), PACKET_1BYTE_PACKET_NUMBER, nullptr, kDefaultLength, false, false); QuicStreamFrame frame; frame.stream_id = stream_id; - packet.retransmittable_frames.push_back(QuicFrame(frame)); + packet.retransmissible_frames.push_back(QuicFrame(frame)); return packet; } - SerializedPacket CreateNonRetransmittablePacket(uint64_t packet_number) { + SerializedPacket CreateNonRetransmissiblePacket(uint64_t packet_number) { return SerializedPacket(QuicPacketNumber(packet_number), PACKET_1BYTE_PACKET_NUMBER, nullptr, kDefaultLength, false, false); @@ -99,7 +99,7 @@ class QuicUnackedPacketMapTest : public QuicTestWithParam { unacked_packets_.RemoveObsoletePackets(); if (num_packets == 0) { EXPECT_TRUE(unacked_packets_.empty()); - EXPECT_FALSE(unacked_packets_.HasUnackedRetransmittableFrames()); + EXPECT_FALSE(unacked_packets_.HasUnackedRetransmissibleFrames()); return; } EXPECT_FALSE(unacked_packets_.empty()); @@ -110,18 +110,18 @@ class QuicUnackedPacketMapTest : public QuicTestWithParam { EXPECT_EQ(num_packets, unacked_packets_.GetNumUnackedPacketsDebugOnly()); } - void VerifyRetransmittablePackets(uint64_t* packets, size_t num_packets) { + void VerifyRetransmissiblePackets(uint64_t* packets, size_t num_packets) { unacked_packets_.RemoveObsoletePackets(); - size_t num_retransmittable_packets = 0; + size_t num_retransmissible_packets = 0; for (auto it = unacked_packets_.begin(); it != unacked_packets_.end(); ++it) { - if (unacked_packets_.HasRetransmittableFrames(*it)) { - ++num_retransmittable_packets; + if (unacked_packets_.HasRetransmissibleFrames(*it)) { + ++num_retransmissible_packets; } } - EXPECT_EQ(num_packets, num_retransmittable_packets); + EXPECT_EQ(num_packets, num_retransmissible_packets); for (size_t i = 0; i < num_packets; ++i) { - EXPECT_TRUE(unacked_packets_.HasRetransmittableFrames( + EXPECT_TRUE(unacked_packets_.HasRetransmissibleFrames( QuicPacketNumber(packets[i]))) << " packets[" << i << "]:" << packets[i]; } @@ -136,14 +136,14 @@ class QuicUnackedPacketMapTest : public QuicTestWithParam { void RetransmitAndSendPacket(uint64_t old_packet_number, uint64_t new_packet_number, TransmissionType transmission_type) { - QUICHE_DCHECK(unacked_packets_.HasRetransmittableFrames( + QUICHE_DCHECK(unacked_packets_.HasRetransmissibleFrames( QuicPacketNumber(old_packet_number))); QuicTransmissionInfo* info = unacked_packets_.GetMutableTransmissionInfo( QuicPacketNumber(old_packet_number)); QuicStreamId stream_id = QuicUtils::GetFirstBidirectionalStreamId( CurrentSupportedVersions()[0].transport_version, Perspective::IS_CLIENT); - for (const auto& frame : info->retransmittable_frames) { + for (const auto& frame : info->retransmissible_frames) { if (frame.type == STREAM_FRAME) { stream_id = frame.stream_frame.stream_id; break; @@ -154,7 +154,7 @@ class QuicUnackedPacketMapTest : public QuicTestWithParam { QuicUtils::RetransmissionTypeToPacketState(transmission_type)); info->first_sent_after_loss = QuicPacketNumber(new_packet_number); SerializedPacket packet( - CreateRetransmittablePacketForStream(new_packet_number, stream_id)); + CreateRetransmissiblePacketForStream(new_packet_number, stream_id)); unacked_packets_.AddSentPacket(&packet, transmission_type, now_, true, true, ECN_NOT_ECT); } @@ -170,89 +170,89 @@ INSTANTIATE_TEST_SUITE_P(Tests, QuicUnackedPacketMapTest, TEST_P(QuicUnackedPacketMapTest, RttOnly) { // Acks are only tracked for RTT measurement purposes. - SerializedPacket packet(CreateNonRetransmittablePacket(1)); + SerializedPacket packet(CreateNonRetransmissiblePacket(1)); unacked_packets_.AddSentPacket(&packet, NOT_RETRANSMISSION, now_, false, true, ECN_NOT_ECT); uint64_t unacked[] = {1}; VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); VerifyInFlightPackets(nullptr, 0); - VerifyRetransmittablePackets(nullptr, 0); + VerifyRetransmissiblePackets(nullptr, 0); unacked_packets_.IncreaseLargestAcked(QuicPacketNumber(1)); VerifyUnackedPackets(nullptr, 0); VerifyInFlightPackets(nullptr, 0); - VerifyRetransmittablePackets(nullptr, 0); + VerifyRetransmissiblePackets(nullptr, 0); } -TEST_P(QuicUnackedPacketMapTest, RetransmittableInflightAndRtt) { - // Simulate a retransmittable packet being sent and acked. - SerializedPacket packet(CreateRetransmittablePacket(1)); +TEST_P(QuicUnackedPacketMapTest, RetransmissibleInflightAndRtt) { + // Simulate a retransmissible packet being sent and acked. + SerializedPacket packet(CreateRetransmissiblePacket(1)); unacked_packets_.AddSentPacket(&packet, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); uint64_t unacked[] = {1}; VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); VerifyInFlightPackets(unacked, ABSL_ARRAYSIZE(unacked)); - VerifyRetransmittablePackets(unacked, ABSL_ARRAYSIZE(unacked)); + VerifyRetransmissiblePackets(unacked, ABSL_ARRAYSIZE(unacked)); - unacked_packets_.RemoveRetransmittability(QuicPacketNumber(1)); + unacked_packets_.RemoveRetransmissibility(QuicPacketNumber(1)); VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); VerifyInFlightPackets(unacked, ABSL_ARRAYSIZE(unacked)); - VerifyRetransmittablePackets(nullptr, 0); + VerifyRetransmissiblePackets(nullptr, 0); unacked_packets_.IncreaseLargestAcked(QuicPacketNumber(1)); VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); VerifyInFlightPackets(unacked, ABSL_ARRAYSIZE(unacked)); - VerifyRetransmittablePackets(nullptr, 0); + VerifyRetransmissiblePackets(nullptr, 0); unacked_packets_.RemoveFromInFlight(QuicPacketNumber(1)); VerifyUnackedPackets(nullptr, 0); VerifyInFlightPackets(nullptr, 0); - VerifyRetransmittablePackets(nullptr, 0); + VerifyRetransmissiblePackets(nullptr, 0); } TEST_P(QuicUnackedPacketMapTest, StopRetransmission) { const QuicStreamId stream_id = 2; - SerializedPacket packet(CreateRetransmittablePacketForStream(1, stream_id)); + SerializedPacket packet(CreateRetransmissiblePacketForStream(1, stream_id)); unacked_packets_.AddSentPacket(&packet, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); uint64_t unacked[] = {1}; VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); VerifyInFlightPackets(unacked, ABSL_ARRAYSIZE(unacked)); - uint64_t retransmittable[] = {1}; - VerifyRetransmittablePackets(retransmittable, - ABSL_ARRAYSIZE(retransmittable)); + uint64_t retransmissible[] = {1}; + VerifyRetransmissiblePackets(retransmissible, + ABSL_ARRAYSIZE(retransmissible)); EXPECT_CALL(notifier_, IsFrameOutstanding(_)).WillRepeatedly(Return(false)); VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); VerifyInFlightPackets(unacked, ABSL_ARRAYSIZE(unacked)); - VerifyRetransmittablePackets(nullptr, 0); + VerifyRetransmissiblePackets(nullptr, 0); } TEST_P(QuicUnackedPacketMapTest, StopRetransmissionOnOtherStream) { const QuicStreamId stream_id = 2; - SerializedPacket packet(CreateRetransmittablePacketForStream(1, stream_id)); + SerializedPacket packet(CreateRetransmissiblePacketForStream(1, stream_id)); unacked_packets_.AddSentPacket(&packet, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); uint64_t unacked[] = {1}; VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); VerifyInFlightPackets(unacked, ABSL_ARRAYSIZE(unacked)); - uint64_t retransmittable[] = {1}; - VerifyRetransmittablePackets(retransmittable, - ABSL_ARRAYSIZE(retransmittable)); + uint64_t retransmissible[] = {1}; + VerifyRetransmissiblePackets(retransmissible, + ABSL_ARRAYSIZE(retransmissible)); VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); VerifyInFlightPackets(unacked, ABSL_ARRAYSIZE(unacked)); - VerifyRetransmittablePackets(retransmittable, - ABSL_ARRAYSIZE(retransmittable)); + VerifyRetransmissiblePackets(retransmissible, + ABSL_ARRAYSIZE(retransmissible)); } TEST_P(QuicUnackedPacketMapTest, StopRetransmissionAfterRetransmission) { const QuicStreamId stream_id = 2; - SerializedPacket packet1(CreateRetransmittablePacketForStream(1, stream_id)); + SerializedPacket packet1(CreateRetransmissiblePacketForStream(1, stream_id)); unacked_packets_.AddSentPacket(&packet1, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); RetransmitAndSendPacket(1, 2, LOSS_RETRANSMISSION); @@ -260,19 +260,19 @@ TEST_P(QuicUnackedPacketMapTest, StopRetransmissionAfterRetransmission) { uint64_t unacked[] = {1, 2}; VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); VerifyInFlightPackets(unacked, ABSL_ARRAYSIZE(unacked)); - std::vector retransmittable = {1, 2}; - VerifyRetransmittablePackets(&retransmittable[0], retransmittable.size()); + std::vector retransmissible = {1, 2}; + VerifyRetransmissiblePackets(&retransmissible[0], retransmissible.size()); EXPECT_CALL(notifier_, IsFrameOutstanding(_)).WillRepeatedly(Return(false)); VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); VerifyInFlightPackets(unacked, ABSL_ARRAYSIZE(unacked)); - VerifyRetransmittablePackets(nullptr, 0); + VerifyRetransmissiblePackets(nullptr, 0); } TEST_P(QuicUnackedPacketMapTest, RetransmittedPacket) { - // Simulate a retransmittable packet being sent, retransmitted, and the first + // Simulate a retransmissible packet being sent, retransmitted, and the first // transmission being acked. - SerializedPacket packet1(CreateRetransmittablePacket(1)); + SerializedPacket packet1(CreateRetransmissiblePacket(1)); unacked_packets_.AddSentPacket(&packet1, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); RetransmitAndSendPacket(1, 2, LOSS_RETRANSMISSION); @@ -280,55 +280,55 @@ TEST_P(QuicUnackedPacketMapTest, RetransmittedPacket) { uint64_t unacked[] = {1, 2}; VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); VerifyInFlightPackets(unacked, ABSL_ARRAYSIZE(unacked)); - std::vector retransmittable = {1, 2}; - VerifyRetransmittablePackets(&retransmittable[0], retransmittable.size()); + std::vector retransmissible = {1, 2}; + VerifyRetransmissiblePackets(&retransmissible[0], retransmissible.size()); EXPECT_CALL(notifier_, IsFrameOutstanding(_)).WillRepeatedly(Return(false)); - unacked_packets_.RemoveRetransmittability(QuicPacketNumber(1)); + unacked_packets_.RemoveRetransmissibility(QuicPacketNumber(1)); VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); VerifyInFlightPackets(unacked, ABSL_ARRAYSIZE(unacked)); - VerifyRetransmittablePackets(nullptr, 0); + VerifyRetransmissiblePackets(nullptr, 0); unacked_packets_.IncreaseLargestAcked(QuicPacketNumber(2)); VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); VerifyInFlightPackets(unacked, ABSL_ARRAYSIZE(unacked)); - VerifyRetransmittablePackets(nullptr, 0); + VerifyRetransmissiblePackets(nullptr, 0); unacked_packets_.RemoveFromInFlight(QuicPacketNumber(2)); uint64_t unacked2[] = {1}; VerifyUnackedPackets(unacked2, ABSL_ARRAYSIZE(unacked2)); VerifyInFlightPackets(unacked2, ABSL_ARRAYSIZE(unacked2)); - VerifyRetransmittablePackets(nullptr, 0); + VerifyRetransmissiblePackets(nullptr, 0); unacked_packets_.RemoveFromInFlight(QuicPacketNumber(1)); VerifyUnackedPackets(nullptr, 0); VerifyInFlightPackets(nullptr, 0); - VerifyRetransmittablePackets(nullptr, 0); + VerifyRetransmissiblePackets(nullptr, 0); } TEST_P(QuicUnackedPacketMapTest, RetransmitThreeTimes) { - // Simulate a retransmittable packet being sent and retransmitted twice. - SerializedPacket packet1(CreateRetransmittablePacket(1)); + // Simulate a retransmissible packet being sent and retransmitted twice. + SerializedPacket packet1(CreateRetransmissiblePacket(1)); unacked_packets_.AddSentPacket(&packet1, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); - SerializedPacket packet2(CreateRetransmittablePacket(2)); + SerializedPacket packet2(CreateRetransmissiblePacket(2)); unacked_packets_.AddSentPacket(&packet2, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); uint64_t unacked[] = {1, 2}; VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); VerifyInFlightPackets(unacked, ABSL_ARRAYSIZE(unacked)); - uint64_t retransmittable[] = {1, 2}; - VerifyRetransmittablePackets(retransmittable, - ABSL_ARRAYSIZE(retransmittable)); + uint64_t retransmissible[] = {1, 2}; + VerifyRetransmissiblePackets(retransmissible, + ABSL_ARRAYSIZE(retransmissible)); // Early retransmit 1 as 3 and send new data as 4. unacked_packets_.IncreaseLargestAcked(QuicPacketNumber(2)); unacked_packets_.RemoveFromInFlight(QuicPacketNumber(2)); - unacked_packets_.RemoveRetransmittability(QuicPacketNumber(2)); + unacked_packets_.RemoveRetransmissibility(QuicPacketNumber(2)); unacked_packets_.RemoveFromInFlight(QuicPacketNumber(1)); RetransmitAndSendPacket(1, 3, LOSS_RETRANSMISSION); - SerializedPacket packet4(CreateRetransmittablePacket(4)); + SerializedPacket packet4(CreateRetransmissiblePacket(4)); unacked_packets_.AddSentPacket(&packet4, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); @@ -336,35 +336,35 @@ TEST_P(QuicUnackedPacketMapTest, RetransmitThreeTimes) { VerifyUnackedPackets(unacked2, ABSL_ARRAYSIZE(unacked2)); uint64_t pending2[] = {3, 4}; VerifyInFlightPackets(pending2, ABSL_ARRAYSIZE(pending2)); - std::vector retransmittable2 = {1, 3, 4}; - VerifyRetransmittablePackets(&retransmittable2[0], retransmittable2.size()); + std::vector retransmissible2 = {1, 3, 4}; + VerifyRetransmissiblePackets(&retransmissible2[0], retransmissible2.size()); // Early retransmit 3 (formerly 1) as 5, and remove 1 from unacked. unacked_packets_.IncreaseLargestAcked(QuicPacketNumber(4)); unacked_packets_.RemoveFromInFlight(QuicPacketNumber(4)); - unacked_packets_.RemoveRetransmittability(QuicPacketNumber(4)); + unacked_packets_.RemoveRetransmissibility(QuicPacketNumber(4)); RetransmitAndSendPacket(3, 5, LOSS_RETRANSMISSION); - SerializedPacket packet6(CreateRetransmittablePacket(6)); + SerializedPacket packet6(CreateRetransmissiblePacket(6)); unacked_packets_.AddSentPacket(&packet6, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); std::vector unacked3 = {3, 5, 6}; - std::vector retransmittable3 = {3, 5, 6}; + std::vector retransmissible3 = {3, 5, 6}; VerifyUnackedPackets(&unacked3[0], unacked3.size()); - VerifyRetransmittablePackets(&retransmittable3[0], retransmittable3.size()); + VerifyRetransmissiblePackets(&retransmissible3[0], retransmissible3.size()); uint64_t pending3[] = {3, 5, 6}; VerifyInFlightPackets(pending3, ABSL_ARRAYSIZE(pending3)); // Early retransmit 5 as 7 and ensure in flight packet 3 is not removed. unacked_packets_.IncreaseLargestAcked(QuicPacketNumber(6)); unacked_packets_.RemoveFromInFlight(QuicPacketNumber(6)); - unacked_packets_.RemoveRetransmittability(QuicPacketNumber(6)); + unacked_packets_.RemoveRetransmissibility(QuicPacketNumber(6)); RetransmitAndSendPacket(5, 7, LOSS_RETRANSMISSION); std::vector unacked4 = {3, 5, 7}; - std::vector retransmittable4 = {3, 5, 7}; + std::vector retransmissible4 = {3, 5, 7}; VerifyUnackedPackets(&unacked4[0], unacked4.size()); - VerifyRetransmittablePackets(&retransmittable4[0], retransmittable4.size()); + VerifyRetransmissiblePackets(&retransmissible4[0], retransmissible4.size()); uint64_t pending4[] = {3, 5, 7}; VerifyInFlightPackets(pending4, ABSL_ARRAYSIZE(pending4)); @@ -376,25 +376,25 @@ TEST_P(QuicUnackedPacketMapTest, RetransmitThreeTimes) { } TEST_P(QuicUnackedPacketMapTest, RetransmitFourTimes) { - // Simulate a retransmittable packet being sent and retransmitted twice. - SerializedPacket packet1(CreateRetransmittablePacket(1)); + // Simulate a retransmissible packet being sent and retransmitted twice. + SerializedPacket packet1(CreateRetransmissiblePacket(1)); unacked_packets_.AddSentPacket(&packet1, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); - SerializedPacket packet2(CreateRetransmittablePacket(2)); + SerializedPacket packet2(CreateRetransmissiblePacket(2)); unacked_packets_.AddSentPacket(&packet2, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); uint64_t unacked[] = {1, 2}; VerifyUnackedPackets(unacked, ABSL_ARRAYSIZE(unacked)); VerifyInFlightPackets(unacked, ABSL_ARRAYSIZE(unacked)); - uint64_t retransmittable[] = {1, 2}; - VerifyRetransmittablePackets(retransmittable, - ABSL_ARRAYSIZE(retransmittable)); + uint64_t retransmissible[] = {1, 2}; + VerifyRetransmissiblePackets(retransmissible, + ABSL_ARRAYSIZE(retransmissible)); // Early retransmit 1 as 3. unacked_packets_.IncreaseLargestAcked(QuicPacketNumber(2)); unacked_packets_.RemoveFromInFlight(QuicPacketNumber(2)); - unacked_packets_.RemoveRetransmittability(QuicPacketNumber(2)); + unacked_packets_.RemoveRetransmissibility(QuicPacketNumber(2)); unacked_packets_.RemoveFromInFlight(QuicPacketNumber(1)); RetransmitAndSendPacket(1, 3, LOSS_RETRANSMISSION); @@ -402,12 +402,12 @@ TEST_P(QuicUnackedPacketMapTest, RetransmitFourTimes) { VerifyUnackedPackets(unacked2, ABSL_ARRAYSIZE(unacked2)); uint64_t pending2[] = {3}; VerifyInFlightPackets(pending2, ABSL_ARRAYSIZE(pending2)); - std::vector retransmittable2 = {1, 3}; - VerifyRetransmittablePackets(&retransmittable2[0], retransmittable2.size()); + std::vector retransmissible2 = {1, 3}; + VerifyRetransmissiblePackets(&retransmissible2[0], retransmissible2.size()); // PTO 3 (formerly 1) as 4, and don't remove 1 from unacked. RetransmitAndSendPacket(3, 4, PTO_RETRANSMISSION); - SerializedPacket packet5(CreateRetransmittablePacket(5)); + SerializedPacket packet5(CreateRetransmissiblePacket(5)); unacked_packets_.AddSentPacket(&packet5, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); @@ -415,13 +415,13 @@ TEST_P(QuicUnackedPacketMapTest, RetransmitFourTimes) { VerifyUnackedPackets(unacked3, ABSL_ARRAYSIZE(unacked3)); uint64_t pending3[] = {3, 4, 5}; VerifyInFlightPackets(pending3, ABSL_ARRAYSIZE(pending3)); - std::vector retransmittable3 = {1, 3, 4, 5}; - VerifyRetransmittablePackets(&retransmittable3[0], retransmittable3.size()); + std::vector retransmissible3 = {1, 3, 4, 5}; + VerifyRetransmissiblePackets(&retransmissible3[0], retransmissible3.size()); // Early retransmit 4 as 6 and ensure in flight packet 3 is removed. unacked_packets_.IncreaseLargestAcked(QuicPacketNumber(5)); unacked_packets_.RemoveFromInFlight(QuicPacketNumber(5)); - unacked_packets_.RemoveRetransmittability(QuicPacketNumber(5)); + unacked_packets_.RemoveRetransmissibility(QuicPacketNumber(5)); unacked_packets_.RemoveFromInFlight(QuicPacketNumber(3)); unacked_packets_.RemoveFromInFlight(QuicPacketNumber(4)); RetransmitAndSendPacket(4, 6, LOSS_RETRANSMISSION); @@ -430,17 +430,17 @@ TEST_P(QuicUnackedPacketMapTest, RetransmitFourTimes) { VerifyUnackedPackets(&unacked4[0], unacked4.size()); uint64_t pending4[] = {6}; VerifyInFlightPackets(pending4, ABSL_ARRAYSIZE(pending4)); - std::vector retransmittable4 = {4, 6}; - VerifyRetransmittablePackets(&retransmittable4[0], retransmittable4.size()); + std::vector retransmissible4 = {4, 6}; + VerifyRetransmissiblePackets(&retransmissible4[0], retransmissible4.size()); } TEST_P(QuicUnackedPacketMapTest, SendWithGap) { - // Simulate a retransmittable packet being sent, retransmitted, and the first + // Simulate a retransmissible packet being sent, retransmitted, and the first // transmission being acked. - SerializedPacket packet1(CreateRetransmittablePacket(1)); + SerializedPacket packet1(CreateRetransmissiblePacket(1)); unacked_packets_.AddSentPacket(&packet1, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); - SerializedPacket packet3(CreateRetransmittablePacket(3)); + SerializedPacket packet3(CreateRetransmissiblePacket(3)); unacked_packets_.AddSentPacket(&packet3, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); RetransmitAndSendPacket(3, 5, LOSS_RETRANSMISSION); @@ -461,19 +461,19 @@ TEST_P(QuicUnackedPacketMapTest, AggregateContiguousAckedStreamFrames) { QuicTransmissionInfo info1; QuicStreamFrame stream_frame1(3, false, 0, 100); - info1.retransmittable_frames.push_back(QuicFrame(stream_frame1)); + info1.retransmissible_frames.push_back(QuicFrame(stream_frame1)); QuicTransmissionInfo info2; QuicStreamFrame stream_frame2(3, false, 100, 100); - info2.retransmittable_frames.push_back(QuicFrame(stream_frame2)); + info2.retransmissible_frames.push_back(QuicFrame(stream_frame2)); QuicTransmissionInfo info3; QuicStreamFrame stream_frame3(3, false, 200, 100); - info3.retransmittable_frames.push_back(QuicFrame(stream_frame3)); + info3.retransmissible_frames.push_back(QuicFrame(stream_frame3)); QuicTransmissionInfo info4; QuicStreamFrame stream_frame4(3, true, 300, 0); - info4.retransmittable_frames.push_back(QuicFrame(stream_frame4)); + info4.retransmissible_frames.push_back(QuicFrame(stream_frame4)); // Verify stream frames are aggregated. EXPECT_CALL(notifier_, OnFrameAcked(_, _, _)).Times(0); @@ -512,7 +512,7 @@ TEST_P(QuicUnackedPacketMapTest, CannotAggregateIfDataLengthOverflow) { QuicTransmissionInfo info; QuicStreamFrame stream_frame(stream_id, false, offset, acked_stream_length); - info.retransmittable_frames.push_back(QuicFrame(stream_frame)); + info.retransmissible_frames.push_back(QuicFrame(stream_frame)); const QuicStreamFrame& aggregated_stream_frame = QuicUnackedPacketMapPeer::GetAggregatedStreamFrame(unacked_packets_); @@ -541,7 +541,7 @@ TEST_P(QuicUnackedPacketMapTest, CannotAggregateIfDataLengthOverflow) { // Ack the last frame of the stream. QuicTransmissionInfo info; QuicStreamFrame stream_frame(stream_id, true, offset, acked_stream_length); - info.retransmittable_frames.push_back(QuicFrame(stream_frame)); + info.retransmissible_frames.push_back(QuicFrame(stream_frame)); EXPECT_CALL(notifier_, OnFrameAcked(_, _, _)).Times(1); unacked_packets_.MaybeAggregateAckedStreamFrame( info, QuicTime::Delta::Zero(), QuicTime::Zero()); @@ -558,13 +558,13 @@ TEST_P(QuicUnackedPacketMapTest, CannotAggregateAckedControlFrames) { QuicGoAwayFrame go_away(3, QUIC_PEER_GOING_AWAY, 5, "Going away."); QuicTransmissionInfo info1; - info1.retransmittable_frames.push_back(QuicFrame(window_update)); - info1.retransmittable_frames.push_back(QuicFrame(stream_frame1)); - info1.retransmittable_frames.push_back(QuicFrame(stream_frame2)); + info1.retransmissible_frames.push_back(QuicFrame(window_update)); + info1.retransmissible_frames.push_back(QuicFrame(stream_frame1)); + info1.retransmissible_frames.push_back(QuicFrame(stream_frame2)); QuicTransmissionInfo info2; - info2.retransmittable_frames.push_back(QuicFrame(blocked)); - info2.retransmittable_frames.push_back(QuicFrame(&go_away)); + info2.retransmissible_frames.push_back(QuicFrame(blocked)); + info2.retransmissible_frames.push_back(QuicFrame(&go_away)); // Verify 2 contiguous stream frames are aggregated. EXPECT_CALL(notifier_, OnFrameAcked(_, _, _)).Times(1); @@ -583,77 +583,77 @@ TEST_P(QuicUnackedPacketMapTest, LargestSentPacketMultiplePacketNumberSpaces) { unacked_packets_.EnableMultiplePacketNumberSpacesSupport(); EXPECT_FALSE( unacked_packets_ - .GetLargestSentRetransmittableOfPacketNumberSpace(INITIAL_DATA) + .GetLargestSentRetransmissibleOfPacketNumberSpace(INITIAL_DATA) .IsInitialized()); // Send packet 1. - SerializedPacket packet1(CreateRetransmittablePacket(1)); + SerializedPacket packet1(CreateRetransmissiblePacket(1)); packet1.encryption_level = ENCRYPTION_INITIAL; unacked_packets_.AddSentPacket(&packet1, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); EXPECT_EQ(QuicPacketNumber(1u), unacked_packets_.largest_sent_packet()); EXPECT_EQ(QuicPacketNumber(1), - unacked_packets_.GetLargestSentRetransmittableOfPacketNumberSpace( + unacked_packets_.GetLargestSentRetransmissibleOfPacketNumberSpace( INITIAL_DATA)); EXPECT_FALSE( unacked_packets_ - .GetLargestSentRetransmittableOfPacketNumberSpace(HANDSHAKE_DATA) + .GetLargestSentRetransmissibleOfPacketNumberSpace(HANDSHAKE_DATA) .IsInitialized()); // Send packet 2. - SerializedPacket packet2(CreateRetransmittablePacket(2)); + SerializedPacket packet2(CreateRetransmissiblePacket(2)); packet2.encryption_level = ENCRYPTION_HANDSHAKE; unacked_packets_.AddSentPacket(&packet2, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); EXPECT_EQ(QuicPacketNumber(2u), unacked_packets_.largest_sent_packet()); EXPECT_EQ(QuicPacketNumber(1), - unacked_packets_.GetLargestSentRetransmittableOfPacketNumberSpace( + unacked_packets_.GetLargestSentRetransmissibleOfPacketNumberSpace( INITIAL_DATA)); EXPECT_EQ(QuicPacketNumber(2), - unacked_packets_.GetLargestSentRetransmittableOfPacketNumberSpace( + unacked_packets_.GetLargestSentRetransmissibleOfPacketNumberSpace( HANDSHAKE_DATA)); EXPECT_FALSE( unacked_packets_ - .GetLargestSentRetransmittableOfPacketNumberSpace(APPLICATION_DATA) + .GetLargestSentRetransmissibleOfPacketNumberSpace(APPLICATION_DATA) .IsInitialized()); // Send packet 3. - SerializedPacket packet3(CreateRetransmittablePacket(3)); + SerializedPacket packet3(CreateRetransmissiblePacket(3)); packet3.encryption_level = ENCRYPTION_ZERO_RTT; unacked_packets_.AddSentPacket(&packet3, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); EXPECT_EQ(QuicPacketNumber(3u), unacked_packets_.largest_sent_packet()); EXPECT_EQ(QuicPacketNumber(1), - unacked_packets_.GetLargestSentRetransmittableOfPacketNumberSpace( + unacked_packets_.GetLargestSentRetransmissibleOfPacketNumberSpace( INITIAL_DATA)); EXPECT_EQ(QuicPacketNumber(2), - unacked_packets_.GetLargestSentRetransmittableOfPacketNumberSpace( + unacked_packets_.GetLargestSentRetransmissibleOfPacketNumberSpace( HANDSHAKE_DATA)); EXPECT_EQ(QuicPacketNumber(3), - unacked_packets_.GetLargestSentRetransmittableOfPacketNumberSpace( + unacked_packets_.GetLargestSentRetransmissibleOfPacketNumberSpace( APPLICATION_DATA)); // Verify forward secure belongs to the same packet number space as encryption // zero rtt. EXPECT_EQ(QuicPacketNumber(3), - unacked_packets_.GetLargestSentRetransmittableOfPacketNumberSpace( + unacked_packets_.GetLargestSentRetransmissibleOfPacketNumberSpace( APPLICATION_DATA)); // Send packet 4. - SerializedPacket packet4(CreateRetransmittablePacket(4)); + SerializedPacket packet4(CreateRetransmissiblePacket(4)); packet4.encryption_level = ENCRYPTION_FORWARD_SECURE; unacked_packets_.AddSentPacket(&packet4, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); EXPECT_EQ(QuicPacketNumber(4u), unacked_packets_.largest_sent_packet()); EXPECT_EQ(QuicPacketNumber(1), - unacked_packets_.GetLargestSentRetransmittableOfPacketNumberSpace( + unacked_packets_.GetLargestSentRetransmissibleOfPacketNumberSpace( INITIAL_DATA)); EXPECT_EQ(QuicPacketNumber(2), - unacked_packets_.GetLargestSentRetransmittableOfPacketNumberSpace( + unacked_packets_.GetLargestSentRetransmissibleOfPacketNumberSpace( HANDSHAKE_DATA)); EXPECT_EQ(QuicPacketNumber(4), - unacked_packets_.GetLargestSentRetransmittableOfPacketNumberSpace( + unacked_packets_.GetLargestSentRetransmissibleOfPacketNumberSpace( APPLICATION_DATA)); // Verify forward secure belongs to the same packet number space as encryption // zero rtt. EXPECT_EQ(QuicPacketNumber(4), - unacked_packets_.GetLargestSentRetransmittableOfPacketNumberSpace( + unacked_packets_.GetLargestSentRetransmissibleOfPacketNumberSpace( APPLICATION_DATA)); EXPECT_TRUE(unacked_packets_.GetLastPacketContent() & (1 << STREAM_FRAME)); EXPECT_FALSE(unacked_packets_.GetLastPacketContent() & (1 << ACK_FRAME)); @@ -664,7 +664,7 @@ TEST_P(QuicUnackedPacketMapTest, ReserveInitialCapacityTest) { ASSERT_EQ(QuicUnackedPacketMapPeer::GetCapacity(unacked_packets), 0u); unacked_packets.ReserveInitialCapacity(16); QuicStreamId stream_id(1); - SerializedPacket packet(CreateRetransmittablePacketForStream(1, stream_id)); + SerializedPacket packet(CreateRetransmissiblePacketForStream(1, stream_id)); unacked_packets.AddSentPacket(&packet, TransmissionType::NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); ASSERT_EQ(QuicUnackedPacketMapPeer::GetCapacity(unacked_packets), 16u); @@ -676,7 +676,7 @@ TEST_P(QuicUnackedPacketMapTest, DebugString) { "largest_acked: uninitialized, bytes_in_flight: 0, " "packets_in_flight: 0}"); - SerializedPacket packet1(CreateRetransmittablePacket(1)); + SerializedPacket packet1(CreateRetransmissiblePacket(1)); unacked_packets_.AddSentPacket(&packet1, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); EXPECT_EQ( @@ -684,7 +684,7 @@ TEST_P(QuicUnackedPacketMapTest, DebugString) { "{size: 1, least_unacked: 1, largest_sent_packet: 1, largest_acked: " "uninitialized, bytes_in_flight: 1000, packets_in_flight: 1}"); - SerializedPacket packet2(CreateRetransmittablePacket(2)); + SerializedPacket packet2(CreateRetransmissiblePacket(2)); unacked_packets_.AddSentPacket(&packet2, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); unacked_packets_.RemoveFromInFlight(QuicPacketNumber(1)); @@ -697,13 +697,13 @@ TEST_P(QuicUnackedPacketMapTest, DebugString) { } TEST_P(QuicUnackedPacketMapTest, EcnInfoStored) { - SerializedPacket packet1(CreateRetransmittablePacket(1)); + SerializedPacket packet1(CreateRetransmissiblePacket(1)); unacked_packets_.AddSentPacket(&packet1, NOT_RETRANSMISSION, now_, true, true, ECN_NOT_ECT); - SerializedPacket packet2(CreateRetransmittablePacket(2)); + SerializedPacket packet2(CreateRetransmissiblePacket(2)); unacked_packets_.AddSentPacket(&packet2, NOT_RETRANSMISSION, now_, true, true, ECN_ECT0); - SerializedPacket packet3(CreateRetransmittablePacket(3)); + SerializedPacket packet3(CreateRetransmissiblePacket(3)); unacked_packets_.AddSentPacket(&packet3, NOT_RETRANSMISSION, now_, true, true, ECN_ECT1); EXPECT_EQ( diff --git a/quiche/quic/core/quic_utils.cc b/quiche/quic/core/quic_utils.cc index 5a8667388..266eeddac 100644 --- a/quiche/quic/core/quic_utils.cc +++ b/quiche/quic/core/quic_utils.cc @@ -240,7 +240,7 @@ bool QuicUtils::IsAckable(SentPacketState state) { } // static -bool QuicUtils::IsRetransmittableFrame(QuicFrameType type) { +bool QuicUtils::IsRetransmissibleFrame(QuicFrameType type) { switch (type) { case ACK_FRAME: case PADDING_FRAME: diff --git a/quiche/quic/core/quic_utils.h b/quiche/quic/core/quic_utils.h index 761914e4a..ad23c8efb 100644 --- a/quiche/quic/core/quic_utils.h +++ b/quiche/quic/core/quic_utils.h @@ -85,9 +85,9 @@ class QUICHE_EXPORT QuicUtils { // once, or if it's a crypto packet we never expect to receive an ack for. static bool IsAckable(SentPacketState state); - // Returns true if frame with |type| is retransmittable. A retransmittable + // Returns true if frame with |type| is retransmissible. A retransmissible // frame should be retransmitted if it is detected as lost. - static bool IsRetransmittableFrame(QuicFrameType type); + static bool IsRetransmissibleFrame(QuicFrameType type); // Returns true if |frame| is a handshake frame in version |version|. static bool IsHandshakeFrame(const QuicFrame& frame, @@ -215,7 +215,7 @@ class QUICHE_EXPORT QuicUtils { static bool AreStatelessResetTokensEqual(const StatelessResetToken& token1, const StatelessResetToken& token2); - // Return ture if this frame is an ack-eliciting frame. + // Return true if this frame is an ack-eliciting frame. static bool IsAckElicitingFrame(QuicFrameType type); }; diff --git a/quiche/quic/core/quic_versions.h b/quiche/quic/core/quic_versions.h index 3d7d151ae..865179a6d 100644 --- a/quiche/quic/core/quic_versions.h +++ b/quiche/quic/core/quic_versions.h @@ -96,7 +96,7 @@ enum QuicTransportVersion { // Version 39 writes integers and floating numbers in big endian, stops acking // acks, sends a connection level WINDOW_UPDATE every 20 sent packets which do - // not contain retransmittable frames. + // not contain retransmissible frames. // Version 40 was an attempt to convert QUIC to IETF frame format; it was // never shipped due to a bug. diff --git a/quiche/quic/core/tls_chlo_extractor_test.cc b/quiche/quic/core/tls_chlo_extractor_test.cc index 3d3f83fcd..b3af65ffb 100644 --- a/quiche/quic/core/tls_chlo_extractor_test.cc +++ b/quiche/quic/core/tls_chlo_extractor_test.cc @@ -81,7 +81,7 @@ class TlsChloExtractorTest : public QuicTestWithParam { client_session.GetMutableCryptoStream(), AlpnForVersion(client_connection->version())); - // For some reason, the test client can not receive the server settings and + // For some reason, the test client cannot receive the server settings and // the SSL_SESSION will not be inserted to client's session_cache. We create // a dummy settings and call SetServerApplicationStateForResumption manually // to ensure the SSL_SESSION is cached. diff --git a/quiche/quic/core/tls_client_handshaker.cc b/quiche/quic/core/tls_client_handshaker.cc index 0a9a7d2ee..d1ff0a49d 100644 --- a/quiche/quic/core/tls_client_handshaker.cc +++ b/quiche/quic/core/tls_client_handshaker.cc @@ -612,7 +612,7 @@ bool TlsClientHandshaker::ShouldCloseConnectionOnUnexpectedError( void TlsClientHandshaker::HandleZeroRttReject() { QUIC_LOG(INFO) << "0-RTT handshake attempted but was rejected by the server"; QUICHE_DCHECK(session_cache_); - // Disable encrytion to block outgoing data until 1-RTT keys are available. + // Disable encryption to block outgoing data until 1-RTT keys are available. encryption_established_ = false; handshaker_delegate()->OnZeroRttRejected(EarlyDataReason()); SSL_reset_early_data_reject(ssl()); diff --git a/quiche/quic/core/tls_client_handshaker_test.cc b/quiche/quic/core/tls_client_handshaker_test.cc index 414ecf2ed..5ccb478ff 100644 --- a/quiche/quic/core/tls_client_handshaker_test.cc +++ b/quiche/quic/core/tls_client_handshaker_test.cc @@ -449,7 +449,7 @@ TEST_P(TlsClientHandshakerTest, ZeroRttResumption) { } // Regression test for b/186438140. -TEST_P(TlsClientHandshakerTest, ZeroRttResumptionWithAyncProofVerifier) { +TEST_P(TlsClientHandshakerTest, ZeroRttResumptionWithAsyncProofVerifier) { // Finish establishing the first connection, so the second connection can // resume. CompleteCryptoHandshake(); diff --git a/quiche/quic/core/tls_server_handshaker.cc b/quiche/quic/core/tls_server_handshaker.cc index 5a8cb921d..b6198264d 100644 --- a/quiche/quic/core/tls_server_handshaker.cc +++ b/quiche/quic/core/tls_server_handshaker.cc @@ -453,7 +453,7 @@ bool TlsServerHandshaker::ProcessTransportParameters( extension_type = TLSEXT_TYPE_quic_transport_parameters_legacy; } // When using early select cert callback, SSL_get_peer_quic_transport_params - // can not be used to retrieve the client's transport parameters, but we can + // cannot be used to retrieve the client's transport parameters, but we can // use SSL_early_callback_ctx_extension_get to do that. if (!SSL_early_callback_ctx_extension_get(client_hello, extension_type, &client_params_bytes, diff --git a/quiche/quic/core/tls_server_handshaker_test.cc b/quiche/quic/core/tls_server_handshaker_test.cc index 39a34a55a..b13aab303 100644 --- a/quiche/quic/core/tls_server_handshaker_test.cc +++ b/quiche/quic/core/tls_server_handshaker_test.cc @@ -98,14 +98,14 @@ class TestTlsServerHandshaker : public TlsServerHandshaker { void SetupProofSourceHandle( FakeProofSourceHandle::Action select_cert_action, FakeProofSourceHandle::Action compute_signature_action, - QuicDelayedSSLConfig dealyed_ssl_config = QuicDelayedSSLConfig()) { + QuicDelayedSSLConfig delayed_ssl_config = QuicDelayedSSLConfig()) { EXPECT_CALL(*this, MaybeCreateProofSourceHandle()) .WillOnce( testing::Invoke([this, select_cert_action, compute_signature_action, - dealyed_ssl_config]() { + delayed_ssl_config]() { auto handle = std::make_unique( proof_source_, this, select_cert_action, - compute_signature_action, dealyed_ssl_config); + compute_signature_action, delayed_ssl_config); fake_proof_source_handle_ = handle.get(); return handle; })); @@ -449,7 +449,7 @@ INSTANTIATE_TEST_SUITE_P(TlsServerHandshakerTests, TlsServerHandshakerTest, ::testing::ValuesIn(GetTestParams()), ::testing::PrintToStringParamName()); -TEST_P(TlsServerHandshakerTest, NotInitiallyConected) { +TEST_P(TlsServerHandshakerTest, NotInitiallyConnected) { EXPECT_FALSE(server_stream()->encryption_established()); EXPECT_FALSE(server_stream()->one_rtt_keys_available()); } diff --git a/quiche/quic/core/uber_quic_stream_id_manager.cc b/quiche/quic/core/uber_quic_stream_id_manager.cc index 4779b8fd3..885c49233 100644 --- a/quiche/quic/core/uber_quic_stream_id_manager.cc +++ b/quiche/quic/core/uber_quic_stream_id_manager.cc @@ -109,12 +109,12 @@ void UberQuicStreamIdManager::MaybeSendMaxStreamsFrame() { } QuicStreamCount -UberQuicStreamIdManager::GetMaxAllowdIncomingBidirectionalStreams() const { +UberQuicStreamIdManager::GetMaxAllowedIncomingBidirectionalStreams() const { return bidirectional_stream_id_manager_.incoming_initial_max_open_streams(); } QuicStreamCount -UberQuicStreamIdManager::GetMaxAllowdIncomingUnidirectionalStreams() const { +UberQuicStreamIdManager::GetMaxAllowedIncomingUnidirectionalStreams() const { return unidirectional_stream_id_manager_.incoming_initial_max_open_streams(); } diff --git a/quiche/quic/core/uber_quic_stream_id_manager.h b/quiche/quic/core/uber_quic_stream_id_manager.h index 200ce2c64..251902cf3 100644 --- a/quiche/quic/core/uber_quic_stream_id_manager.h +++ b/quiche/quic/core/uber_quic_stream_id_manager.h @@ -75,9 +75,9 @@ class QUICHE_EXPORT UberQuicStreamIdManager { // generate and send a MAX_STREAMS frame. void MaybeSendMaxStreamsFrame(); - QuicStreamCount GetMaxAllowdIncomingBidirectionalStreams() const; + QuicStreamCount GetMaxAllowedIncomingBidirectionalStreams() const; - QuicStreamCount GetMaxAllowdIncomingUnidirectionalStreams() const; + QuicStreamCount GetMaxAllowedIncomingUnidirectionalStreams() const; QuicStreamId GetLargestPeerCreatedStreamId(bool unidirectional) const; diff --git a/quiche/quic/core/uber_quic_stream_id_manager_test.cc b/quiche/quic/core/uber_quic_stream_id_manager_test.cc index 7297fc2d6..afc28718a 100644 --- a/quiche/quic/core/uber_quic_stream_id_manager_test.cc +++ b/quiche/quic/core/uber_quic_stream_id_manager_test.cc @@ -171,9 +171,9 @@ TEST_P(UberQuicStreamIdManagerTest, SetMaxOpenIncomingStreams) { // Do +1 for bidirectional to ensure that uni- and bi- get properly set. manager_.SetMaxOpenIncomingBidirectionalStreams(kNumMaxIncomingStreams + 1); EXPECT_EQ(kNumMaxIncomingStreams + 1, - manager_.GetMaxAllowdIncomingBidirectionalStreams()); + manager_.GetMaxAllowedIncomingBidirectionalStreams()); EXPECT_EQ(kNumMaxIncomingStreams, - manager_.GetMaxAllowdIncomingUnidirectionalStreams()); + manager_.GetMaxAllowedIncomingUnidirectionalStreams()); EXPECT_EQ(manager_.max_incoming_bidirectional_streams(), manager_.advertised_max_incoming_bidirectional_streams()); EXPECT_EQ(manager_.max_incoming_unidirectional_streams(), diff --git a/quiche/quic/masque/masque_client_bin.cc b/quiche/quic/masque/masque_client_bin.cc index df74217bb..803a1ff38 100644 --- a/quiche/quic/masque/masque_client_bin.cc +++ b/quiche/quic/masque/masque_client_bin.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// This file is reponsible for the masque_client binary. It allows testing +// This file is responsible for the masque_client binary. It allows testing // our MASQUE client code by connecting to a MASQUE proxy and then sending // HTTP/3 requests to web servers tunnelled over that MASQUE connection. // e.g.: masque_client $PROXY_HOST:$PROXY_PORT $URL1 $URL2 @@ -48,7 +48,7 @@ DEFINE_QUICHE_COMMAND_LINE_FLAG( DEFINE_QUICHE_COMMAND_LINE_FLAG( bool, dns_on_client, false, "If set to true, masque_client will perform DNS for encapsulated URLs and " - "send the IP litteral in the CONNECT request. If set to false, " + "send the IP literal in the CONNECT request. If set to false, " "masque_client send the hostname in the CONNECT request."); DEFINE_QUICHE_COMMAND_LINE_FLAG( diff --git a/quiche/quic/masque/masque_server_bin.cc b/quiche/quic/masque/masque_server_bin.cc index 763ec55ef..60a05f138 100644 --- a/quiche/quic/masque/masque_server_bin.cc +++ b/quiche/quic/masque/masque_server_bin.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// This file is reponsible for the masque_server binary. It allows testing +// This file is responsible for the masque_server binary. It allows testing // our MASQUE server code by creating a MASQUE proxy that relays HTTP/3 // requests to web servers tunnelled over MASQUE connections. // e.g.: masque_server diff --git a/quiche/quic/moqt/moqt_parser.cc b/quiche/quic/moqt/moqt_parser.cc index 9ed3bc797..a3c4d5cf5 100644 --- a/quiche/quic/moqt/moqt_parser.cc +++ b/quiche/quic/moqt/moqt_parser.cc @@ -104,7 +104,7 @@ void MoqtParser::ProcessData(absl::string_view data, bool end_of_stream) { break; } // Non-OBJECT or OBJECT with the complete specified length, but the data - // was not parseable. + // was not parsable. ParseError("Not able to parse message given specified length"); return; } diff --git a/quiche/quic/moqt/moqt_parser.h b/quiche/quic/moqt/moqt_parser.h index bb235468b..c3c54f751 100644 --- a/quiche/quic/moqt/moqt_parser.h +++ b/quiche/quic/moqt/moqt_parser.h @@ -79,7 +79,7 @@ class QUICHE_EXPORT MoqtParser { bool end_of_stream); // The central switch statement to dispatch a message to the correct - // Process* function. Returns nullopt if it could not parse the full messsage + // Process* function. Returns nullopt if it could not parse the full message // (except for object payload). Otherwise, returns the number of bytes // processed. absl::optional ProcessMessage(absl::string_view data); @@ -133,7 +133,7 @@ class QUICHE_EXPORT MoqtParser { absl::optional object_metadata_ = absl::nullopt; bool processing_ = false; // True if currently in ProcessData(), to prevent - // re-entrancy. + // reentrancy. }; } // namespace moqt diff --git a/quiche/quic/moqt/moqt_parser_test.cc b/quiche/quic/moqt/moqt_parser_test.cc index cd4c40b2a..0175dc5f1 100644 --- a/quiche/quic/moqt/moqt_parser_test.cc +++ b/quiche/quic/moqt/moqt_parser_test.cc @@ -330,7 +330,7 @@ TEST_P(MoqtParserTest, MessageNoLengthSeparateFinOtherTypes) { TEST_P(MoqtParserTest, TwoPartMessage) { std::unique_ptr message = MakeMessage(message_type_); - // The test Object message has payload for less then half the message length, + // The test Object message has payload for less than half the message length, // so splitting the message in half will prevent the first half from being // processed. size_t first_data_size = message->total_message_size() / 2; @@ -358,7 +358,7 @@ TEST_P(MoqtParserTest, ThreePartObject) { } std::unique_ptr message = MakeMessage(message_type_); message->set_message_size(0); - // The test Object message has payload for less then half the message length, + // The test Object message has payload for less than half the message length, // so splitting the message in half will prevent the first half from being // processed. parser_.ProcessData(message->PacketSample(), false); diff --git a/quiche/quic/platform/api/quic_client_stats.h b/quiche/quic/platform/api/quic_client_stats.h index d18d6142a..f1c63045a 100644 --- a/quiche/quic/platform/api/quic_client_stats.h +++ b/quiche/quic/platform/api/quic_client_stats.h @@ -71,7 +71,7 @@ namespace quic { // Sample usage: // UMA_CLIENT_HISTOGRAM_CUSTOM_COUNTS("My.Histogram", 1, 100000000, 100, -// "Counters of hitting certian code."); +// "Counters of hitting certain code."); #define QUIC_CLIENT_HISTOGRAM_COUNTS(name, sample, min, max, bucket_count, \ docstring) \ diff --git a/quiche/quic/platform/api/quic_default_proof_providers.h b/quiche/quic/platform/api/quic_default_proof_providers.h index 59d9052ba..be6bba0c7 100644 --- a/quiche/quic/platform/api/quic_default_proof_providers.h +++ b/quiche/quic/platform/api/quic_default_proof_providers.h @@ -23,7 +23,7 @@ inline std::unique_ptr CreateDefaultProofVerifier( } // Provides a default proof source for CLI-based tools. The actual certificates -// used in the proof source should be confifgurable via command-line flags. +// used in the proof source should be configurable via command-line flags. inline std::unique_ptr CreateDefaultProofSource() { return quiche::CreateDefaultProofSource(); } diff --git a/quiche/quic/platform/api/quic_socket_address_test.cc b/quiche/quic/platform/api/quic_socket_address_test.cc index 9512c9f22..abdd2bcc3 100644 --- a/quiche/quic/platform/api/quic_socket_address_test.cc +++ b/quiche/quic/platform/api/quic_socket_address_test.cc @@ -68,7 +68,7 @@ TEST(QuicSocketAddress, FromSockaddrIPv6) { EXPECT_EQ("[::1]:443", QuicSocketAddress(address.storage).ToString()); } -TEST(QuicSocketAddres, ToSockaddrIPv4) { +TEST(QuicSocketAddress, ToSockaddrIPv4) { union { sockaddr_storage storage; sockaddr_in v4; diff --git a/quiche/quic/qbone/bonnet/tun_device_test.cc b/quiche/quic/qbone/bonnet/tun_device_test.cc index cc82a2f5b..536ac1f8e 100644 --- a/quiche/quic/qbone/bonnet/tun_device_test.cc +++ b/quiche/quic/qbone/bonnet/tun_device_test.cc @@ -28,7 +28,7 @@ const int kSupportedFeatures = // Quite a bit of EXPECT_CALL().Times(AnyNumber()).WillRepeatedly() are used to // make sure we can correctly set common expectations and override the // expectation with later call to EXPECT_CALL(). ON_CALL cannot be used here -// since when EPXECT_CALL overrides ON_CALL, it ignores the parameter matcher +// since when EXPECT_CALL overrides ON_CALL, it ignores the parameter matcher // which results in unexpected call even if ON_CALL exists. class TunDeviceTest : public QuicTest { protected: diff --git a/quiche/quic/qbone/platform/ip_range.cc b/quiche/quic/qbone/platform/ip_range.cc index 2ef1ef7e6..90ab7ae37 100644 --- a/quiche/quic/qbone/platform/ip_range.cc +++ b/quiche/quic/qbone/platform/ip_range.cc @@ -40,7 +40,7 @@ QuicIpAddress TruncateToLength(const QuicIpAddress& input, // raw_address[0] holds higher 8 bytes in big endian and raw_address[1] // holds lower 8 bytes. Converting each to little endian for us to mask bits // out. - // The endianess between raw_address[0] and raw_address[1] is handled + // The endianness between raw_address[0] and raw_address[1] is handled // explicitly by handling lower and higher bytes separately. raw_address[0] = quiche::QuicheEndian::NetToHost64(raw_address[0]); raw_address[1] = quiche::QuicheEndian::NetToHost64(raw_address[1]); diff --git a/quiche/quic/qbone/platform/netlink.cc b/quiche/quic/qbone/platform/netlink.cc index 0f2057628..b41ed2377 100644 --- a/quiche/quic/qbone/platform/netlink.cc +++ b/quiche/quic/qbone/platform/netlink.cc @@ -225,7 +225,7 @@ class LocalAddressParser : public NetlinkParserInterface { } // Keep track of addresses with both 'nodad' and 'dadfailed', this really - // should't be possible and is likely a kernel bug. + // shouldn't be possible and is likely a kernel bug. if (num_ipv6_nodad_dadfailed_addresses_ != nullptr && (interface_address->ifa_flags & IFA_F_NODAD) && (interface_address->ifa_flags & IFA_F_DADFAILED)) { diff --git a/quiche/quic/qbone/platform/netlink.h b/quiche/quic/qbone/platform/netlink.h index 857b8bff4..e34869611 100644 --- a/quiche/quic/qbone/platform/netlink.h +++ b/quiche/quic/qbone/platform/netlink.h @@ -53,7 +53,7 @@ class Netlink : public NetlinkInterface { // Performs the given verb that modifies local addresses on the given // interface_index. // - // additional_attributes are RTAs (man 7 rtnelink) that will be sent together + // additional_attributes are RTAs (man 7 rtnetlink) that will be sent together // with the netlink message. Note that rta_len in each RTA is used to decide // the length of the payload. The caller is responsible for making sure // payload bytes are accessible after the RTA header. @@ -78,7 +78,7 @@ class Netlink : public NetlinkInterface { // // For Verb::kRemove, rule matching is done by (destination_subnet, scope, // preferred_source, interface_index). Return true if a matching rule is - // found. interface_index can be 0 for wilecard. + // found. interface_index can be 0 for wildcard. // // For Verb::kAdd, rule matching is done by destination_subnet. If a rule for // the given destination_subnet already exists, nothing will happen and false diff --git a/quiche/quic/qbone/platform/netlink_interface.h b/quiche/quic/qbone/platform/netlink_interface.h index c4fc42c6f..aee8a9451 100644 --- a/quiche/quic/qbone/platform/netlink_interface.h +++ b/quiche/quic/qbone/platform/netlink_interface.h @@ -64,7 +64,7 @@ class NetlinkInterface { // Performs the given verb that modifies local addresses on the given // interface_index. // - // additional_attributes are RTAs (man 7 rtnelink) that will be sent together + // additional_attributes are RTAs (man 7 rtnetlink) that will be sent together // with the netlink message. Note that rta_len in each RTA is used to decide // the length of the payload. The caller is responsible for making sure // payload bytes are accessible after the RTA header. @@ -101,7 +101,7 @@ class NetlinkInterface { // // For Verb::kRemove, rule matching is done by (destination_subnet, scope, // preferred_source, interface_index). Return true if a matching rule is - // found. interface_index can be 0 for wilecard. + // found. interface_index can be 0 for wildcard. // // For Verb::kAdd, rule matching is done by destination_subnet. If a rule for // the given destination_subnet already exists, nothing will happen and false diff --git a/quiche/quic/qbone/qbone_packet_exchanger_test.cc b/quiche/quic/qbone/qbone_packet_exchanger_test.cc index be6084159..d01f60a06 100644 --- a/quiche/quic/qbone/qbone_packet_exchanger_test.cc +++ b/quiche/quic/qbone/qbone_packet_exchanger_test.cc @@ -158,7 +158,7 @@ TEST(QbonePacketExchangerTest, // Nothing should have been written because of blockage. ASSERT_TRUE(exchanger.packets_written().empty()); - // Remove blockage and start proccessing queued packets. + // Remove blockage and start processing queued packets. exchanger.ForceWriteFailure(false, ""); exchanger.SetWritable(); diff --git a/quiche/quic/test_tools/crypto_test_utils.cc b/quiche/quic/test_tools/crypto_test_utils.cc index 660f1864e..b072eb84c 100644 --- a/quiche/quic/test_tools/crypto_test_utils.cc +++ b/quiche/quic/test_tools/crypto_test_utils.cc @@ -121,7 +121,7 @@ void MovePackets(const QuicConnection& source_conn, // In order to properly test the code we need to perform encryption and // decryption so that the crypters latch when expected. The crypters are in // |dest_conn|, but we don't want to try and use them there. Instead we swap - // them into |framer|, perform the decryption with them, and then swap ther + // them into |framer|, perform the decryption with them, and then swap them // back. QuicConnectionPeer::SwapCrypters(&dest_conn, framer.framer()); QuicConnectionPeer::AddBytesReceived(&dest_conn, packet->length()); @@ -543,7 +543,7 @@ bool CommunicateHandshakeMessagesUntil( } bool result = client_condition() && server_condition(); if (!result) { - QUIC_LOG(INFO) << "CommunicateHandshakeMessagesUnti failed with state: " + QUIC_LOG(INFO) << "CommunicateHandshakeMessagesUntil failed with state: " "client connected? " << client_conn.connected() << " server connected? " << server_conn.connected() << " client condition met? " diff --git a/quiche/quic/test_tools/crypto_test_utils.h b/quiche/quic/test_tools/crypto_test_utils.h index 373888525..ac01399ea 100644 --- a/quiche/quic/test_tools/crypto_test_utils.h +++ b/quiche/quic/test_tools/crypto_test_utils.h @@ -199,7 +199,7 @@ QuicTag ParseTag(const char* tagstr); // Message constructs a CHLO message from a provided vector of tag/value pairs. // The first of each pair is the tag of a tag/value and is given as an argument // to |ParseTag|. The second is the value of the tag/value pair and is either a -// hex dump, preceeded by a '#', or a raw value. If minimum_size_bytes is +// hex dump, preceded by a '#', or a raw value. If minimum_size_bytes is // provided then the message will be padded to this minimum size. // // CreateCHLO( diff --git a/quiche/quic/test_tools/fake_proof_source_handle.cc b/quiche/quic/test_tools/fake_proof_source_handle.cc index ceebb301c..cc39c3d50 100644 --- a/quiche/quic/test_tools/fake_proof_source_handle.cc +++ b/quiche/quic/test_tools/fake_proof_source_handle.cc @@ -53,12 +53,12 @@ ComputeSignatureResult ComputeSignatureNow( FakeProofSourceHandle::FakeProofSourceHandle( ProofSource* delegate, ProofSourceHandleCallback* callback, Action select_cert_action, Action compute_signature_action, - QuicDelayedSSLConfig dealyed_ssl_config) + QuicDelayedSSLConfig delayed_ssl_config) : delegate_(delegate), callback_(callback), select_cert_action_(select_cert_action), compute_signature_action_(compute_signature_action), - dealyed_ssl_config_(dealyed_ssl_config) {} + delayed_ssl_config_(delayed_ssl_config) {} void FakeProofSourceHandle::CloseHandle() { select_cert_op_.reset(); @@ -87,7 +87,7 @@ QuicAsyncStatus FakeProofSourceHandle::SelectCertificate( if (select_cert_action_ == Action::DELEGATE_ASYNC || select_cert_action_ == Action::FAIL_ASYNC) { select_cert_op_.emplace(delegate_, callback_, select_cert_action_, - all_select_cert_args_.back(), dealyed_ssl_config_); + all_select_cert_args_.back(), delayed_ssl_config_); return QUIC_PENDING; } else if (select_cert_action_ == Action::FAIL_SYNC || select_cert_action_ == Action::FAIL_SYNC_DO_NOT_CHECK_CLOSED) { @@ -95,7 +95,7 @@ QuicAsyncStatus FakeProofSourceHandle::SelectCertificate( /*ok=*/false, /*is_sync=*/true, nullptr, /*handshake_hints=*/absl::string_view(), /*ticket_encryption_key=*/absl::string_view(), - /*cert_matched_sni=*/false, dealyed_ssl_config_); + /*cert_matched_sni=*/false, delayed_ssl_config_); return QUIC_FAILURE; } @@ -110,7 +110,7 @@ QuicAsyncStatus FakeProofSourceHandle::SelectCertificate( ok, /*is_sync=*/true, chain.get(), /*handshake_hints=*/absl::string_view(), /*ticket_encryption_key=*/absl::string_view(), - /*cert_matched_sni=*/cert_matched_sni, dealyed_ssl_config_); + /*cert_matched_sni=*/cert_matched_sni, delayed_ssl_config_); return ok ? QUIC_SUCCESS : QUIC_FAILURE; } @@ -177,10 +177,10 @@ int FakeProofSourceHandle::NumPendingOperations() const { FakeProofSourceHandle::SelectCertOperation::SelectCertOperation( ProofSource* delegate, ProofSourceHandleCallback* callback, Action action, - SelectCertArgs args, QuicDelayedSSLConfig dealyed_ssl_config) + SelectCertArgs args, QuicDelayedSSLConfig delayed_ssl_config) : PendingOperation(delegate, callback, action), args_(std::move(args)), - dealyed_ssl_config_(dealyed_ssl_config) {} + delayed_ssl_config_(delayed_ssl_config) {} void FakeProofSourceHandle::SelectCertOperation::Run() { if (action_ == Action::FAIL_ASYNC) { @@ -189,7 +189,7 @@ void FakeProofSourceHandle::SelectCertOperation::Run() { /*is_sync=*/false, nullptr, /*handshake_hints=*/absl::string_view(), /*ticket_encryption_key=*/absl::string_view(), - /*cert_matched_sni=*/false, dealyed_ssl_config_); + /*cert_matched_sni=*/false, delayed_ssl_config_); } else if (action_ == Action::DELEGATE_ASYNC) { bool cert_matched_sni; quiche::QuicheReferenceCountedPointer chain = @@ -200,7 +200,7 @@ void FakeProofSourceHandle::SelectCertOperation::Run() { ok, /*is_sync=*/false, chain.get(), /*handshake_hints=*/absl::string_view(), /*ticket_encryption_key=*/absl::string_view(), - /*cert_matched_sni=*/cert_matched_sni, dealyed_ssl_config_); + /*cert_matched_sni=*/cert_matched_sni, delayed_ssl_config_); } else { QUIC_BUG(quic_bug_10139_1) << "Unexpected action: " << static_cast(action_); diff --git a/quiche/quic/test_tools/fake_proof_source_handle.h b/quiche/quic/test_tools/fake_proof_source_handle.h index 599a1fa53..7e02ab9d8 100644 --- a/quiche/quic/test_tools/fake_proof_source_handle.h +++ b/quiche/quic/test_tools/fake_proof_source_handle.h @@ -31,11 +31,11 @@ class FakeProofSourceHandle : public ProofSourceHandle { }; // |delegate| must do cert selection and signature synchronously. - // |dealyed_ssl_config| is the config passed to OnSelectCertificateDone. + // |delayed_ssl_config| is the config passed to OnSelectCertificateDone. FakeProofSourceHandle( ProofSource* delegate, ProofSourceHandleCallback* callback, Action select_cert_action, Action compute_signature_action, - QuicDelayedSSLConfig dealyed_ssl_config = QuicDelayedSSLConfig()); + QuicDelayedSSLConfig delayed_ssl_config = QuicDelayedSSLConfig()); ~FakeProofSourceHandle() override = default; @@ -148,7 +148,7 @@ class FakeProofSourceHandle : public ProofSourceHandle { SelectCertOperation(ProofSource* delegate, ProofSourceHandleCallback* callback, Action action, SelectCertArgs args, - QuicDelayedSSLConfig dealyed_ssl_config); + QuicDelayedSSLConfig delayed_ssl_config); ~SelectCertOperation() override = default; @@ -156,7 +156,7 @@ class FakeProofSourceHandle : public ProofSourceHandle { private: const SelectCertArgs args_; - const QuicDelayedSSLConfig dealyed_ssl_config_; + const QuicDelayedSSLConfig delayed_ssl_config_; }; class ComputeSignatureOperation : public PendingOperation { @@ -183,7 +183,7 @@ class FakeProofSourceHandle : public ProofSourceHandle { Action select_cert_action_ = Action::DELEGATE_SYNC; // Action for the next compute signature operation. Action compute_signature_action_ = Action::DELEGATE_SYNC; - const QuicDelayedSSLConfig dealyed_ssl_config_; + const QuicDelayedSSLConfig delayed_ssl_config_; absl::optional select_cert_op_; absl::optional compute_signature_op_; diff --git a/quiche/quic/test_tools/fuzzing/quic_framer_process_data_packet_fuzzer.cc b/quiche/quic/test_tools/fuzzing/quic_framer_process_data_packet_fuzzer.cc index 0ee8c2362..ee76be517 100644 --- a/quiche/quic/test_tools/fuzzing/quic_framer_process_data_packet_fuzzer.cc +++ b/quiche/quic/test_tools/fuzzing/quic_framer_process_data_packet_fuzzer.cc @@ -64,14 +64,14 @@ ParsedQuicVersion ConsumeParsedQuicVersion(FuzzedDataProvider* provider) { 0, ABSL_ARRAYSIZE(transport_versions) - 1)]); } -// QuicSelfContainedPacketHeader is a QuicPacketHeader with built-in stroage for +// QuicSelfContainedPacketHeader is a QuicPacketHeader with built-in storage for // diversification nonce. struct QuicSelfContainedPacketHeader : public QuicPacketHeader { DiversificationNonce nonce_storage; }; // Construct a random data packet header that 1) can be successfully serialized -// at sender, and 2) the serialzied buffer can pass the receiver framer's +// at sender, and 2) the serialized buffer can pass the receiver framer's // ProcessPublicHeader and DecryptPayload functions. QuicSelfContainedPacketHeader ConsumeQuicPacketHeader( FuzzedDataProvider* provider, Perspective receiver_perspective) { diff --git a/quiche/quic/test_tools/packet_dropping_test_writer.cc b/quiche/quic/test_tools/packet_dropping_test_writer.cc index 598733830..df555b49d 100644 --- a/quiche/quic/test_tools/packet_dropping_test_writer.cc +++ b/quiche/quic/test_tools/packet_dropping_test_writer.cc @@ -9,7 +9,7 @@ namespace quic { namespace test { -// Every dropped packet must be followed by this number of succesfully written +// Every dropped packet must be followed by this number of successfully written // packets. This is to avoid flaky test failures and timeouts, for example, in // case both the client and the server drop every other packet (which is // statistically possible even if drop percentage is less than 50%). diff --git a/quiche/quic/test_tools/qpack/qpack_offline_decoder.h b/quiche/quic/test_tools/qpack/qpack_offline_decoder.h index 07fa27693..c6a48ba93 100644 --- a/quiche/quic/test_tools/qpack/qpack_offline_decoder.h +++ b/quiche/quic/test_tools/qpack/qpack_offline_decoder.h @@ -39,7 +39,7 @@ class QpackOfflineDecoder : public QpackDecoder::EncoderStreamErrorDelegate { private: // Data structure to hold TestHeadersHandler and QpackProgressiveDecoder until - // decoding of a header header block (and all preceding header blocks) is + // decoding of a header block (and all preceding header blocks) is // complete. struct Decoder { std::unique_ptr headers_handler; diff --git a/quiche/quic/test_tools/quic_connection_peer.cc b/quiche/quic/test_tools/quic_connection_peer.cc index 3daa6199b..775ef660e 100644 --- a/quiche/quic/test_tools/quic_connection_peer.cc +++ b/quiche/quic/test_tools/quic_connection_peer.cc @@ -246,9 +246,9 @@ void QuicConnectionPeer::SetAckDecimationDelay(QuicConnection* connection, } // static -bool QuicConnectionPeer::HasRetransmittableFrames(QuicConnection* connection, +bool QuicConnectionPeer::HasRetransmissibleFrames(QuicConnection* connection, uint64_t packet_number) { - return QuicSentPacketManagerPeer::HasRetransmittableFrames( + return QuicSentPacketManagerPeer::HasRetransmissibleFrames( GetSentPacketManager(connection), packet_number); } @@ -264,9 +264,9 @@ void QuicConnectionPeer::SetNegotiatedVersion(QuicConnection* connection) { } // static -void QuicConnectionPeer::SetMaxConsecutiveNumPacketsWithNoRetransmittableFrames( +void QuicConnectionPeer::SetMaxConsecutiveNumPacketsWithNoRetransmissibleFrames( QuicConnection* connection, size_t new_value) { - connection->max_consecutive_num_packets_with_no_retransmittable_frames_ = + connection->max_consecutive_num_packets_with_no_retransmissible_frames_ = new_value; } diff --git a/quiche/quic/test_tools/quic_connection_peer.h b/quiche/quic/test_tools/quic_connection_peer.h index ad5c961da..b68c818c8 100644 --- a/quiche/quic/test_tools/quic_connection_peer.h +++ b/quiche/quic/test_tools/quic_connection_peer.h @@ -113,12 +113,12 @@ class QuicConnectionPeer { QuicPacketNumber next_probe_at); static void SetAckDecimationDelay(QuicConnection* connection, float ack_decimation_delay); - static bool HasRetransmittableFrames(QuicConnection* connection, + static bool HasRetransmissibleFrames(QuicConnection* connection, uint64_t packet_number); static void SetMaxTrackedPackets(QuicConnection* connection, QuicPacketCount max_tracked_packets); static void SetNegotiatedVersion(QuicConnection* connection); - static void SetMaxConsecutiveNumPacketsWithNoRetransmittableFrames( + static void SetMaxConsecutiveNumPacketsWithNoRetransmissibleFrames( QuicConnection* connection, size_t new_value); static bool SupportsReleaseTime(QuicConnection* connection); static QuicConnection::PacketContent GetCurrentPacketContent( diff --git a/quiche/quic/test_tools/quic_dispatcher_peer.h b/quiche/quic/test_tools/quic_dispatcher_peer.h index 1238a89b1..42f2c71fd 100644 --- a/quiche/quic/test_tools/quic_dispatcher_peer.h +++ b/quiche/quic/test_tools/quic_dispatcher_peer.h @@ -69,7 +69,7 @@ class QuicDispatcherPeer { // empty. static QuicSession* GetFirstSessionIfAny(QuicDispatcher* dispatcher); - // Find the corresponding session if exsits. + // Find the corresponding session if exists. static const QuicSession* FindSession(const QuicDispatcher* dispatcher, QuicConnectionId id); diff --git a/quiche/quic/test_tools/quic_sent_packet_manager_peer.cc b/quiche/quic/test_tools/quic_sent_packet_manager_peer.cc index a5a8cbd04..0b506cd08 100644 --- a/quiche/quic/test_tools/quic_sent_packet_manager_peer.cc +++ b/quiche/quic/test_tools/quic_sent_packet_manager_peer.cc @@ -57,8 +57,8 @@ RttStats* QuicSentPacketManagerPeer::GetRttStats( // static bool QuicSentPacketManagerPeer::IsRetransmission( QuicSentPacketManager* sent_packet_manager, uint64_t packet_number) { - QUICHE_DCHECK(HasRetransmittableFrames(sent_packet_manager, packet_number)); - if (!HasRetransmittableFrames(sent_packet_manager, packet_number)) { + QUICHE_DCHECK(HasRetransmissibleFrames(sent_packet_manager, packet_number)); + if (!HasRetransmissibleFrames(sent_packet_manager, packet_number)) { return false; } return sent_packet_manager->unacked_packets_ @@ -75,12 +75,12 @@ void QuicSentPacketManagerPeer::MarkForRetransmission( } // static -size_t QuicSentPacketManagerPeer::GetNumRetransmittablePackets( +size_t QuicSentPacketManagerPeer::GetNumRetransmissiblePackets( const QuicSentPacketManager* sent_packet_manager) { size_t num_unacked_packets = 0; for (auto it = sent_packet_manager->unacked_packets_.begin(); it != sent_packet_manager->unacked_packets_.end(); ++it) { - if (sent_packet_manager->unacked_packets_.HasRetransmittableFrames(*it)) { + if (sent_packet_manager->unacked_packets_.HasRetransmissibleFrames(*it)) { ++num_unacked_packets; } } @@ -119,9 +119,9 @@ PacingSender* QuicSentPacketManagerPeer::GetPacingSender( } // static -bool QuicSentPacketManagerPeer::HasRetransmittableFrames( +bool QuicSentPacketManagerPeer::HasRetransmissibleFrames( QuicSentPacketManager* sent_packet_manager, uint64_t packet_number) { - return sent_packet_manager->unacked_packets_.HasRetransmittableFrames( + return sent_packet_manager->unacked_packets_.HasRetransmissibleFrames( QuicPacketNumber(packet_number)); } diff --git a/quiche/quic/test_tools/quic_sent_packet_manager_peer.h b/quiche/quic/test_tools/quic_sent_packet_manager_peer.h index a2b39dab6..8826537f6 100644 --- a/quiche/quic/test_tools/quic_sent_packet_manager_peer.h +++ b/quiche/quic/test_tools/quic_sent_packet_manager_peer.h @@ -45,7 +45,7 @@ class QuicSentPacketManagerPeer { uint64_t packet_number, TransmissionType transmission_type); - static size_t GetNumRetransmittablePackets( + static size_t GetNumRetransmissiblePackets( const QuicSentPacketManager* sent_packet_manager); static void SetConsecutivePtoCount(QuicSentPacketManager* sent_packet_manager, @@ -62,7 +62,7 @@ class QuicSentPacketManagerPeer { static PacingSender* GetPacingSender( QuicSentPacketManager* sent_packet_manager); - static bool HasRetransmittableFrames( + static bool HasRetransmissibleFrames( QuicSentPacketManager* sent_packet_manager, uint64_t packet_number); static QuicUnackedPacketMap* GetUnackedPacketMap( diff --git a/quiche/quic/test_tools/quic_stream_sequencer_buffer_peer.cc b/quiche/quic/test_tools/quic_stream_sequencer_buffer_peer.cc index 679bd91ac..afef6cc91 100644 --- a/quiche/quic/test_tools/quic_stream_sequencer_buffer_peer.cc +++ b/quiche/quic/test_tools/quic_stream_sequencer_buffer_peer.cc @@ -87,7 +87,7 @@ bool QuicStreamSequencerBufferPeer::CheckBufferInvariants() { (buffer_->max_buffer_capacity_bytes_ > (buffer_->max_blocks_count_ - 1) * kBlockSizeBytes); if (!capacity_sane) { - QUIC_LOG(ERROR) << "block number not match capcaity."; + QUIC_LOG(ERROR) << "block number not match capacity."; } bool block_retired_when_empty = CheckEmptyInvariants(); if (!block_retired_when_empty) { diff --git a/quiche/quic/test_tools/quic_test_backend.cc b/quiche/quic/test_tools/quic_test_backend.cc index 4383f2334..1bfe7daf2 100644 --- a/quiche/quic/test_tools/quic_test_backend.cc +++ b/quiche/quic/test_tools/quic_test_backend.cc @@ -87,7 +87,7 @@ QuicTestBackend::ProcessWebTransportRequest( if (absl::StartsWith(path, "/echo")) { WebTransportResponse response; response.response_headers[":status"] = "200"; - // Add response headers if the paramer has "set-header=XXX:YYY" query. + // Add response headers if the parameter has "set-header=XXX:YYY" query. GURL url = GURL(absl::StrCat("https://localhost", path)); const std::vector& params = absl::StrSplit(url.query(), '&'); for (const auto& param : params) { diff --git a/quiche/quic/test_tools/quic_test_client.h b/quiche/quic/test_tools/quic_test_client.h index 9ea9cfa71..618fae2a7 100644 --- a/quiche/quic/test_tools/quic_test_client.h +++ b/quiche/quic/test_tools/quic_test_client.h @@ -81,7 +81,7 @@ class MockableQuicClient : public QuicDefaultClient { QuicConnectionId override_client_connection_id_; bool client_connection_id_overridden_; int override_client_connection_id_length_ = -1; - CachedNetworkParameters cached_network_paramaters_; + CachedNetworkParameters cached_network_parameters_; }; // A toy QUIC client used for testing. diff --git a/quiche/quic/test_tools/quic_test_server.h b/quiche/quic/test_tools/quic_test_server.h index 4bf629aa7..8643aa5be 100644 --- a/quiche/quic/test_tools/quic_test_server.h +++ b/quiche/quic/test_tools/quic_test_server.h @@ -102,7 +102,7 @@ class QuicTestServer : public QuicServer { // Useful test sessions for the QuicTestServer. -// Test session which sends a GOAWAY immedaitely on creation, before crypto +// Test session which sends a GOAWAY immediately on creation, before crypto // credentials have even been established. class ImmediateGoAwaySession : public QuicSimpleServerSession { public: diff --git a/quiche/quic/test_tools/quic_test_utils.cc b/quiche/quic/test_tools/quic_test_utils.cc index 4647c9897..60676033d 100644 --- a/quiche/quic/test_tools/quic_test_utils.cc +++ b/quiche/quic/test_tools/quic_test_utils.cc @@ -583,7 +583,7 @@ void PacketSavingConnection::SendOrQueuePacket(SerializedPacket packet) { OnPacketSent(packet.encryption_level, packet.transmission_type); QuicConnectionPeer::GetSentPacketManager(this)->OnPacketSent( &packet, clock.ApproximateNow(), NOT_RETRANSMISSION, - HAS_RETRANSMITTABLE_DATA, true, ECN_NOT_ECT); + HAS_RETRANSMISSIBLE_DATA, true, ECN_NOT_ECT); } std::vector PacketSavingConnection::GetPackets() diff --git a/quiche/quic/test_tools/quic_test_utils.h b/quiche/quic/test_tools/quic_test_utils.h index fafec6466..51cf9b4f3 100644 --- a/quiche/quic/test_tools/quic_test_utils.h +++ b/quiche/quic/test_tools/quic_test_utils.h @@ -208,7 +208,7 @@ QuicAckFrame InitAckFrame(QuicPacketNumber largest_acked); QuicAckFrame MakeAckFrameWithAckBlocks(size_t num_ack_blocks, uint64_t least_unacked); -// Testing convenice method to construct a QuicAckFrame with |largest_acked|, +// Testing convenience method to construct a QuicAckFrame with |largest_acked|, // ack blocks of width 1 packet and |gap_size|. QuicAckFrame MakeAckFrameWithGaps(uint64_t gap_size, size_t max_num_gaps, uint64_t largest_acked); @@ -472,7 +472,7 @@ class MockQuicConnectionVisitor : public QuicConnectionVisitorInterface { const QuicSocketAddress& peer_address, bool is_connectivity_probe), (override)); - MOCK_METHOD(void, OnAckNeedsRetransmittableFrame, (), (override)); + MOCK_METHOD(void, OnAckNeedsRetransmissibleFrame, (), (override)); MOCK_METHOD(void, SendAckFrequency, (const QuicAckFrequencyFrame& frame), (override)); MOCK_METHOD(void, SendNewConnectionId, @@ -1212,7 +1212,7 @@ class MockSendAlgorithm : public SendAlgorithmInterface { (override)); MOCK_METHOD(void, OnPacketSent, (QuicTime, QuicByteCount, QuicPacketNumber, QuicByteCount, - HasRetransmittableData), + HasRetransmissibleData), (override)); MOCK_METHOD(void, OnPacketNeutered, (QuicPacketNumber), (override)); MOCK_METHOD(void, OnRetransmissionTimeout, (bool), (override)); @@ -1403,7 +1403,7 @@ class MockPacketCreatorDelegate : public QuicPacketCreator::DelegateInterface { MOCK_METHOD(void, OnUnrecoverableError, (QuicErrorCode, const std::string&), (override)); MOCK_METHOD(bool, ShouldGeneratePacket, - (HasRetransmittableData retransmittable, IsHandshake handshake), + (HasRetransmissibleData retransmissible, IsHandshake handshake), (override)); MOCK_METHOD(const QuicFrames, MaybeBundleOpportunistically, (), (override)); MOCK_METHOD(SerializedPacketFate, GetSerializedPacketFate, @@ -1514,7 +1514,7 @@ class QuicCryptoClientStreamPeer { // server_id: The server id associated with this stream. // connection_start_time: The time to set for the connection clock. // Needed for strike-register nonce verification. The client -// connection_start_time should be synchronized witht the server +// connection_start_time should be synchronized with the server // start time, otherwise nonce verification will fail. // supported_versions: Set of QUIC versions this client supports. // helper: Pointer to the MockQuicConnectionHelper to use for the session. @@ -1537,7 +1537,7 @@ void CreateClientSessionForTest( // server_id: The server id associated with this stream. // connection_start_time: The time to set for the connection clock. // Needed for strike-register nonce verification. The server -// connection_start_time should be synchronized witht the client +// connection_start_time should be synchronized with the client // start time, otherwise nonce verification will fail. // supported_versions: Set of QUIC versions this server supports. // helper: Pointer to the MockQuicConnectionHelper to use for the session. @@ -2038,7 +2038,7 @@ class TestPacketWriter : public QuicPacketWriter { packet_buffer_pool_index_; // Indices in packet_buffer_pool_ that are not allocated. std::list packet_buffer_free_list_; - // The soruce/peer address passed into WritePacket(). + // The source/peer address passed into WritePacket(). QuicIpAddress last_write_source_address_; QuicSocketAddress last_write_peer_address_; int write_error_code_{0}; @@ -2052,7 +2052,7 @@ class TestPacketWriter : public QuicPacketWriter { // which must point to at least |*destination_connection_id_length_out| bytes in // memory. |*destination_connection_id_length_out| will contain the length of // the received destination connection ID, which on success will match the -// contents of the destination connection ID passed in to +// contents of the destination connection ID passed into // WriteClientVersionNegotiationProbePacket. bool ParseClientVersionNegotiationProbePacket( const char* packet_bytes, size_t packet_length, diff --git a/quiche/quic/test_tools/server_thread.h b/quiche/quic/test_tools/server_thread.h index 9547934b9..3f8b41339 100644 --- a/quiche/quic/test_tools/server_thread.h +++ b/quiche/quic/test_tools/server_thread.h @@ -77,7 +77,7 @@ class ServerThread : public QuicThread { QuicNotification confirmed_; // Notified when the first handshake is confirmed. QuicNotification pause_; // Notified when the server should pause. - QuicNotification paused_; // Notitied when the server has paused + QuicNotification paused_; // Notified when the server has paused QuicNotification resume_; // Notified when the server should resume. QuicNotification quit_; // Notified when the server should quit. diff --git a/quiche/quic/test_tools/simple_session_notifier.cc b/quiche/quic/test_tools/simple_session_notifier.cc index 7a2e70581..d1f673e2e 100644 --- a/quiche/quic/test_tools/simple_session_notifier.cc +++ b/quiche/quic/test_tools/simple_session_notifier.cc @@ -113,7 +113,7 @@ void SimpleSessionNotifier::WriteOrBufferRstStream( WriteBufferedControlFrames(); } -void SimpleSessionNotifier::WriteOrBufferWindowUpate( +void SimpleSessionNotifier::WriteOrBufferWindowUpdate( QuicStreamId id, QuicStreamOffset byte_offset) { QUIC_DVLOG(1) << "Writing WINDOW_UPDATE"; const bool had_buffered_data = @@ -301,7 +301,7 @@ bool SimpleSessionNotifier::OnFrameAcked(const QuicFrame& frame, } void SimpleSessionNotifier::OnFrameLost(const QuicFrame& frame) { - QUIC_DVLOG(1) << "Losting " << frame; + QUIC_DVLOG(1) << "Lost " << frame; if (frame.type == CRYPTO_FRAME) { StreamState* state = &crypto_state_[frame.crypto_frame->level]; QuicStreamOffset offset = frame.crypto_frame->offset; @@ -367,7 +367,7 @@ bool SimpleSessionNotifier::RetransmitFrames(const QuicFrames& frames, if (GetControlFrameId(frame) == kInvalidControlFrameId) { continue; } - QuicFrame copy = CopyRetransmittableControlFrame(frame); + QuicFrame copy = CopyRetransmissibleControlFrame(frame); if (!connection_->SendControlFrame(copy)) { // Connection is write blocked. DeleteFrame(©); @@ -556,7 +556,7 @@ bool SimpleSessionNotifier::RetransmitLostControlFrames() { while (!lost_control_frames_.empty()) { QuicFrame pending = control_frames_.at(lost_control_frames_.begin()->first - least_unacked_); - QuicFrame copy = CopyRetransmittableControlFrame(pending); + QuicFrame copy = CopyRetransmissibleControlFrame(pending); connection_->SetTransmissionType(LOSS_RETRANSMISSION); if (!connection_->SendControlFrame(copy)) { // Connection is write blocked. @@ -708,7 +708,7 @@ bool SimpleSessionNotifier::WriteBufferedControlFrames() { while (HasBufferedControlFrames()) { QuicFrame frame_to_send = control_frames_.at(least_unsent_ - least_unacked_); - QuicFrame copy = CopyRetransmittableControlFrame(frame_to_send); + QuicFrame copy = CopyRetransmissibleControlFrame(frame_to_send); connection_->SetTransmissionType(NOT_RETRANSMISSION); if (!connection_->SendControlFrame(copy)) { // Connection is write blocked. diff --git a/quiche/quic/test_tools/simple_session_notifier.h b/quiche/quic/test_tools/simple_session_notifier.h index f1af586ed..15f0f4b35 100644 --- a/quiche/quic/test_tools/simple_session_notifier.h +++ b/quiche/quic/test_tools/simple_session_notifier.h @@ -37,7 +37,7 @@ class SimpleSessionNotifier : public SessionNotifierInterface { QuicStreamOffset bytes_written); // Tries to write WINDOW_UPDATE. - void WriteOrBufferWindowUpate(QuicStreamId id, QuicStreamOffset byte_offset); + void WriteOrBufferWindowUpdate(QuicStreamId id, QuicStreamOffset byte_offset); // Tries to write PING. void WriteOrBufferPing(); diff --git a/quiche/quic/test_tools/simulator/link.h b/quiche/quic/test_tools/simulator/link.h index 19061ddd1..50123b9de 100644 --- a/quiche/quic/test_tools/simulator/link.h +++ b/quiche/quic/test_tools/simulator/link.h @@ -39,7 +39,7 @@ class OneWayLink : public Actor, public ConstrainedPortInterface { protected: // Get the value of a random delay imposed on each packet. By default, this - // is a short random delay in order to avoid artifical synchronization + // is a short random delay in order to avoid artificial synchronization // artifacts during the simulation. Subclasses may override this behavior // (for example, to provide a random component of delay). virtual QuicTime::Delta GetRandomDelay(QuicTime::Delta transfer_time); diff --git a/quiche/quic/test_tools/simulator/packet_filter.h b/quiche/quic/test_tools/simulator/packet_filter.h index cf57bb0f8..3f2007ede 100644 --- a/quiche/quic/test_tools/simulator/packet_filter.h +++ b/quiche/quic/test_tools/simulator/packet_filter.h @@ -31,7 +31,7 @@ namespace simulator { // PacketFilter filter(&simulator, "A-to-B packet filter", endpoint_a); // SymmetricLink a_b_link(&filter, &endpoint_b, ...); // -// Note that the filter drops the packet instanteneously, without it ever +// Note that the filter drops the packet instantaneously, without it ever // reaching the output wire. This means that in a direct endpoint-to-endpoint // scenario, whenever the packet is dropped, the link would become immediately // available for the next packet. diff --git a/quiche/quic/test_tools/simulator/quic_endpoint.h b/quiche/quic/test_tools/simulator/quic_endpoint.h index a7f3638c0..f2ca9a771 100644 --- a/quiche/quic/test_tools/simulator/quic_endpoint.h +++ b/quiche/quic/test_tools/simulator/quic_endpoint.h @@ -69,7 +69,7 @@ class QuicEndpoint : public QuicEndpointBase, void OnConnectionMigration(AddressChangeType /*type*/) override {} void OnPathDegrading() override {} void OnForwardProgressMadeAfterPathDegrading() override {} - void OnAckNeedsRetransmittableFrame() override {} + void OnAckNeedsRetransmissibleFrame() override {} void SendAckFrequency(const QuicAckFrequencyFrame& /*frame*/) override {} void SendNewConnectionId(const QuicNewConnectionIdFrame& /*frame*/) override { } diff --git a/quiche/quic/test_tools/simulator/simulator_test.cc b/quiche/quic/test_tools/simulator/simulator_test.cc index 4ae04a780..7c134a3a2 100644 --- a/quiche/quic/test_tools/simulator/simulator_test.cc +++ b/quiche/quic/test_tools/simulator/simulator_test.cc @@ -196,7 +196,7 @@ TEST_F(SimulatorTest, DirectLinkSaturation) { if (saturator_a.counter()->packets() > 1000 || saturator_b.counter()->packets() > 100) { ADD_FAILURE() << "The simulation did not arrive at the expected " - "termination contidition. Saturator A counter: " + "termination condition. Saturator A counter: " << saturator_a.counter()->packets() << ", saturator B counter: " << saturator_b.counter()->packets(); diff --git a/quiche/quic/tools/connect_tunnel.cc b/quiche/quic/tools/connect_tunnel.cc index d31e5403e..8dc074f4e 100644 --- a/quiche/quic/tools/connect_tunnel.cc +++ b/quiche/quic/tools/connect_tunnel.cc @@ -83,7 +83,7 @@ bool ValidateAuthority( QUICHE_DVLOG(1) << "CONNECT request authority: " << authority.ToHostPortString() - << " is not an acceptable allow-listed destiation "; + << " is not an acceptable allow-listed destination "; return false; } diff --git a/quiche/quic/tools/connect_tunnel_test.cc b/quiche/quic/tools/connect_tunnel_test.cc index 379da7c49..4bc5c563a 100644 --- a/quiche/quic/tools/connect_tunnel_test.cc +++ b/quiche/quic/tools/connect_tunnel_test.cc @@ -343,7 +343,7 @@ TEST_F(ConnectTunnelTest, DestinationTcpConnectionError) { tunnel_.OpenTunnel(request_headers); - // Simulate receving error. + // Simulate receiving error. tunnel_.ReceiveComplete(absl::UnknownError("error")); tunnel_.OnClientStreamClose(); diff --git a/quiche/quic/tools/connect_udp_tunnel.cc b/quiche/quic/tools/connect_udp_tunnel.cc index 96612fc59..be04cc189 100644 --- a/quiche/quic/tools/connect_udp_tunnel.cc +++ b/quiche/quic/tools/connect_udp_tunnel.cc @@ -206,7 +206,7 @@ void ConnectUdpTunnel::OpenTunnel( return; } - // TODO(ericorth): Validate that the IP address doesn't fall into diallowed + // TODO(ericorth): Validate that the IP address doesn't fall into disallowed // ranges per RFC 9298, Section 7. QuicSocketAddress address = tools::LookupAddress(AF_UNSPEC, target.value()); if (!address.IsInitialized()) { diff --git a/quiche/quic/tools/connect_udp_tunnel.h b/quiche/quic/tools/connect_udp_tunnel.h index 1e800a75f..4a2b50e89 100644 --- a/quiche/quic/tools/connect_udp_tunnel.h +++ b/quiche/quic/tools/connect_udp_tunnel.h @@ -32,7 +32,7 @@ class ConnectUdpTunnel : public ConnectingClientSocket::AsyncVisitor, public: // `client_stream_request_handler` and `socket_factory` must both outlive the // created ConnectUdpTunnel. `server_label` is an identifier (typically - // randomly generated) to indentify the server or backend in error headers, + // randomly generated) to identify the server or backend in error headers, // per the requirements of RFC 9209, Section 2. ConnectUdpTunnel( QuicSimpleServerBackend::RequestHandler* client_stream_request_handler, diff --git a/quiche/quic/tools/quic_client_base.cc b/quiche/quic/tools/quic_client_base.cc index 4612be064..4826bfc92 100644 --- a/quiche/quic/tools/quic_client_base.cc +++ b/quiche/quic/tools/quic_client_base.cc @@ -174,7 +174,7 @@ void QuicClientBase::StartConnect() { const bool can_reconnect_with_different_version = CanReconnectWithDifferentVersion(&mutual_version); if (connected_or_attempting_connect()) { - // Clear queued up data if client can not try to connect with a different + // Clear queued up data if client cannot try to connect with a different // version. if (!can_reconnect_with_different_version) { ClearDataToResend(); diff --git a/quiche/quic/tools/quic_client_base.h b/quiche/quic/tools/quic_client_base.h index 955f83a1d..ae70c998f 100644 --- a/quiche/quic/tools/quic_client_base.h +++ b/quiche/quic/tools/quic_client_base.h @@ -92,7 +92,7 @@ class QuicClientBase : public QuicSession::Visitor { virtual ~QuicClientBase(); - // Implmenets QuicSession::Visitor + // Implements QuicSession::Visitor void OnConnectionClosed(QuicConnectionId /*server_connection_id*/, QuicErrorCode /*error*/, const std::string& /*error_details*/, diff --git a/quiche/quic/tools/quic_client_interop_test_bin.cc b/quiche/quic/tools/quic_client_interop_test_bin.cc index 990ae2be7..384fcb3dd 100644 --- a/quiche/quic/tools/quic_client_interop_test_bin.cc +++ b/quiche/quic/tools/quic_client_interop_test_bin.cc @@ -43,7 +43,7 @@ enum class Feature { kHandshake, // Stream data is being exchanged and ACK'ed. kStreamData, - // The connection close procedcure completes with a zero error code. + // The connection close procedure completes with a zero error code. kConnectionClose, // The connection was established using TLS resumption. kResumption, @@ -64,7 +64,7 @@ enum class Feature { // Third row of features (H3 tests) // An H3 transaction succeeded. kHttp3, - // One or both endpoints insert entries into dynamic table and subsequenly + // One or both endpoints insert entries into dynamic table and subsequently // reference them from header blocks. kDynamicEntryReferenced, }; diff --git a/quiche/quic/tools/quic_default_client_test.cc b/quiche/quic/tools/quic_default_client_test.cc index d58a24ae0..90e7d96f8 100644 --- a/quiche/quic/tools/quic_default_client_test.cc +++ b/quiche/quic/tools/quic_default_client_test.cc @@ -72,7 +72,7 @@ class QuicDefaultClientTest : public QuicTest { : event_loop_(GetDefaultEventLoop()->Create(QuicDefaultClock::Get())) { // Creates and destroys a single client first which may open persistent // sockets when initializing platform dependencies like certificate - // verifier. Future creation of addtional clients will deterministically + // verifier. Future creation of additional clients will deterministically // open one socket per client. CreateAndInitializeQuicClient(); } diff --git a/quiche/quic/tools/quic_memory_cache_backend.h b/quiche/quic/tools/quic_memory_cache_backend.h index ccdaf59a2..088632fc5 100644 --- a/quiche/quic/tools/quic_memory_cache_backend.h +++ b/quiche/quic/tools/quic_memory_cache_backend.h @@ -143,7 +143,7 @@ class QuicMemoryCacheBackend : public QuicSimpleServerBackend { std::string request_url); // Implements the functions for interface QuicSimpleServerBackend - // |cache_cirectory| can be generated using `wget -p --save-headers `. + // |cache_directory| can be generated using `wget -p --save-headers `. bool InitializeBackend(const std::string& cache_directory) override; bool IsBackendInitialized() const override; void FetchResponseFromBackend( diff --git a/quiche/quic/tools/quic_simple_server_session.h b/quiche/quic/tools/quic_simple_server_session.h index 558521457..0ae46c2e0 100644 --- a/quiche/quic/tools/quic_simple_server_session.h +++ b/quiche/quic/tools/quic_simple_server_session.h @@ -47,7 +47,7 @@ class QuicSimpleServerSession : public QuicServerSessionBase { ~QuicSimpleServerSession() override; - // Override base class to detact client sending data on server push stream. + // Override base class to detect client sending data on server push stream. void OnStreamFrame(const QuicStreamFrame& frame) override; protected: diff --git a/quiche/quic/tools/quic_simple_server_stream.cc b/quiche/quic/tools/quic_simple_server_stream.cc index b0cb9cb4c..b1a932f21 100644 --- a/quiche/quic/tools/quic_simple_server_stream.cc +++ b/quiche/quic/tools/quic_simple_server_stream.cc @@ -301,7 +301,7 @@ void QuicSimpleServerStream::Respond(const QuicBackendResponse* response) { return; } - // Examing response status, if it was not pure integer as typical h2 + // Examine response status, if it was not pure integer as typical h2 // response status, send error response. Notice that // QuicHttpResponseCache push urls are strictly authority + path only, // scheme is not included (see |QuicHttpResponseCache::GetKey()|). diff --git a/quiche/quic/tools/quic_toy_server.h b/quiche/quic/tools/quic_toy_server.h index fc82ff706..eba5f4fae 100644 --- a/quiche/quic/tools/quic_toy_server.h +++ b/quiche/quic/tools/quic_toy_server.h @@ -28,7 +28,7 @@ class QuicToyServer { const ParsedQuicVersionVector& supported_versions) = 0; }; - // A facotry for creating QuicSimpleServerBackend instances. + // A factory for creating QuicSimpleServerBackend instances. class BackendFactory { public: virtual ~BackendFactory() = default; diff --git a/quiche/spdy/core/hpack/hpack_constants.h b/quiche/spdy/core/hpack/hpack_constants.h index a92f9752b..99205de93 100644 --- a/quiche/spdy/core/hpack/hpack_constants.h +++ b/quiche/spdy/core/hpack/hpack_constants.h @@ -76,7 +76,7 @@ QUICHE_EXPORT const std::vector& HpackHuffmanCodeVector(); QUICHE_EXPORT const std::vector& HpackStaticTableVector(); // Returns a HpackStaticTable instance initialized with |kHpackStaticTable|. -// The instance is read-only, has static lifetime, and is safe to share amoung +// The instance is read-only, has static lifetime, and is safe to share among // threads. This function is thread-safe. QUICHE_EXPORT const HpackStaticTable& ObtainHpackStaticTable(); diff --git a/quiche/spdy/core/hpack/hpack_static_table.cc b/quiche/spdy/core/hpack/hpack_static_table.cc index 30a88af2c..4c4030341 100644 --- a/quiche/spdy/core/hpack/hpack_static_table.cc +++ b/quiche/spdy/core/hpack/hpack_static_table.cc @@ -31,7 +31,7 @@ void HpackStaticTable::Initialize(const HpackStaticEntry* static_entry_table, static_entries_.push_back(HpackEntry(std::move(name), std::move(value))); } - // |static_entries_| will not be mutated any more. Therefore its entries will + // |static_entries_| will not be mutated anymore. Therefore its entries will // remain stable even if the container does not have iterator stability. int insertion_count = 0; for (const auto& entry : static_entries_) { diff --git a/quiche/spdy/core/hpack/hpack_static_table.h b/quiche/spdy/core/hpack/hpack_static_table.h index 597336716..1c7d73076 100644 --- a/quiche/spdy/core/hpack/hpack_static_table.h +++ b/quiche/spdy/core/hpack/hpack_static_table.h @@ -20,7 +20,7 @@ inline constexpr size_t kStaticTableSize = 61; // HpackStaticTable provides |static_entries_| and |static_index_| for HPACK // encoding and decoding contexts. Once initialized, an instance is read only // and may be accessed only through its const interface. Such an instance may -// be shared accross multiple HPACK contexts. +// be shared across multiple HPACK contexts. class QUICHE_EXPORT HpackStaticTable { public: HpackStaticTable(); diff --git a/quiche/spdy/core/http2_frame_decoder_adapter.cc b/quiche/spdy/core/http2_frame_decoder_adapter.cc index fcbc79fbc..2e6d61832 100644 --- a/quiche/spdy/core/http2_frame_decoder_adapter.cc +++ b/quiche/spdy/core/http2_frame_decoder_adapter.cc @@ -69,7 +69,7 @@ uint64_t ToSpdyPingId(const Http2PingFields& ping) { // Overwrites the fields of the header with invalid values, for the purpose // of identifying reading of unset fields. Only takes effect for debug builds. -// In Address Sanatizer builds, it also marks the fields as un-readable. +// In Address Sanitizer builds, it also marks the fields as un-readable. #ifndef NDEBUG void CorruptFrameHeader(Http2FrameHeader* header) { // Beyond a valid payload length, which is 2^24 - 1. diff --git a/quiche/spdy/core/http2_frame_decoder_adapter.h b/quiche/spdy/core/http2_frame_decoder_adapter.h index e7bd420f4..bd313a997 100644 --- a/quiche/spdy/core/http2_frame_decoder_adapter.h +++ b/quiche/spdy/core/http2_frame_decoder_adapter.h @@ -477,7 +477,7 @@ class QUICHE_EXPORT SpdyFramerVisitorInterface { // |len| The length of the header data buffer. A length of zero indicates // that the header data block has been completely sent. // When this function returns true the visitor indicates that it accepted - // all of the data. Returning false indicates that that an error has + // all of the data. Returning false indicates that an error has // occurred while processing the data. Default implementation returns true. virtual bool OnGoAwayFrameData(const char* goaway_data, size_t len); diff --git a/quiche/spdy/core/spdy_intrusive_list.h b/quiche/spdy/core/spdy_intrusive_list.h index 3ba8f8e4e..18fd5d95d 100644 --- a/quiche/spdy/core/spdy_intrusive_list.h +++ b/quiche/spdy/core/spdy_intrusive_list.h @@ -150,7 +150,7 @@ class QUICHE_EXPORT SpdyIntrusiveList { // It makes is_linked() return true when it should return false. // If such node is removed from the list (e.g. from its destructor), or is // added to another list - a memory corruption will occur. - // Admitedly the destructor does not unlink the nodes either, but move-assign + // Admittedly the destructor does not unlink the nodes either, but move-assign // will likely make the problem more prominent. #ifndef SWIG SpdyIntrusiveList(SpdyIntrusiveList&& src) noexcept { diff --git a/quiche/spdy/core/spdy_intrusive_list_test.cc b/quiche/spdy/core/spdy_intrusive_list_test.cc index 750608f34..be1df36cc 100644 --- a/quiche/spdy/core/spdy_intrusive_list_test.cc +++ b/quiche/spdy/core/spdy_intrusive_list_test.cc @@ -182,7 +182,7 @@ TEST(NewIntrusiveListTest, Insert) { } TEST(NewIntrusiveListTest, Move) { - // Move contructible. + // Move constructible. { // Move-construct from an empty list. TestList src; @@ -240,7 +240,7 @@ TEST_F(IntrusiveListTest, Splice) { // Test the basic cases: // - The lists range from 0 to 2 elements. // - The insertion point ranges from begin() to end() - // - The transfered range has multiple sizes and locations in the source. + // - The transferred range has multiple sizes and locations in the source. for (int l1_count = 0; l1_count < 3; ++l1_count) { for (int l2_count = 0; l2_count < 3; ++l2_count) { for (int pos = 0; pos <= l1_count; ++pos) {