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 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
261 blink::WebCryptoErrorTypeData, | 261 blink::WebCryptoErrorTypeData, |
262 "The optional HMAC key length must be shorter than the key data, and by " | 262 "The optional HMAC key length must be shorter than the key data, and by " |
263 "no more than 7 bits."); | 263 "no more than 7 bits."); |
264 } | 264 } |
265 | 265 |
266 Status Status::ErrorCreateKeyBadUsages() { | 266 Status Status::ErrorCreateKeyBadUsages() { |
267 return Status(blink::WebCryptoErrorTypeSyntax, | 267 return Status(blink::WebCryptoErrorTypeSyntax, |
268 "Cannot create a key using the specified key usages."); | 268 "Cannot create a key using the specified key usages."); |
269 } | 269 } |
270 | 270 |
271 Status Status::ErrorCreateKeyEmptyUsages() { | 271 Status Status::ErrorKeyEmptyUsages() { |
eroman
2014/12/16 01:26:45
Several issues here:
(1) The header was not upda
Habib Virji
2014/12/16 09:59:42
I have updated header and removed new function pre
| |
272 return Status(blink::WebCryptoErrorTypeSyntax, | 272 return Status(blink::WebCryptoErrorTypeSyntax, |
273 "Usages cannot be empty when creating a key."); | 273 "Usages cannot be empty for creating or importing keys."); |
274 } | 274 } |
275 | 275 |
276 Status Status::ErrorImportedEcKeyIncorrectCurve() { | 276 Status Status::ErrorImportedEcKeyIncorrectCurve() { |
277 return Status( | 277 return Status( |
278 blink::WebCryptoErrorTypeData, | 278 blink::WebCryptoErrorTypeData, |
279 "The imported EC key specifies a different curve than requested"); | 279 "The imported EC key specifies a different curve than requested"); |
280 } | 280 } |
281 | 281 |
282 Status Status::ErrorJwkIncorrectCrv() { | 282 Status Status::ErrorJwkIncorrectCrv() { |
283 return Status( | 283 return Status( |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
333 error_type_(error_type), | 333 error_type_(error_type), |
334 error_details_(error_details_utf8) { | 334 error_details_(error_details_utf8) { |
335 } | 335 } |
336 | 336 |
337 Status::Status(Type type) : type_(type) { | 337 Status::Status(Type type) : type_(type) { |
338 } | 338 } |
339 | 339 |
340 } // namespace webcrypto | 340 } // namespace webcrypto |
341 | 341 |
342 } // namespace content | 342 } // namespace content |
OLD | NEW |