| Index: components/webcrypto/webcrypto_impl.cc
|
| diff --git a/components/webcrypto/webcrypto_impl.cc b/components/webcrypto/webcrypto_impl.cc
|
| index 3ccfbc912d1570201b575c33aa6ef57d0b718582..5afba8828cccd43a661a48a21a4808a8e8405984 100644
|
| --- a/components/webcrypto/webcrypto_impl.cc
|
| +++ b/components/webcrypto/webcrypto_impl.cc
|
| @@ -162,8 +162,6 @@ struct BaseState {
|
| explicit BaseState(const blink::WebCryptoResult& result)
|
| : origin_thread(GetCurrentBlinkThread()), result(result) {}
|
|
|
| - bool cancelled() { return result.cancelled(); }
|
| -
|
| scoped_refptr<base::TaskRunner> origin_thread;
|
|
|
| webcrypto::Status status;
|
| @@ -380,8 +378,6 @@ void DoEncryptReply(scoped_ptr<EncryptState> state) {
|
|
|
| void DoEncrypt(scoped_ptr<EncryptState> passed_state) {
|
| EncryptState* state = passed_state.get();
|
| - if (state->cancelled())
|
| - return;
|
| state->status =
|
| webcrypto::Encrypt(state->algorithm, state->key,
|
| webcrypto::CryptoData(state->data), &state->buffer);
|
| @@ -395,8 +391,6 @@ void DoDecryptReply(scoped_ptr<DecryptState> state) {
|
|
|
| void DoDecrypt(scoped_ptr<DecryptState> passed_state) {
|
| DecryptState* state = passed_state.get();
|
| - if (state->cancelled())
|
| - return;
|
| state->status =
|
| webcrypto::Decrypt(state->algorithm, state->key,
|
| webcrypto::CryptoData(state->data), &state->buffer);
|
| @@ -410,8 +404,6 @@ void DoDigestReply(scoped_ptr<DigestState> state) {
|
|
|
| void DoDigest(scoped_ptr<DigestState> passed_state) {
|
| DigestState* state = passed_state.get();
|
| - if (state->cancelled())
|
| - return;
|
| state->status = webcrypto::Digest(
|
| state->algorithm, webcrypto::CryptoData(state->data), &state->buffer);
|
| state->origin_thread->PostTask(
|
| @@ -428,8 +420,6 @@ void DoGenerateKeyReply(scoped_ptr<GenerateKeyState> state) {
|
|
|
| void DoGenerateKey(scoped_ptr<GenerateKeyState> passed_state) {
|
| GenerateKeyState* state = passed_state.get();
|
| - if (state->cancelled())
|
| - return;
|
| state->status =
|
| webcrypto::GenerateKey(state->algorithm, state->extractable,
|
| state->usages, &state->generate_key_result);
|
| @@ -443,8 +433,6 @@ void DoImportKeyReply(scoped_ptr<ImportKeyState> state) {
|
|
|
| void DoImportKey(scoped_ptr<ImportKeyState> passed_state) {
|
| ImportKeyState* state = passed_state.get();
|
| - if (state->cancelled())
|
| - return;
|
| state->status = webcrypto::ImportKey(
|
| state->format, webcrypto::CryptoData(state->key_data), state->algorithm,
|
| state->extractable, state->usages, &state->key);
|
| @@ -475,8 +463,6 @@ void DoExportKeyReply(scoped_ptr<ExportKeyState> state) {
|
|
|
| void DoExportKey(scoped_ptr<ExportKeyState> passed_state) {
|
| ExportKeyState* state = passed_state.get();
|
| - if (state->cancelled())
|
| - return;
|
| state->status =
|
| webcrypto::ExportKey(state->format, state->key, &state->buffer);
|
| state->origin_thread->PostTask(
|
| @@ -489,8 +475,6 @@ void DoSignReply(scoped_ptr<SignState> state) {
|
|
|
| void DoSign(scoped_ptr<SignState> passed_state) {
|
| SignState* state = passed_state.get();
|
| - if (state->cancelled())
|
| - return;
|
| state->status =
|
| webcrypto::Sign(state->algorithm, state->key,
|
| webcrypto::CryptoData(state->data), &state->buffer);
|
| @@ -509,8 +493,6 @@ void DoVerifyReply(scoped_ptr<VerifySignatureState> state) {
|
|
|
| void DoVerify(scoped_ptr<VerifySignatureState> passed_state) {
|
| VerifySignatureState* state = passed_state.get();
|
| - if (state->cancelled())
|
| - return;
|
| state->status = webcrypto::Verify(
|
| state->algorithm, state->key, webcrypto::CryptoData(state->signature),
|
| webcrypto::CryptoData(state->data), &state->verify_result);
|
| @@ -525,8 +507,6 @@ void DoWrapKeyReply(scoped_ptr<WrapKeyState> state) {
|
|
|
| void DoWrapKey(scoped_ptr<WrapKeyState> passed_state) {
|
| WrapKeyState* state = passed_state.get();
|
| - if (state->cancelled())
|
| - return;
|
| state->status =
|
| webcrypto::WrapKey(state->format, state->key, state->wrapping_key,
|
| state->wrap_algorithm, &state->buffer);
|
| @@ -541,8 +521,6 @@ void DoUnwrapKeyReply(scoped_ptr<UnwrapKeyState> state) {
|
|
|
| void DoUnwrapKey(scoped_ptr<UnwrapKeyState> passed_state) {
|
| UnwrapKeyState* state = passed_state.get();
|
| - if (state->cancelled())
|
| - return;
|
| state->status = webcrypto::UnwrapKey(
|
| state->format, webcrypto::CryptoData(state->wrapped_key),
|
| state->wrapping_key, state->unwrap_algorithm,
|
| @@ -560,8 +538,6 @@ void DoDeriveBitsReply(scoped_ptr<DeriveBitsState> state) {
|
|
|
| void DoDeriveBits(scoped_ptr<DeriveBitsState> passed_state) {
|
| DeriveBitsState* state = passed_state.get();
|
| - if (state->cancelled())
|
| - return;
|
| state->status =
|
| webcrypto::DeriveBits(state->algorithm, state->base_key,
|
| state->length_bits, &state->derived_bytes);
|
| @@ -575,8 +551,6 @@ void DoDeriveKeyReply(scoped_ptr<DeriveKeyState> state) {
|
|
|
| void DoDeriveKey(scoped_ptr<DeriveKeyState> passed_state) {
|
| DeriveKeyState* state = passed_state.get();
|
| - if (state->cancelled())
|
| - return;
|
| state->status = webcrypto::DeriveKey(
|
| state->algorithm, state->base_key, state->import_algorithm,
|
| state->key_length_algorithm, state->extractable, state->usages,
|
|
|