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

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

Issue 145083006: [webcrypto] Add error messages for failed operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compiler warning on windows Created 6 years, 11 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: content/renderer/webcrypto/webcrypto_impl.h
diff --git a/content/renderer/webcrypto/webcrypto_impl.h b/content/renderer/webcrypto/webcrypto_impl.h
index 6537d429b6f1c35e914d4b672da3c129a07a20f9..376a0da60996657ad2f5c6c7c135bcf73791accc 100644
--- a/content/renderer/webcrypto/webcrypto_impl.h
+++ b/content/renderer/webcrypto/webcrypto_impl.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "content/common/content_export.h"
+#include "content/renderer/webcrypto/webcrypto_util.h"
Ryan Sleevi 2014/01/28 21:11:58 You can forward-declare webcrypto::Status here bec
eroman 2014/01/28 22:59:08 Neat, didn't realize you could do that for return-
#include "third_party/WebKit/public/platform/WebCrypto.h"
namespace content {
@@ -72,35 +73,35 @@ class CONTENT_EXPORT WebCryptoImpl
void Init();
- bool EncryptInternal(
+ webcrypto::Status EncryptInternal(
const blink::WebCryptoAlgorithm& algorithm,
const blink::WebCryptoKey& key,
const unsigned char* data,
unsigned data_size,
blink::WebArrayBuffer* buffer);
- bool DecryptInternal(
+ webcrypto::Status DecryptInternal(
const blink::WebCryptoAlgorithm& algorithm,
const blink::WebCryptoKey& key,
const unsigned char* data,
unsigned data_size,
blink::WebArrayBuffer* buffer);
- bool DigestInternal(
+ webcrypto::Status DigestInternal(
const blink::WebCryptoAlgorithm& algorithm,
const unsigned char* data,
unsigned data_size,
blink::WebArrayBuffer* buffer);
- bool GenerateKeyInternal(
+ webcrypto::Status GenerateKeyInternal(
const blink::WebCryptoAlgorithm& algorithm,
bool extractable,
blink::WebCryptoKeyUsageMask usage_mask,
blink::WebCryptoKey* key);
- bool GenerateKeyPairInternal(
+ webcrypto::Status GenerateKeyPairInternal(
const blink::WebCryptoAlgorithm& algorithm,
bool extractable,
blink::WebCryptoKeyUsageMask usage_mask,
blink::WebCryptoKey* public_key,
blink::WebCryptoKey* private_key);
- bool ImportKeyInternal(
+ webcrypto::Status ImportKeyInternal(
blink::WebCryptoKeyFormat format,
const unsigned char* key_data,
unsigned key_data_size,
@@ -108,17 +109,17 @@ class CONTENT_EXPORT WebCryptoImpl
bool extractable,
blink::WebCryptoKeyUsageMask usage_mask,
blink::WebCryptoKey* key);
- bool ExportKeyInternal(
+ webcrypto::Status ExportKeyInternal(
blink::WebCryptoKeyFormat format,
const blink::WebCryptoKey& key,
blink::WebArrayBuffer* buffer);
- bool SignInternal(
+ webcrypto::Status SignInternal(
const blink::WebCryptoAlgorithm& algorithm,
const blink::WebCryptoKey& key,
const unsigned char* data,
unsigned data_size,
blink::WebArrayBuffer* buffer);
- bool VerifySignatureInternal(
+ webcrypto::Status VerifySignatureInternal(
const blink::WebCryptoAlgorithm& algorithm,
const blink::WebCryptoKey& key,
const unsigned char* signature,
@@ -127,14 +128,14 @@ class CONTENT_EXPORT WebCryptoImpl
unsigned data_size,
bool* signature_match);
- bool ImportKeyJwk(
+ webcrypto::Status ImportKeyJwk(
const unsigned char* key_data,
unsigned key_data_size,
const blink::WebCryptoAlgorithm& algorithm_or_null,
bool extractable,
blink::WebCryptoKeyUsageMask usage_mask,
blink::WebCryptoKey* key);
- bool ImportRsaPublicKeyInternal(
+ webcrypto::Status ImportRsaPublicKeyInternal(
const unsigned char* modulus_data,
unsigned modulus_size,
const unsigned char* exponent_data,
« no previous file with comments | « no previous file | content/renderer/webcrypto/webcrypto_impl.cc » ('j') | content/renderer/webcrypto/webcrypto_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698