| OLD | NEW |
| 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 const char* buffer_; | 457 const char* buffer_; |
| 458 size_t length_; | 458 size_t length_; |
| 459 bool owns_buffer_; | 459 bool owns_buffer_; |
| 460 | 460 |
| 461 DISALLOW_COPY_AND_ASSIGN(QuicData); | 461 DISALLOW_COPY_AND_ASSIGN(QuicData); |
| 462 }; | 462 }; |
| 463 | 463 |
| 464 class NET_EXPORT_PRIVATE QuicPacket : public QuicData { | 464 class NET_EXPORT_PRIVATE QuicPacket : public QuicData { |
| 465 public: | 465 public: |
| 466 static QuicPacket* NewDataPacket(char* buffer, | 466 static QuicPacket* NewDataPacket(char* buffer, |
| 467 size_t length, | 467 size_t length, |
| 468 bool owns_buffer) { | 468 bool owns_buffer) { |
| 469 return new QuicPacket(buffer, length, owns_buffer, false); | 469 return new QuicPacket(buffer, length, owns_buffer, false); |
| 470 } | 470 } |
| 471 | 471 |
| 472 static QuicPacket* NewFecPacket(char* buffer, | 472 static QuicPacket* NewFecPacket(char* buffer, |
| 473 size_t length, | 473 size_t length, |
| 474 bool owns_buffer) { | 474 bool owns_buffer) { |
| 475 return new QuicPacket(buffer, length, owns_buffer, true); | 475 return new QuicPacket(buffer, length, owns_buffer, true); |
| 476 } | 476 } |
| 477 | 477 |
| 478 base::StringPiece FecProtectedData() const { | 478 base::StringPiece FecProtectedData() const { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 NET_EXPORT_PRIVATE friend std::ostream& operator<<( | 544 NET_EXPORT_PRIVATE friend std::ostream& operator<<( |
| 545 std::ostream& os, const QuicConsumedData& s); | 545 std::ostream& os, const QuicConsumedData& s); |
| 546 | 546 |
| 547 size_t bytes_consumed; | 547 size_t bytes_consumed; |
| 548 bool fin_consumed; | 548 bool fin_consumed; |
| 549 }; | 549 }; |
| 550 | 550 |
| 551 } // namespace net | 551 } // namespace net |
| 552 | 552 |
| 553 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 553 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
| OLD | NEW |