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

Unified Diff: net/quic/crypto/curve25519_key_exchange.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/crypto/curve25519_key_exchange.h ('k') | net/quic/crypto/key_exchange.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/curve25519_key_exchange.cc
diff --git a/net/quic/crypto/curve25519_key_exchange.cc b/net/quic/crypto/curve25519_key_exchange.cc
index cf97addb50a19c85638c79dcb5649d9b68781ac6..6545d21bc2f14751bd74bbb84c886ab8e41d2723 100644
--- a/net/quic/crypto/curve25519_key_exchange.cc
+++ b/net/quic/crypto/curve25519_key_exchange.cc
@@ -18,8 +18,7 @@ Curve25519KeyExchange::Curve25519KeyExchange() {}
Curve25519KeyExchange::~Curve25519KeyExchange() {}
// static
-Curve25519KeyExchange* Curve25519KeyExchange::New(
- const StringPiece& private_key) {
+Curve25519KeyExchange* Curve25519KeyExchange::New(StringPiece private_key) {
Curve25519KeyExchange* ka;
// We don't want to #include the NaCl headers in the public header file, so
// we use literals for the sizes of private_key_ and public_key_. Here we
@@ -58,9 +57,8 @@ KeyExchange* Curve25519KeyExchange::NewKeyPair(QuicRandom* rand) const {
return Curve25519KeyExchange::New(private_value);
}
-bool Curve25519KeyExchange::CalculateSharedKey(
- const StringPiece& peer_public_value,
- string* out_result) const {
+bool Curve25519KeyExchange::CalculateSharedKey(StringPiece peer_public_value,
+ string* out_result) const {
if (peer_public_value.size() != crypto::curve25519::kBytes) {
return false;
}
« no previous file with comments | « net/quic/crypto/curve25519_key_exchange.h ('k') | net/quic/crypto/key_exchange.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698