| 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 #include "net/quic/quic_connection.h" | 5 #include "net/quic/quic_connection.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 #include <sys/types.h> | 8 #include <sys/types.h> |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <iterator> | 10 #include <iterator> |
| (...skipping 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1688 DVLOG(1) << ENDPOINT << "Processed undecryptable packet!"; | 1688 DVLOG(1) << ENDPOINT << "Processed undecryptable packet!"; |
| 1689 ++stats_.packets_processed; | 1689 ++stats_.packets_processed; |
| 1690 delete packet; | 1690 delete packet; |
| 1691 undecryptable_packets_.pop_front(); | 1691 undecryptable_packets_.pop_front(); |
| 1692 } | 1692 } |
| 1693 | 1693 |
| 1694 // Once forward secure encryption is in use, there will be no | 1694 // Once forward secure encryption is in use, there will be no |
| 1695 // new keys installed and hence any undecryptable packets will | 1695 // new keys installed and hence any undecryptable packets will |
| 1696 // never be able to be decrypted. | 1696 // never be able to be decrypted. |
| 1697 if (encryption_level_ == ENCRYPTION_FORWARD_SECURE) { | 1697 if (encryption_level_ == ENCRYPTION_FORWARD_SECURE) { |
| 1698 if (debug_visitor_ != NULL) { | 1698 if (debug_visitor_.get() != NULL) { |
| 1699 for (size_t i = 0; i < undecryptable_packets_.size(); ++i) { | 1699 for (size_t i = 0; i < undecryptable_packets_.size(); ++i) { |
| 1700 debug_visitor_->OnUndecryptablePacket(); | 1700 debug_visitor_->OnUndecryptablePacket(); |
| 1701 } | 1701 } |
| 1702 } | 1702 } |
| 1703 STLDeleteElements(&undecryptable_packets_); | 1703 STLDeleteElements(&undecryptable_packets_); |
| 1704 } | 1704 } |
| 1705 } | 1705 } |
| 1706 | 1706 |
| 1707 void QuicConnection::MaybeProcessRevivedPacket() { | 1707 void QuicConnection::MaybeProcessRevivedPacket() { |
| 1708 QuicFecGroup* group = GetFecGroup(); | 1708 QuicFecGroup* group = GetFecGroup(); |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1983 // If we changed the generator's batch state, restore original batch state. | 1983 // If we changed the generator's batch state, restore original batch state. |
| 1984 if (!already_in_batch_mode_) { | 1984 if (!already_in_batch_mode_) { |
| 1985 DVLOG(1) << "Leaving Batch Mode."; | 1985 DVLOG(1) << "Leaving Batch Mode."; |
| 1986 connection_->packet_generator_.FinishBatchOperations(); | 1986 connection_->packet_generator_.FinishBatchOperations(); |
| 1987 } | 1987 } |
| 1988 DCHECK_EQ(already_in_batch_mode_, | 1988 DCHECK_EQ(already_in_batch_mode_, |
| 1989 connection_->packet_generator_.InBatchMode()); | 1989 connection_->packet_generator_.InBatchMode()); |
| 1990 } | 1990 } |
| 1991 | 1991 |
| 1992 } // namespace net | 1992 } // namespace net |
| OLD | NEW |