OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_CHILD_WEBCRYPTO_STATUS_H_ | 5 #ifndef CONTENT_CHILD_WEBCRYPTO_STATUS_H_ |
6 #define CONTENT_CHILD_WEBCRYPTO_STATUS_H_ | 6 #define CONTENT_CHILD_WEBCRYPTO_STATUS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "third_party/WebKit/public/platform/WebCrypto.h" | 10 #include "third_party/WebKit/public/platform/WebCrypto.h" |
11 | 11 |
12 #if !defined(WEBCRYPTO_HAS_ERROR_TYPE) | |
13 | |
14 // TODO(eroman): Delete once Blink changes have rolled into Chromium. | |
15 namespace blink { | |
16 | |
17 enum WebCryptoErrorType { | |
18 WebCryptoErrorTypeType, | |
19 WebCryptoErrorTypeNotSupported, | |
20 WebCryptoErrorTypeSyntax, | |
21 WebCryptoErrorTypeInvalidState, | |
22 WebCryptoErrorTypeInvalidAccess, | |
23 WebCryptoErrorTypeUnknown, | |
24 WebCryptoErrorTypeData, | |
25 WebCryptoErrorTypeOperation, | |
26 }; | |
27 | |
28 } // namespace blink | |
29 | |
30 #endif | |
31 | |
32 namespace content { | 12 namespace content { |
33 | 13 |
34 namespace webcrypto { | 14 namespace webcrypto { |
35 | 15 |
36 // Status indicates whether an operation completed successfully, or with an | 16 // Status indicates whether an operation completed successfully, or with an |
37 // error. The error is used for verification in unit-tests, as well as for | 17 // error. The error is used for verification in unit-tests, as well as for |
38 // display to the user. | 18 // display to the user. |
39 // | 19 // |
40 // As such, it is important that errors DO NOT reveal any sensitive material | 20 // As such, it is important that errors DO NOT reveal any sensitive material |
41 // (like key bytes). | 21 // (like key bytes). |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 Type type_; | 199 Type type_; |
220 blink::WebCryptoErrorType error_type_; | 200 blink::WebCryptoErrorType error_type_; |
221 std::string error_details_; | 201 std::string error_details_; |
222 }; | 202 }; |
223 | 203 |
224 } // namespace webcrypto | 204 } // namespace webcrypto |
225 | 205 |
226 } // namespace content | 206 } // namespace content |
227 | 207 |
228 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ | 208 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ |
OLD | NEW |