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

Side by Side Diff: net/quic/quic_framer_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/quic_framer.cc ('k') | no next file » | 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 #include <algorithm> 8 #include <algorithm>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 string plaintext_; 147 string plaintext_;
148 }; 148 };
149 149
150 class TestDecrypter : public QuicDecrypter { 150 class TestDecrypter : public QuicDecrypter {
151 public: 151 public:
152 ~TestDecrypter() override {} 152 ~TestDecrypter() override {}
153 bool SetKey(StringPiece key) override { return true; } 153 bool SetKey(StringPiece key) override { return true; }
154 bool SetNoncePrefix(StringPiece nonce_prefix) override { return true; } 154 bool SetNoncePrefix(StringPiece nonce_prefix) override { return true; }
155 bool DecryptPacket(QuicPathId path_id, 155 bool DecryptPacket(QuicPathId path_id,
156 QuicPacketNumber packet_number, 156 QuicPacketNumber packet_number,
157 const StringPiece& associated_data, 157 StringPiece associated_data,
158 const StringPiece& ciphertext, 158 StringPiece ciphertext,
159 char* output, 159 char* output,
160 size_t* output_length, 160 size_t* output_length,
161 size_t max_output_length) override { 161 size_t max_output_length) override {
162 path_id_ = path_id; 162 path_id_ = path_id;
163 packet_number_ = packet_number; 163 packet_number_ = packet_number;
164 associated_data_ = associated_data.as_string(); 164 associated_data_ = associated_data.as_string();
165 ciphertext_ = ciphertext.as_string(); 165 ciphertext_ = ciphertext.as_string();
166 memcpy(output, ciphertext.data(), ciphertext.length()); 166 memcpy(output, ciphertext.data(), ciphertext.length());
167 *output_length = ciphertext.length(); 167 *output_length = ciphertext.length();
168 return true; 168 return true;
(...skipping 4456 matching lines...) Expand 10 before | Expand all | Expand 10 after
4625 'o', ' ', 'w', 'o', 4625 'o', ' ', 'w', 'o',
4626 'r', 'l', 'd', '!', 4626 'r', 'l', 'd', '!',
4627 }; 4627 };
4628 // clang-format on 4628 // clang-format on
4629 4629
4630 QuicFramerFuzzFunc(packet, arraysize(packet)); 4630 QuicFramerFuzzFunc(packet, arraysize(packet));
4631 } 4631 }
4632 4632
4633 } // namespace test 4633 } // namespace test
4634 } // namespace net 4634 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_framer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698