Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: content/child/webcrypto/status.cc

Issue 751883002: Revert of Check that usage isn't empty when generateKey() is called (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/child/webcrypto/status.h ('k') | content/child/webcrypto/test/aes_cbc_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 return Status(blink::WebCryptoErrorTypeData, 245 return Status(blink::WebCryptoErrorTypeData,
246 "Invalid key length: it is either zero or not a multiple of 8 " 246 "Invalid key length: it is either zero or not a multiple of 8 "
247 "bits"); 247 "bits");
248 } 248 }
249 249
250 Status Status::ErrorCreateKeyBadUsages() { 250 Status Status::ErrorCreateKeyBadUsages() {
251 return Status(blink::WebCryptoErrorTypeSyntax, 251 return Status(blink::WebCryptoErrorTypeSyntax,
252 "Cannot create a key using the specified key usages."); 252 "Cannot create a key using the specified key usages.");
253 } 253 }
254 254
255 Status Status::ErrorCreateKeyEmptyUsages() {
256 return Status(blink::WebCryptoErrorTypeSyntax,
257 "Usages cannot be empty when creating a key.");
258 }
259
260 Status Status::ErrorImportedEcKeyIncorrectCurve() { 255 Status Status::ErrorImportedEcKeyIncorrectCurve() {
261 return Status( 256 return Status(
262 blink::WebCryptoErrorTypeData, 257 blink::WebCryptoErrorTypeData,
263 "The imported EC key specifies a different curve than requested"); 258 "The imported EC key specifies a different curve than requested");
264 } 259 }
265 260
266 Status Status::ErrorJwkIncorrectCrv() { 261 Status Status::ErrorJwkIncorrectCrv() {
267 return Status( 262 return Status(
268 blink::WebCryptoErrorTypeData, 263 blink::WebCryptoErrorTypeData,
269 "The JWK's \"crv\" member specifies a different curve than requested"); 264 "The JWK's \"crv\" member specifies a different curve than requested");
(...skipping 21 matching lines...) Expand all
291 error_type_(error_type), 286 error_type_(error_type),
292 error_details_(error_details_utf8) { 287 error_details_(error_details_utf8) {
293 } 288 }
294 289
295 Status::Status(Type type) : type_(type) { 290 Status::Status(Type type) : type_(type) {
296 } 291 }
297 292
298 } // namespace webcrypto 293 } // namespace webcrypto
299 294
300 } // namespace content 295 } // namespace content
OLDNEW
« no previous file with comments | « content/child/webcrypto/status.h ('k') | content/child/webcrypto/test/aes_cbc_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698