| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 BLINK_PLATFORM_EXPORT void completeWithBoolean(bool); | 88 BLINK_PLATFORM_EXPORT void completeWithBoolean(bool); |
| 89 BLINK_PLATFORM_EXPORT void completeWithKey(const WebCryptoKey&); | 89 BLINK_PLATFORM_EXPORT void completeWithKey(const WebCryptoKey&); |
| 90 BLINK_PLATFORM_EXPORT void completeWithKeyPair(const WebCryptoKey& publicKey
, const WebCryptoKey& privateKey); | 90 BLINK_PLATFORM_EXPORT void completeWithKeyPair(const WebCryptoKey& publicKey
, const WebCryptoKey& privateKey); |
| 91 | 91 |
| 92 // Returns true if the underlying operation was cancelled. | 92 // Returns true if the underlying operation was cancelled. |
| 93 // This method can be called from any thread. | 93 // This method can be called from any thread. |
| 94 BLINK_PLATFORM_EXPORT bool cancelled() const; | 94 BLINK_PLATFORM_EXPORT bool cancelled() const; |
| 95 | 95 |
| 96 #if INSIDE_BLINK | 96 #if INSIDE_BLINK |
| 97 BLINK_PLATFORM_EXPORT explicit WebCryptoResult(const PassRefPtrWillBeRawPtr<
CryptoResult>&); | 97 BLINK_PLATFORM_EXPORT explicit WebCryptoResult(const PassRefPtrWillBeRawPtr<
CryptoResult>&); |
| 98 |
| 99 BLINK_PLATFORM_EXPORT void clear(); |
| 98 #endif | 100 #endif |
| 99 | 101 |
| 100 private: | 102 private: |
| 101 BLINK_PLATFORM_EXPORT void reset(); | 103 BLINK_PLATFORM_EXPORT void reset(); |
| 102 BLINK_PLATFORM_EXPORT void assign(const WebCryptoResult&); | 104 BLINK_PLATFORM_EXPORT void assign(const WebCryptoResult&); |
| 103 | 105 |
| 106 int m_cancelled; |
| 107 |
| 104 WebPrivatePtr<CryptoResult> m_impl; | 108 WebPrivatePtr<CryptoResult> m_impl; |
| 105 }; | 109 }; |
| 106 | 110 |
| 107 class WebCryptoDigestor { | 111 class WebCryptoDigestor { |
| 108 public: | 112 public: |
| 109 virtual ~WebCryptoDigestor() { } | 113 virtual ~WebCryptoDigestor() { } |
| 110 | 114 |
| 111 // consume() will return |true| on the successful addition of data to the | 115 // consume() will return |true| on the successful addition of data to the |
| 112 // partially generated digest. It will return |false| when that fails. After | 116 // partially generated digest. It will return |false| when that fails. After |
| 113 // a return of |false|, consume() should not be called again (nor should | 117 // a return of |false|, consume() should not be called again (nor should |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 // Returns true on success. | 270 // Returns true on success. |
| 267 virtual bool serializeKeyForClone(const WebCryptoKey&, WebVector<unsigned ch
ar>&) { return false; } | 271 virtual bool serializeKeyForClone(const WebCryptoKey&, WebVector<unsigned ch
ar>&) { return false; } |
| 268 | 272 |
| 269 protected: | 273 protected: |
| 270 virtual ~WebCrypto() { } | 274 virtual ~WebCrypto() { } |
| 271 }; | 275 }; |
| 272 | 276 |
| 273 } // namespace blink | 277 } // namespace blink |
| 274 | 278 |
| 275 #endif // WebCrypto_h | 279 #endif // WebCrypto_h |
| OLD | NEW |