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_FRAMER_H_ | 5 #ifndef NET_QUIC_QUIC_FRAMER_H_ |
6 #define NET_QUIC_QUIC_FRAMER_H_ | 6 #define NET_QUIC_QUIC_FRAMER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <string> | 11 #include <string> |
| 12 #include <unordered_map> |
| 13 #include <unordered_set> |
12 #include <vector> | 14 #include <vector> |
13 | 15 |
14 #include "base/logging.h" | 16 #include "base/logging.h" |
15 #include "base/macros.h" | 17 #include "base/macros.h" |
16 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
17 #include "base/strings/string_piece.h" | 19 #include "base/strings/string_piece.h" |
18 #include "net/base/net_export.h" | 20 #include "net/base/net_export.h" |
19 #include "net/quic/quic_protocol.h" | 21 #include "net/quic/quic_protocol.h" |
20 | 22 |
21 namespace net { | 23 namespace net { |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 void set_detailed_error(const char* error) { detailed_error_ = error; } | 518 void set_detailed_error(const char* error) { detailed_error_ = error; } |
517 | 519 |
518 std::string detailed_error_; | 520 std::string detailed_error_; |
519 QuicFramerVisitorInterface* visitor_; | 521 QuicFramerVisitorInterface* visitor_; |
520 QuicReceivedEntropyHashCalculatorInterface* entropy_calculator_; | 522 QuicReceivedEntropyHashCalculatorInterface* entropy_calculator_; |
521 QuicErrorCode error_; | 523 QuicErrorCode error_; |
522 // Set of closed paths. A path is considered as closed if a PATH_CLOSED frame | 524 // Set of closed paths. A path is considered as closed if a PATH_CLOSED frame |
523 // has been sent/received. | 525 // has been sent/received. |
524 // TODO(fayang): this set is never cleaned up. A possible improvement is to | 526 // TODO(fayang): this set is never cleaned up. A possible improvement is to |
525 // use intervals. | 527 // use intervals. |
526 base::hash_set<QuicPathId> closed_paths_; | 528 std::unordered_set<QuicPathId> closed_paths_; |
527 // Map mapping path id to packet number of last successfully decrypted/revived | 529 // Map mapping path id to packet number of last successfully decrypted/revived |
528 // received packet. | 530 // received packet. |
529 base::hash_map<QuicPathId, QuicPacketNumber> last_packet_numbers_; | 531 std::unordered_map<QuicPathId, QuicPacketNumber> last_packet_numbers_; |
530 // Updated by ProcessPacketHeader when it succeeds. | 532 // Updated by ProcessPacketHeader when it succeeds. |
531 QuicPacketNumber last_packet_number_; | 533 QuicPacketNumber last_packet_number_; |
532 // The path on which last successfully decrypted/revived packet was received. | 534 // The path on which last successfully decrypted/revived packet was received. |
533 QuicPathId last_path_id_; | 535 QuicPathId last_path_id_; |
534 // Updated by WritePacketHeader. | 536 // Updated by WritePacketHeader. |
535 QuicConnectionId last_serialized_connection_id_; | 537 QuicConnectionId last_serialized_connection_id_; |
536 // Version of the protocol being used. | 538 // Version of the protocol being used. |
537 QuicVersion quic_version_; | 539 QuicVersion quic_version_; |
538 // This vector contains QUIC versions which we currently support. | 540 // This vector contains QUIC versions which we currently support. |
539 // This should be ordered such that the highest supported version is the first | 541 // This should be ordered such that the highest supported version is the first |
(...skipping 25 matching lines...) Expand all Loading... |
565 // The time delta computed for the last timestamp frame. This is relative to | 567 // The time delta computed for the last timestamp frame. This is relative to |
566 // the creation_time. | 568 // the creation_time. |
567 QuicTime::Delta last_timestamp_; | 569 QuicTime::Delta last_timestamp_; |
568 | 570 |
569 DISALLOW_COPY_AND_ASSIGN(QuicFramer); | 571 DISALLOW_COPY_AND_ASSIGN(QuicFramer); |
570 }; | 572 }; |
571 | 573 |
572 } // namespace net | 574 } // namespace net |
573 | 575 |
574 #endif // NET_QUIC_QUIC_FRAMER_H_ | 576 #endif // NET_QUIC_QUIC_FRAMER_H_ |
OLD | NEW |