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

Side by Side Diff: net/quic/quic_connection_test.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/crypto/quic_decrypter.h ('k') | net/quic/quic_framer.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_connection.h" 5 #include "net/quic/quic_connection.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 public: 134 public:
135 ~TaggingDecrypter() override {} 135 ~TaggingDecrypter() override {}
136 136
137 // QuicDecrypter interface 137 // QuicDecrypter interface
138 bool SetKey(StringPiece key) override { return true; } 138 bool SetKey(StringPiece key) override { return true; }
139 139
140 bool SetNoncePrefix(StringPiece nonce_prefix) override { return true; } 140 bool SetNoncePrefix(StringPiece nonce_prefix) override { return true; }
141 141
142 bool DecryptPacket(QuicPathId path_id, 142 bool DecryptPacket(QuicPathId path_id,
143 QuicPacketNumber packet_number, 143 QuicPacketNumber packet_number,
144 const StringPiece& associated_data, 144 StringPiece associated_data,
145 const StringPiece& ciphertext, 145 StringPiece ciphertext,
146 char* output, 146 char* output,
147 size_t* output_length, 147 size_t* output_length,
148 size_t max_output_length) override { 148 size_t max_output_length) override {
149 if (ciphertext.size() < kTagSize) { 149 if (ciphertext.size() < kTagSize) {
150 return false; 150 return false;
151 } 151 }
152 if (!CheckTag(ciphertext, GetTag(ciphertext))) { 152 if (!CheckTag(ciphertext, GetTag(ciphertext))) {
153 return false; 153 return false;
154 } 154 }
155 *output_length = ciphertext.size() - kTagSize; 155 *output_length = ciphertext.size() - kTagSize;
(...skipping 4485 matching lines...) Expand 10 before | Expand all | Expand 10 after
4641 // result in multiple attempts to close the connection - it will be marked as 4641 // result in multiple attempts to close the connection - it will be marked as
4642 // disconnected after the first call. 4642 // disconnected after the first call.
4643 EXPECT_CALL(visitor_, OnConnectionClosed(_, _)).Times(1); 4643 EXPECT_CALL(visitor_, OnConnectionClosed(_, _)).Times(1);
4644 connection_.SendConnectionCloseWithDetails(QUIC_NO_ERROR, "no reason"); 4644 connection_.SendConnectionCloseWithDetails(QUIC_NO_ERROR, "no reason");
4645 connection_.SendConnectionCloseWithDetails(QUIC_NO_ERROR, "no reason"); 4645 connection_.SendConnectionCloseWithDetails(QUIC_NO_ERROR, "no reason");
4646 } 4646 }
4647 4647
4648 } // namespace 4648 } // namespace
4649 } // namespace test 4649 } // namespace test
4650 } // namespace net 4650 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/quic_decrypter.h ('k') | net/quic/quic_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698