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

Side by Side Diff: net/quic/quic_framer.cc

Issue 1787453002: Switch "const StringPiece&" to just "StringPiece" in QUIC code. No functional change. Not flag prot… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@116566297
Patch Set: Remove const StringPiece& from _nss crypto files. Created 4 years, 9 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/quic_connection_test.cc ('k') | net/quic/quic_framer_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/quic_framer.h" 5 #include "net/quic/quic_framer.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 } 1695 }
1696 1696
1697 bool QuicFramer::DecryptPayload(QuicDataReader* encrypted_reader, 1697 bool QuicFramer::DecryptPayload(QuicDataReader* encrypted_reader,
1698 const QuicPacketHeader& header, 1698 const QuicPacketHeader& header,
1699 const QuicEncryptedPacket& packet, 1699 const QuicEncryptedPacket& packet,
1700 char* decrypted_buffer, 1700 char* decrypted_buffer,
1701 size_t buffer_length, 1701 size_t buffer_length,
1702 size_t* decrypted_length) { 1702 size_t* decrypted_length) {
1703 StringPiece encrypted = encrypted_reader->ReadRemainingPayload(); 1703 StringPiece encrypted = encrypted_reader->ReadRemainingPayload();
1704 DCHECK(decrypter_.get() != nullptr); 1704 DCHECK(decrypter_.get() != nullptr);
1705 const StringPiece& associated_data = GetAssociatedDataFromEncryptedPacket( 1705 StringPiece associated_data = GetAssociatedDataFromEncryptedPacket(
1706 packet, header.public_header.connection_id_length, 1706 packet, header.public_header.connection_id_length,
1707 header.public_header.version_flag, header.public_header.multipath_flag, 1707 header.public_header.version_flag, header.public_header.multipath_flag,
1708 header.public_header.packet_number_length); 1708 header.public_header.packet_number_length);
1709 bool success = decrypter_->DecryptPacket( 1709 bool success = decrypter_->DecryptPacket(
1710 header.path_id, header.packet_number, associated_data, encrypted, 1710 header.path_id, header.packet_number, associated_data, encrypted,
1711 decrypted_buffer, decrypted_length, buffer_length); 1711 decrypted_buffer, decrypted_length, buffer_length);
1712 if (success) { 1712 if (success) {
1713 visitor_->OnDecryptedPacket(decrypter_level_); 1713 visitor_->OnDecryptedPacket(decrypter_level_);
1714 } else if (alternative_decrypter_.get() != nullptr) { 1714 } else if (alternative_decrypter_.get() != nullptr) {
1715 success = alternative_decrypter_->DecryptPacket( 1715 success = alternative_decrypter_->DecryptPacket(
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
2226 2226
2227 bool QuicFramer::RaiseError(QuicErrorCode error) { 2227 bool QuicFramer::RaiseError(QuicErrorCode error) {
2228 DVLOG(1) << "Error: " << QuicUtils::ErrorToString(error) 2228 DVLOG(1) << "Error: " << QuicUtils::ErrorToString(error)
2229 << " detail: " << detailed_error_; 2229 << " detail: " << detailed_error_;
2230 set_error(error); 2230 set_error(error);
2231 visitor_->OnError(this); 2231 visitor_->OnError(this);
2232 return false; 2232 return false;
2233 } 2233 }
2234 2234
2235 } // namespace net 2235 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698