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

Unified Diff: net/quic/test_tools/crypto_test_utils_nss.cc

Issue 1076063002: Remove certificates from Channel ID (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Udpate KeysEqual to fail if preconditions fail Created 5 years, 7 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/channel_id_chromium.cc ('k') | net/socket/ssl_client_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/test_tools/crypto_test_utils_nss.cc
diff --git a/net/quic/test_tools/crypto_test_utils_nss.cc b/net/quic/test_tools/crypto_test_utils_nss.cc
index f42775003faef05be62576f497c09a54cd04870d..946b05318249eb2df0a213a8bebe34100af98e8b 100644
--- a/net/quic/test_tools/crypto_test_utils_nss.cc
+++ b/net/quic/test_tools/crypto_test_utils_nss.cc
@@ -35,10 +35,10 @@ class TestChannelIDSource : public ChannelIDSource {
private:
typedef std::map<string, crypto::ECPrivateKey*> HostnameToKeyMap;
- crypto::ECPrivateKey* HostnameToKey(const string& hostname) {
+ scoped_ptr<crypto::ECPrivateKey> HostnameToKey(const string& hostname) {
HostnameToKeyMap::const_iterator it = hostname_to_key_.find(hostname);
if (it != hostname_to_key_.end()) {
- return it->second->Copy();
+ return make_scoped_ptr(it->second->Copy());
}
crypto::ECPrivateKey* keypair = crypto::ECPrivateKey::Create();
@@ -46,7 +46,7 @@ class TestChannelIDSource : public ChannelIDSource {
return nullptr;
}
hostname_to_key_[hostname] = keypair;
- return keypair->Copy();
+ return make_scoped_ptr(keypair->Copy());
}
HostnameToKeyMap hostname_to_key_;
« no previous file with comments | « net/quic/crypto/channel_id_chromium.cc ('k') | net/socket/ssl_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698