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

Side by Side Diff: net/quic/core/quic_connection.cc

Issue 2340583002: Make DiversificationNonce a std::array (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « net/quic/core/quic_connection.h ('k') | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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
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
OLDNEW
« no previous file with comments | « net/quic/core/quic_connection.h ('k') | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698