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

Unified Diff: content/renderer/webcrypto/webcrypto_impl.h

Issue 50173002: [webcrypto] Refactor to allow for unspecified "algorithm" to importKey(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address sleevi comments and make NullKey() work in debug mode Created 7 years, 2 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 | « no previous file | content/renderer/webcrypto/webcrypto_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/webcrypto/webcrypto_impl.h
diff --git a/content/renderer/webcrypto/webcrypto_impl.h b/content/renderer/webcrypto/webcrypto_impl.h
index f0b7dc514a27d13fdbbed1fb3e1b2544d0ea149b..5979b628c4f27b35eb7f50711dbc166b97715dc6 100644
--- a/content/renderer/webcrypto/webcrypto_impl.h
+++ b/content/renderer/webcrypto/webcrypto_impl.h
@@ -7,7 +7,6 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
#include "third_party/WebKit/public/platform/WebCrypto.h"
@@ -38,13 +37,13 @@ class CONTENT_EXPORT WebCryptoImpl
virtual void generateKey(
const WebKit::WebCryptoAlgorithm& algorithm,
bool extractable,
- WebKit::WebCryptoKeyUsageMask usage,
+ WebKit::WebCryptoKeyUsageMask usage_mask,
WebKit::WebCryptoResult result);
virtual void importKey(
WebKit::WebCryptoKeyFormat format,
const unsigned char* key_data,
unsigned key_data_size,
- const WebKit::WebCryptoAlgorithm& algorithm,
+ const WebKit::WebCryptoAlgorithm& algorithm_or_null,
bool extractable,
WebKit::WebCryptoKeyUsageMask usage_mask,
WebKit::WebCryptoResult result);
@@ -64,6 +63,7 @@ class CONTENT_EXPORT WebCryptoImpl
WebKit::WebCryptoResult result);
static void ShrinkBuffer(WebKit::WebArrayBuffer* buffer, unsigned new_size);
+ static WebKit::WebCryptoKey NullKey();
protected:
friend class WebCryptoImplTest;
@@ -89,16 +89,17 @@ class CONTENT_EXPORT WebCryptoImpl
WebKit::WebArrayBuffer* buffer);
bool GenerateKeyInternal(
const WebKit::WebCryptoAlgorithm& algorithm,
- scoped_ptr<WebKit::WebCryptoKeyHandle>* key,
- WebKit::WebCryptoKeyType* type);
+ bool extractable,
+ WebKit::WebCryptoKeyUsageMask usage_mask,
+ WebKit::WebCryptoKey* key);
bool ImportKeyInternal(
WebKit::WebCryptoKeyFormat format,
const unsigned char* key_data,
unsigned key_data_size,
- const WebKit::WebCryptoAlgorithm& algorithm,
+ const WebKit::WebCryptoAlgorithm& algorithm_or_null,
+ bool extractable,
WebKit::WebCryptoKeyUsageMask usage_mask,
- scoped_ptr<WebKit::WebCryptoKeyHandle>* handle,
- WebKit::WebCryptoKeyType* type);
+ WebKit::WebCryptoKey* key);
bool SignInternal(
const WebKit::WebCryptoAlgorithm& algorithm,
const WebKit::WebCryptoKey& key,
« no previous file with comments | « no previous file | content/renderer/webcrypto/webcrypto_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698