Chromium Code Reviews| Index: content/child/webcrypto/webcrypto_impl.cc |
| diff --git a/content/child/webcrypto/webcrypto_impl.cc b/content/child/webcrypto/webcrypto_impl.cc |
| index ef0740ba6629b69dd6efbd6beb6df0c2dd9071f9..3eed92769c9eab0fe1ae854a2ca48cb2169402f1 100644 |
| --- a/content/child/webcrypto/webcrypto_impl.cc |
| +++ b/content/child/webcrypto/webcrypto_impl.cc |
| @@ -457,7 +457,24 @@ void DoImportKey(scoped_ptr<ImportKeyState> passed_state) { |
| } |
| void DoExportKeyReply(scoped_ptr<ExportKeyState> state) { |
| +#ifndef WEBCRYPTO_RESULT_ACCEPTS_JSON |
| + // TODO(eroman): Remove idfef once blink rolls. |
| CompleteWithBufferOrError(state->status, state->buffer, &state->result); |
| +#else |
| + if (state->format != blink::WebCryptoKeyFormatJwk) { |
| + CompleteWithBufferOrError(state->status, state->buffer, &state->result); |
| + return; |
| + } |
| + |
| + if (state->status.IsError()) { |
| + CompleteWithError(state->status, &state->result); |
| + } else { |
| + state->result.completeWithJson( |
| + reinterpret_cast<const char*>( |
| + webcrypto::Uint8VectorStart(&state->buffer)), |
| + state->buffer.size()); |
|
Ryan Sleevi
2014/06/17 19:15:20
This feels like there's a dependent CL here (perha
|
| + } |
| +#endif |
| } |
| void DoExportKey(scoped_ptr<ExportKeyState> passed_state) { |