Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Side by Side Diff: net/quic/quic_protocol.h

Issue 144063012: Fix a QUIC bug where previously undecryptable packets were not decrypted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: upload changes Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ 5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_
6 #define NET_QUIC_QUIC_PROTOCOL_H_ 6 #define NET_QUIC_QUIC_PROTOCOL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <limits> 9 #include <limits>
10 #include <map> 10 #include <map>
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 }; 530 };
531 531
532 struct NET_EXPORT_PRIVATE QuicStreamFrame { 532 struct NET_EXPORT_PRIVATE QuicStreamFrame {
533 QuicStreamFrame(); 533 QuicStreamFrame();
534 QuicStreamFrame(const QuicStreamFrame& frame); 534 QuicStreamFrame(const QuicStreamFrame& frame);
535 QuicStreamFrame(QuicStreamId stream_id, 535 QuicStreamFrame(QuicStreamId stream_id,
536 bool fin, 536 bool fin,
537 QuicStreamOffset offset, 537 QuicStreamOffset offset,
538 IOVector data); 538 IOVector data);
539 539
540 NET_EXPORT_PRIVATE friend std::ostream& operator<<(
541 std::ostream& os, const QuicStreamFrame& s);
542
540 // Returns a copy of the IOVector |data| as a heap-allocated string. 543 // Returns a copy of the IOVector |data| as a heap-allocated string.
541 // Caller must take ownership of the returned string. 544 // Caller must take ownership of the returned string.
542 std::string* GetDataAsString() const; 545 std::string* GetDataAsString() const;
543 546
544 QuicStreamId stream_id; 547 QuicStreamId stream_id;
545 bool fin; 548 bool fin;
546 QuicStreamOffset offset; // Location of this data in the stream. 549 QuicStreamOffset offset; // Location of this data in the stream.
547 IOVector data; 550 IOVector data;
548 551
549 // If this is set, then when this packet is ACKed the AckNotifier will be 552 // If this is set, then when this packet is ACKed the AckNotifier will be
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 CongestionFeedbackMessageFixRate fix_rate; 677 CongestionFeedbackMessageFixRate fix_rate;
675 }; 678 };
676 679
677 struct NET_EXPORT_PRIVATE QuicRstStreamFrame { 680 struct NET_EXPORT_PRIVATE QuicRstStreamFrame {
678 QuicRstStreamFrame() {} 681 QuicRstStreamFrame() {}
679 QuicRstStreamFrame(QuicStreamId stream_id, QuicRstStreamErrorCode error_code) 682 QuicRstStreamFrame(QuicStreamId stream_id, QuicRstStreamErrorCode error_code)
680 : stream_id(stream_id), error_code(error_code) { 683 : stream_id(stream_id), error_code(error_code) {
681 DCHECK_LE(error_code, std::numeric_limits<uint8>::max()); 684 DCHECK_LE(error_code, std::numeric_limits<uint8>::max());
682 } 685 }
683 686
687 NET_EXPORT_PRIVATE friend std::ostream& operator<<(
688 std::ostream& os, const QuicRstStreamFrame& s);
689
684 QuicStreamId stream_id; 690 QuicStreamId stream_id;
685 QuicRstStreamErrorCode error_code; 691 QuicRstStreamErrorCode error_code;
686 std::string error_details; 692 std::string error_details;
687 }; 693 };
688 694
689 struct NET_EXPORT_PRIVATE QuicConnectionCloseFrame { 695 struct NET_EXPORT_PRIVATE QuicConnectionCloseFrame {
690 QuicErrorCode error_code; 696 QuicErrorCode error_code;
691 std::string error_details; 697 std::string error_details;
692 }; 698 };
693 699
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 WriteStatus status; 965 WriteStatus status;
960 union { 966 union {
961 int bytes_written; // only valid when status is OK 967 int bytes_written; // only valid when status is OK
962 int error_code; // only valid when status is ERROR 968 int error_code; // only valid when status is ERROR
963 }; 969 };
964 }; 970 };
965 971
966 } // namespace net 972 } // namespace net
967 973
968 #endif // NET_QUIC_QUIC_PROTOCOL_H_ 974 #endif // NET_QUIC_QUIC_PROTOCOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698