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/core/quic_connection.h" | 5 #include "net/quic/core/quic_connection.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 #include <sys/types.h> | 8 #include <sys/types.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1955 if (!HasQueuedData() && !retransmission_alarm_->IsSet()) { | 1955 if (!HasQueuedData() && !retransmission_alarm_->IsSet()) { |
1956 SetRetransmissionAlarm(); | 1956 SetRetransmissionAlarm(); |
1957 } | 1957 } |
1958 } | 1958 } |
1959 | 1959 |
1960 void QuicConnection::SetEncrypter(EncryptionLevel level, | 1960 void QuicConnection::SetEncrypter(EncryptionLevel level, |
1961 QuicEncrypter* encrypter) { | 1961 QuicEncrypter* encrypter) { |
1962 packet_generator_.SetEncrypter(level, encrypter); | 1962 packet_generator_.SetEncrypter(level, encrypter); |
1963 } | 1963 } |
1964 | 1964 |
1965 void QuicConnection::SetDiversificationNonce(const DiversificationNonce nonce) { | 1965 void QuicConnection::SetDiversificationNonce( |
| 1966 const DiversificationNonce& nonce) { |
1966 DCHECK_EQ(Perspective::IS_SERVER, perspective_); | 1967 DCHECK_EQ(Perspective::IS_SERVER, perspective_); |
1967 packet_generator_.SetDiversificationNonce(nonce); | 1968 packet_generator_.SetDiversificationNonce(nonce); |
1968 } | 1969 } |
1969 | 1970 |
1970 void QuicConnection::SetDefaultEncryptionLevel(EncryptionLevel level) { | 1971 void QuicConnection::SetDefaultEncryptionLevel(EncryptionLevel level) { |
1971 encryption_level_ = level; | 1972 encryption_level_ = level; |
1972 packet_generator_.set_encryption_level(level); | 1973 packet_generator_.set_encryption_level(level); |
1973 } | 1974 } |
1974 | 1975 |
1975 void QuicConnection::SetDecrypter(EncryptionLevel level, | 1976 void QuicConnection::SetDecrypter(EncryptionLevel level, |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2552 | 2553 |
2553 void QuicConnection::CheckIfApplicationLimited() { | 2554 void QuicConnection::CheckIfApplicationLimited() { |
2554 if (queued_packets_.empty() && | 2555 if (queued_packets_.empty() && |
2555 !sent_packet_manager_->HasPendingRetransmissions() && | 2556 !sent_packet_manager_->HasPendingRetransmissions() && |
2556 !visitor_->WillingAndAbleToWrite()) { | 2557 !visitor_->WillingAndAbleToWrite()) { |
2557 sent_packet_manager_->OnApplicationLimited(); | 2558 sent_packet_manager_->OnApplicationLimited(); |
2558 } | 2559 } |
2559 } | 2560 } |
2560 | 2561 |
2561 } // namespace net | 2562 } // namespace net |
OLD | NEW |