Commit 0945421b authored by eroman@chromium.org's avatar eroman@chromium.org

[refactor] Remove usages of WEBCRYPTO_HAS_ERROR_TYPE ifdef.

No longer needed now that Blink has rolled.

BUG=245025
R=rsleevi@chromium.org

Review URL: https://codereview.chromium.org/253123002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267013 0039d316-1c4b-4281-b951-d872f2087c98
parent 6bb40982
...@@ -122,11 +122,7 @@ Status Status::ErrorImportEmptyKeyData() { ...@@ -122,11 +122,7 @@ Status Status::ErrorImportEmptyKeyData() {
Status Status::ErrorImportAesKeyLength() { Status Status::ErrorImportAesKeyLength() {
return Status(blink::WebCryptoErrorTypeData, return Status(blink::WebCryptoErrorTypeData,
#if defined(WEBCRYPTO_HAS_ERROR_TYPE)
"AES key data must be 128, 192 or 256 bits"); "AES key data must be 128, 192 or 256 bits");
#else
"");
#endif
} }
Status Status::ErrorUnexpectedKeyType() { Status Status::ErrorUnexpectedKeyType() {
......
...@@ -9,26 +9,6 @@ ...@@ -9,26 +9,6 @@
#include "content/common/content_export.h" #include "content/common/content_export.h"
#include "third_party/WebKit/public/platform/WebCrypto.h" #include "third_party/WebKit/public/platform/WebCrypto.h"
#if !defined(WEBCRYPTO_HAS_ERROR_TYPE)
// TODO(eroman): Delete once Blink changes have rolled into Chromium.
namespace blink {
enum WebCryptoErrorType {
WebCryptoErrorTypeType,
WebCryptoErrorTypeNotSupported,
WebCryptoErrorTypeSyntax,
WebCryptoErrorTypeInvalidState,
WebCryptoErrorTypeInvalidAccess,
WebCryptoErrorTypeUnknown,
WebCryptoErrorTypeData,
WebCryptoErrorTypeOperation,
};
} // namespace blink
#endif
namespace content { namespace content {
namespace webcrypto { namespace webcrypto {
......
...@@ -22,17 +22,8 @@ namespace { ...@@ -22,17 +22,8 @@ namespace {
void CompleteWithError(const Status& status, blink::WebCryptoResult* result) { void CompleteWithError(const Status& status, blink::WebCryptoResult* result) {
DCHECK(status.IsError()); DCHECK(status.IsError());
#if defined(WEBCRYPTO_HAS_ERROR_TYPE)
result->completeWithError(status.error_type(), result->completeWithError(status.error_type(),
blink::WebString::fromUTF8(status.error_details())); blink::WebString::fromUTF8(status.error_details()));
#else
// TODO(eroman): Delete once Blink changes have rolled into Chromium.
if (!status.error_details().empty())
result->completeWithError(
blink::WebString::fromUTF8(status.error_details()));
else
result->completeWithError();
#endif
} }
bool IsAlgorithmAsymmetric(const blink::WebCryptoAlgorithm& algorithm) { bool IsAlgorithmAsymmetric(const blink::WebCryptoAlgorithm& algorithm) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment