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

Unified Diff: third_party/WebKit/Source/modules/crypto/SubtleCrypto.cpp

Issue 1773813007: blink: Rename modules/ method to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-modules: rebase-fixes Created 4 years, 9 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: third_party/WebKit/Source/modules/crypto/SubtleCrypto.cpp
diff --git a/third_party/WebKit/Source/modules/crypto/SubtleCrypto.cpp b/third_party/WebKit/Source/modules/crypto/SubtleCrypto.cpp
index 86185b5a8946fb7ccd71f72add183c372872d37a..33daf935b5ba1b197effa7d82838f642846c8eef 100644
--- a/third_party/WebKit/Source/modules/crypto/SubtleCrypto.cpp
+++ b/third_party/WebKit/Source/modules/crypto/SubtleCrypto.cpp
@@ -55,7 +55,7 @@ static bool parseAlgorithm(const AlgorithmIdentifier& raw, WebCryptoOperation op
static bool canAccessWebCrypto(ScriptState* scriptState, CryptoResult* result)
{
String errorMessage;
- if (!scriptState->executionContext()->isSecureContext(errorMessage, ExecutionContext::WebCryptoSecureContextCheck)) {
+ if (!scriptState->getExecutionContext()->isSecureContext(errorMessage, ExecutionContext::WebCryptoSecureContextCheck)) {
result->completeWithError(WebCryptoErrorTypeNotSupported, errorMessage);
return false;
}
@@ -133,7 +133,7 @@ ScriptPromise SubtleCrypto::encrypt(ScriptState* scriptState, const AlgorithmIde
if (!key->canBeUsedForAlgorithm(algorithm, WebCryptoKeyUsageEncrypt, result))
return promise;
- histogramAlgorithmAndKey(scriptState->executionContext(), algorithm, key->key());
+ histogramAlgorithmAndKey(scriptState->getExecutionContext(), algorithm, key->key());
Platform::current()->crypto()->encrypt(algorithm, key->key(), data.bytes(), data.byteLength(), result->result());
return promise;
}
@@ -153,7 +153,7 @@ ScriptPromise SubtleCrypto::decrypt(ScriptState* scriptState, const AlgorithmIde
if (!key->canBeUsedForAlgorithm(algorithm, WebCryptoKeyUsageDecrypt, result))
return promise;
- histogramAlgorithmAndKey(scriptState->executionContext(), algorithm, key->key());
+ histogramAlgorithmAndKey(scriptState->getExecutionContext(), algorithm, key->key());
Platform::current()->crypto()->decrypt(algorithm, key->key(), data.bytes(), data.byteLength(), result->result());
return promise;
}
@@ -173,7 +173,7 @@ ScriptPromise SubtleCrypto::sign(ScriptState* scriptState, const AlgorithmIdenti
if (!key->canBeUsedForAlgorithm(algorithm, WebCryptoKeyUsageSign, result))
return promise;
- histogramAlgorithmAndKey(scriptState->executionContext(), algorithm, key->key());
+ histogramAlgorithmAndKey(scriptState->getExecutionContext(), algorithm, key->key());
Platform::current()->crypto()->sign(algorithm, key->key(), data.bytes(), data.byteLength(), result->result());
return promise;
}
@@ -193,7 +193,7 @@ ScriptPromise SubtleCrypto::verifySignature(ScriptState* scriptState, const Algo
if (!key->canBeUsedForAlgorithm(algorithm, WebCryptoKeyUsageVerify, result))
return promise;
- histogramAlgorithmAndKey(scriptState->executionContext(), algorithm, key->key());
+ histogramAlgorithmAndKey(scriptState->getExecutionContext(), algorithm, key->key());
Platform::current()->crypto()->verifySignature(algorithm, key->key(), signature.bytes(), signature.byteLength(), data.bytes(), data.byteLength(), result->result());
return promise;
}
@@ -210,7 +210,7 @@ ScriptPromise SubtleCrypto::digest(ScriptState* scriptState, const AlgorithmIden
if (!parseAlgorithm(rawAlgorithm, WebCryptoOperationDigest, algorithm, result))
return promise;
- histogramAlgorithm(scriptState->executionContext(), algorithm);
+ histogramAlgorithm(scriptState->getExecutionContext(), algorithm);
Platform::current()->crypto()->digest(algorithm, data.bytes(), data.byteLength(), result->result());
return promise;
}
@@ -231,7 +231,7 @@ ScriptPromise SubtleCrypto::generateKey(ScriptState* scriptState, const Algorith
if (!parseAlgorithm(rawAlgorithm, WebCryptoOperationGenerateKey, algorithm, result))
return promise;
- histogramAlgorithm(scriptState->executionContext(), algorithm);
+ histogramAlgorithm(scriptState->getExecutionContext(), algorithm);
Platform::current()->crypto()->generateKey(algorithm, extractable, keyUsages, result->result());
return promise;
}
@@ -282,7 +282,7 @@ ScriptPromise SubtleCrypto::importKey(ScriptState* scriptState, const String& ra
ptr = reinterpret_cast<const unsigned char*>(jsonUtf8.data());
len = jsonUtf8.length();
}
- histogramAlgorithm(scriptState->executionContext(), algorithm);
+ histogramAlgorithm(scriptState->getExecutionContext(), algorithm);
Platform::current()->crypto()->importKey(format, ptr, len, algorithm, extractable, keyUsages, result->result());
return promise;
}
@@ -304,7 +304,7 @@ ScriptPromise SubtleCrypto::exportKey(ScriptState* scriptState, const String& ra
return promise;
}
- histogramKey(scriptState->executionContext(), key->key());
+ histogramKey(scriptState->getExecutionContext(), key->key());
Platform::current()->crypto()->exportKey(format, key->key(), result->result());
return promise;
}
@@ -333,8 +333,8 @@ ScriptPromise SubtleCrypto::wrapKey(ScriptState* scriptState, const String& rawF
if (!wrappingKey->canBeUsedForAlgorithm(wrapAlgorithm, WebCryptoKeyUsageWrapKey, result))
return promise;
- histogramAlgorithmAndKey(scriptState->executionContext(), wrapAlgorithm, wrappingKey->key());
- histogramKey(scriptState->executionContext(), key->key());
+ histogramAlgorithmAndKey(scriptState->getExecutionContext(), wrapAlgorithm, wrappingKey->key());
+ histogramKey(scriptState->getExecutionContext(), key->key());
Platform::current()->crypto()->wrapKey(format, key->key(), wrappingKey->key(), wrapAlgorithm, result->result());
return promise;
}
@@ -366,8 +366,8 @@ ScriptPromise SubtleCrypto::unwrapKey(ScriptState* scriptState, const String& ra
if (!unwrappingKey->canBeUsedForAlgorithm(unwrapAlgorithm, WebCryptoKeyUsageUnwrapKey, result))
return promise;
- histogramAlgorithmAndKey(scriptState->executionContext(), unwrapAlgorithm, unwrappingKey->key());
- histogramAlgorithm(scriptState->executionContext(), unwrappedKeyAlgorithm);
+ histogramAlgorithmAndKey(scriptState->getExecutionContext(), unwrapAlgorithm, unwrappingKey->key());
+ histogramAlgorithm(scriptState->getExecutionContext(), unwrappedKeyAlgorithm);
Platform::current()->crypto()->unwrapKey(format, wrappedKey.bytes(), wrappedKey.byteLength(), unwrappingKey->key(), unwrapAlgorithm, unwrappedKeyAlgorithm, extractable, keyUsages, result->result());
return promise;
}
@@ -387,7 +387,7 @@ ScriptPromise SubtleCrypto::deriveBits(ScriptState* scriptState, const Algorithm
if (!baseKey->canBeUsedForAlgorithm(algorithm, WebCryptoKeyUsageDeriveBits, result))
return promise;
- histogramAlgorithmAndKey(scriptState->executionContext(), algorithm, baseKey->key());
+ histogramAlgorithmAndKey(scriptState->getExecutionContext(), algorithm, baseKey->key());
Platform::current()->crypto()->deriveBits(algorithm, baseKey->key(), lengthBits, result->result());
return promise;
}
@@ -419,8 +419,8 @@ ScriptPromise SubtleCrypto::deriveKey(ScriptState* scriptState, const AlgorithmI
if (!parseAlgorithm(rawDerivedKeyType, WebCryptoOperationGetKeyLength, keyLengthAlgorithm, result))
return promise;
- histogramAlgorithmAndKey(scriptState->executionContext(), algorithm, baseKey->key());
- histogramAlgorithm(scriptState->executionContext(), importAlgorithm);
+ histogramAlgorithmAndKey(scriptState->getExecutionContext(), algorithm, baseKey->key());
+ histogramAlgorithm(scriptState->getExecutionContext(), importAlgorithm);
Platform::current()->crypto()->deriveKey(algorithm, baseKey->key(), importAlgorithm, keyLengthAlgorithm, extractable, keyUsages, result->result());
return promise;
}

Powered by Google App Engine
This is Rietveld 408576698