Change window_update frame's byte_offset to max_data to incorporate IETF spec.

https://tools.ietf.org/html/draft-ietf-quic-transport-24#section-19.10

gfe-relnote: name change only. Not protected.
PiperOrigin-RevId: 281838511
Change-Id: I716cfd6856d8c9dd9981040f68bc0567feaedaee
diff --git a/quic/core/frames/quic_frames_test.cc b/quic/core/frames/quic_frames_test.cc
index 303fd0c..1764e17 100644
--- a/quic/core/frames/quic_frames_test.cc
+++ b/quic/core/frames/quic_frames_test.cc
@@ -204,9 +204,9 @@
   EXPECT_EQ(3u, GetControlFrameId(frame));
   std::ostringstream stream;
   window_update.stream_id = 1;
-  window_update.byte_offset = 2;
+  window_update.max_data = 2;
   stream << window_update;
-  EXPECT_EQ("{ control_frame_id: 3, stream_id: 1, byte_offset: 2 }\n",
+  EXPECT_EQ("{ control_frame_id: 3, stream_id: 1, max_data: 2 }\n",
             stream.str());
   EXPECT_TRUE(IsControlFrame(frame.type));
 }
diff --git a/quic/core/frames/quic_window_update_frame.cc b/quic/core/frames/quic_window_update_frame.cc
index 07e3168..81ca125 100644
--- a/quic/core/frames/quic_window_update_frame.cc
+++ b/quic/core/frames/quic_window_update_frame.cc
@@ -13,16 +13,16 @@
 QuicWindowUpdateFrame::QuicWindowUpdateFrame(
     QuicControlFrameId control_frame_id,
     QuicStreamId stream_id,
-    QuicStreamOffset byte_offset)
+    QuicByteCount max_data)
     : control_frame_id(control_frame_id),
       stream_id(stream_id),
-      byte_offset(byte_offset) {}
+      max_data(max_data) {}
 
 std::ostream& operator<<(std::ostream& os,
                          const QuicWindowUpdateFrame& window_update_frame) {
   os << "{ control_frame_id: " << window_update_frame.control_frame_id
      << ", stream_id: " << window_update_frame.stream_id
-     << ", byte_offset: " << window_update_frame.byte_offset << " }\n";
+     << ", max_data: " << window_update_frame.max_data << " }\n";
   return os;
 }
 
diff --git a/quic/core/frames/quic_window_update_frame.h b/quic/core/frames/quic_window_update_frame.h
index 73163ce..ff44785 100644
--- a/quic/core/frames/quic_window_update_frame.h
+++ b/quic/core/frames/quic_window_update_frame.h
@@ -12,15 +12,13 @@
 namespace quic {
 
 // Flow control updates per-stream and at the connection level.
-// Based on SPDY's WINDOW_UPDATE frame, but uses an absolute byte offset rather
-// than a window delta.
-// TODO(rjshade): A possible future optimization is to make stream_id and
-//                byte_offset variable length, similar to stream frames.
+// Based on SPDY's WINDOW_UPDATE frame, but uses an absolute max data bytes
+// rather than a window delta.
 struct QUIC_EXPORT_PRIVATE QuicWindowUpdateFrame {
   QuicWindowUpdateFrame();
   QuicWindowUpdateFrame(QuicControlFrameId control_frame_id,
                         QuicStreamId stream_id,
-                        QuicStreamOffset byte_offset);
+                        QuicByteCount max_data);
 
   friend QUIC_EXPORT_PRIVATE std::ostream& operator<<(
       std::ostream& os,
@@ -34,13 +32,9 @@
   // connection rather than a specific stream.
   QuicStreamId stream_id;
 
-  // Byte offset in the stream or connection. The receiver of this frame must
-  // not send data which would result in this offset being exceeded.
-  //
-  // TODO(fkastenholz): Rename this to max_data and change the type to
-  // QuicByteCount because the IETF defines this as the "maximum
-  // amount of data that can be sent".
-  QuicStreamOffset byte_offset;
+  // Maximum data allowed in the stream or connection. The receiver of this
+  // frame must not send data which would exceedes this restriction.
+  QuicByteCount max_data;
 };
 
 }  // namespace quic