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 #include "content/child/webcrypto/status.h" | 5 #include "content/child/webcrypto/status.h" |
6 | 6 |
7 namespace content { | 7 namespace content { |
8 | 8 |
9 namespace webcrypto { | 9 namespace webcrypto { |
10 | 10 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 return Status(blink::WebCryptoErrorTypeData, | 109 return Status(blink::WebCryptoErrorTypeData, |
110 "The JWK \"" + property + "\" property was empty."); | 110 "The JWK \"" + property + "\" property was empty."); |
111 } | 111 } |
112 | 112 |
113 Status Status::ErrorJwkBigIntegerHasLeadingZero(const std::string& property) { | 113 Status Status::ErrorJwkBigIntegerHasLeadingZero(const std::string& property) { |
114 return Status( | 114 return Status( |
115 blink::WebCryptoErrorTypeData, | 115 blink::WebCryptoErrorTypeData, |
116 "The JWK \"" + property + "\" property contained a leading zero."); | 116 "The JWK \"" + property + "\" property contained a leading zero."); |
117 } | 117 } |
118 | 118 |
| 119 Status Status::ErrorJwkDuplicateKeyOps() { |
| 120 return Status(blink::WebCryptoErrorTypeData, |
| 121 "The \"key_ops\" property of the JWK dictionary contains " |
| 122 "duplicate usages."); |
| 123 } |
| 124 |
119 Status Status::ErrorImportEmptyKeyData() { | 125 Status Status::ErrorImportEmptyKeyData() { |
120 return Status(blink::WebCryptoErrorTypeData, "No key data was provided"); | 126 return Status(blink::WebCryptoErrorTypeData, "No key data was provided"); |
121 } | 127 } |
122 | 128 |
123 Status Status::ErrorUnsupportedImportKeyFormat() { | 129 Status Status::ErrorUnsupportedImportKeyFormat() { |
124 return Status(blink::WebCryptoErrorTypeNotSupported, | 130 return Status(blink::WebCryptoErrorTypeNotSupported, |
125 "Unsupported import key format for algorithm"); | 131 "Unsupported import key format for algorithm"); |
126 } | 132 } |
127 | 133 |
128 Status Status::ErrorUnsupportedExportKeyFormat() { | 134 Status Status::ErrorUnsupportedExportKeyFormat() { |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 error_type_(error_type), | 249 error_type_(error_type), |
244 error_details_(error_details_utf8) { | 250 error_details_(error_details_utf8) { |
245 } | 251 } |
246 | 252 |
247 Status::Status(Type type) : type_(type) { | 253 Status::Status(Type type) : type_(type) { |
248 } | 254 } |
249 | 255 |
250 } // namespace webcrypto | 256 } // namespace webcrypto |
251 | 257 |
252 } // namespace content | 258 } // namespace content |
OLD | NEW |