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

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

Issue 1882433002: Removing NSS files and USE_OPENSSL flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 8 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/test_tools/crypto_test_utils_chromium.cc ('k') | net/socket/client_socket_factory.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
deleted file mode 100644
index c34dc01b3e8aa23df646b96734b24cce40c4d093..0000000000000000000000000000000000000000
--- a/net/quic/test_tools/crypto_test_utils_nss.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/memory/ptr_util.h"
-#include "base/stl_util.h"
-#include "base/strings/string_util.h"
-#include "crypto/ec_private_key.h"
-#include "crypto/ec_signature_creator.h"
-#include "net/quic/crypto/channel_id.h"
-#include "net/quic/crypto/channel_id_chromium.h"
-#include "net/quic/test_tools/crypto_test_utils.h"
-
-using base::StringPiece;
-using std::string;
-
-namespace net {
-
-namespace test {
-
-class TestChannelIDSource : public ChannelIDSource {
- public:
- ~TestChannelIDSource() override { STLDeleteValues(&hostname_to_key_); }
-
- // ChannelIDSource implementation.
-
- QuicAsyncStatus GetChannelIDKey(
- const string& hostname,
- std::unique_ptr<ChannelIDKey>* channel_id_key,
- ChannelIDSourceCallback* /*callback*/) override {
- channel_id_key->reset(new ChannelIDKeyChromium(HostnameToKey(hostname)));
- return QUIC_SUCCESS;
- }
-
- private:
- typedef std::map<string, crypto::ECPrivateKey*> HostnameToKeyMap;
-
- std::unique_ptr<crypto::ECPrivateKey> HostnameToKey(const string& hostname) {
- HostnameToKeyMap::const_iterator it = hostname_to_key_.find(hostname);
- if (it != hostname_to_key_.end()) {
- return base::WrapUnique(it->second->Copy());
- }
-
- crypto::ECPrivateKey* keypair = crypto::ECPrivateKey::Create();
- if (!keypair) {
- return nullptr;
- }
- hostname_to_key_[hostname] = keypair;
- return base::WrapUnique(keypair->Copy());
- }
-
- HostnameToKeyMap hostname_to_key_;
-};
-
-// static
-ChannelIDSource* CryptoTestUtils::ChannelIDSourceForTesting() {
- return new TestChannelIDSource();
-}
-
-} // namespace test
-
-} // namespace net
« no previous file with comments | « net/quic/test_tools/crypto_test_utils_chromium.cc ('k') | net/socket/client_socket_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698