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

Unified Diff: content/child/webcrypto/status.cc

Issue 689883002: Throw a SyntaxError when importing keys with invalid usages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: content/child/webcrypto/status.cc
diff --git a/content/child/webcrypto/status.cc b/content/child/webcrypto/status.cc
index d1ceffc5762bcf1391eaed65206aa2bc09e7293a..fe0f6a7d2462286e0ae77999c2605e48b64200d9 100644
--- a/content/child/webcrypto/status.cc
+++ b/content/child/webcrypto/status.cc
@@ -238,11 +238,15 @@ Status Status::ErrorGenerateKeyLength() {
"bits");
}
-Status Status::ErrorCreateKeyBadUsages() {
- return Status(blink::WebCryptoErrorTypeData,
- "Cannot create a key using the specified key usages.");
+Status Status::SyntaxError() {
+ return Status(blink::WebCryptoErrorTypeSyntax,
eroman 2014/10/30 19:03:30 The formatting is not correct. Run "git cl format"
+ "");
}
+Status Status::SyntaxError(const std::string& parameter) {
+ return Status(blink::WebCryptoErrorTypeSyntax,
+ "Parameter '" +parameter + "' was missing or out-of-range.");
eroman 2014/10/30 19:03:30 The formatting is incorrect. Run "git cl format" t
+}
Status::Status(blink::WebCryptoErrorType error_type,
const std::string& error_details_utf8)
: type_(TYPE_ERROR),

Powered by Google App Engine
This is Rietveld 408576698