Chromium Code Reviews| Index: crypto/ec_signature_creator.cc |
| diff --git a/crypto/ec_signature_creator.cc b/crypto/ec_signature_creator.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a194f0ec253e5c502c3b93f0aa8e142574a98745 |
| --- /dev/null |
| +++ b/crypto/ec_signature_creator.cc |
| @@ -0,0 +1,28 @@ |
| +// Copyright (c) 2012 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 "crypto/ec_signature_creator.h" |
| + |
| +namespace crypto { |
| + |
| +namespace { |
| + |
| +ECSignatureCreatorFactory* g_factory_ = NULL; |
|
Ryan Hamilton
2012/02/23 04:36:12
I was going to recommend that you move this to the
|
| + |
| +} // namespace |
| + |
| +// static |
| +ECSignatureCreator* ECSignatureCreator::Create(ECPrivateKey* key) { |
| + if (g_factory_) |
| + return g_factory_->Create(key); |
| + return CreatePlatformImpl(key); |
| +} |
| + |
| +// static |
| +void ECSignatureCreator::SetFactoryForTesting( |
| + ECSignatureCreatorFactory* factory) { |
| + g_factory_ = factory; |
| +} |
| + |
| +} // namespace crypto |