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

Unified Diff: Source/modules/crypto/Key.cpp

Issue 72363002: Rename es => exceptionState in other than bindings/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Retry Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/crypto/Crypto.cpp ('k') | Source/modules/crypto/NormalizeAlgorithm.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/crypto/Key.cpp
diff --git a/Source/modules/crypto/Key.cpp b/Source/modules/crypto/Key.cpp
index e8080950df1cca5104422095cbd392f226f89359..e4e00e6b5a4cbb8aa0119aeefa9c0b68b12c5db6 100644
--- a/Source/modules/crypto/Key.cpp
+++ b/Source/modules/crypto/Key.cpp
@@ -175,15 +175,15 @@ Vector<String> Key::usages() const
return result;
}
-bool Key::canBeUsedForAlgorithm(const blink::WebCryptoAlgorithm& algorithm, AlgorithmOperation op, ExceptionState& es) const
+bool Key::canBeUsedForAlgorithm(const blink::WebCryptoAlgorithm& algorithm, AlgorithmOperation op, ExceptionState& exceptionState) const
{
if (!(m_key.usages() & toKeyUsage(op))) {
- es.throwDOMException(NotSupportedError, "key.usages does not permit this operation");
+ exceptionState.throwDOMException(NotSupportedError, "key.usages does not permit this operation");
return false;
}
if (m_key.algorithm().id() != algorithm.id()) {
- es.throwDOMException(NotSupportedError, "key.algorithm does not match that of operation");
+ exceptionState.throwDOMException(NotSupportedError, "key.algorithm does not match that of operation");
return false;
}
@@ -194,7 +194,7 @@ bool Key::canBeUsedForAlgorithm(const blink::WebCryptoAlgorithm& algorithm, Algo
blink::WebCryptoAlgorithmId keyHash;
blink::WebCryptoAlgorithmId algorithmHash;
if (!getHmacHashId(m_key.algorithm(), keyHash) || !getHmacHashId(algorithm, algorithmHash) || keyHash != algorithmHash) {
- es.throwDOMException(NotSupportedError, "key.algorithm does not match that of operation (HMAC's hash differs)");
+ exceptionState.throwDOMException(NotSupportedError, "key.algorithm does not match that of operation (HMAC's hash differs)");
return false;
}
}
@@ -202,7 +202,7 @@ bool Key::canBeUsedForAlgorithm(const blink::WebCryptoAlgorithm& algorithm, Algo
return true;
}
-bool Key::parseFormat(const String& formatString, blink::WebCryptoKeyFormat& format, ExceptionState& es)
+bool Key::parseFormat(const String& formatString, blink::WebCryptoKeyFormat& format, ExceptionState& exceptionState)
{
// There are few enough values that testing serially is fast enough.
if (formatString == "raw") {
@@ -222,17 +222,17 @@ bool Key::parseFormat(const String& formatString, blink::WebCryptoKeyFormat& for
return true;
}
- es.throwTypeError("Invalid keyFormat argument");
+ exceptionState.throwTypeError("Invalid keyFormat argument");
return false;
}
-bool Key::parseUsageMask(const Vector<String>& usages, blink::WebCryptoKeyUsageMask& mask, ExceptionState& es)
+bool Key::parseUsageMask(const Vector<String>& usages, blink::WebCryptoKeyUsageMask& mask, ExceptionState& exceptionState)
{
mask = 0;
for (size_t i = 0; i < usages.size(); ++i) {
blink::WebCryptoKeyUsageMask usage = keyUsageStringToMask(usages[i]);
if (!usage) {
- es.throwTypeError("Invalid keyUsages argument");
+ exceptionState.throwTypeError("Invalid keyUsages argument");
return false;
}
mask |= usage;
« no previous file with comments | « Source/modules/crypto/Crypto.cpp ('k') | Source/modules/crypto/NormalizeAlgorithm.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698