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 |