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

Unified Diff: crypto/ec_signature_creator.cc

Issue 9455006: Fix SpdySession::WriteCredentialFrame ECPrivateKey creation args. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forgot add Created 8 years, 10 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
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

Powered by Google App Engine
This is Rietveld 408576698