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

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

Issue 61773005: Rename WebKit namespace to blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/RsaSsaParams.cpp ('k') | Source/modules/device_orientation/DeviceMotionData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/crypto/SubtleCrypto.cpp
diff --git a/Source/modules/crypto/SubtleCrypto.cpp b/Source/modules/crypto/SubtleCrypto.cpp
index 31fad71e1b318ac426a3f4d0ba406b08b96bfc91..8c4018e6e48ddd3b58c296ef61d08b71a2dd0675 100644
--- a/Source/modules/crypto/SubtleCrypto.cpp
+++ b/Source/modules/crypto/SubtleCrypto.cpp
@@ -68,7 +68,7 @@ ScriptPromise startCryptoOperation(const Dictionary& rawAlgorithm, Key* key, Alg
return ScriptPromise();
}
- WebKit::WebCryptoAlgorithm algorithm;
+ blink::WebCryptoAlgorithm algorithm;
if (!normalizeAlgorithm(rawAlgorithm, operationType, algorithm, es))
return ScriptPromise();
@@ -83,19 +83,19 @@ ScriptPromise startCryptoOperation(const Dictionary& rawAlgorithm, Key* key, Alg
switch (operationType) {
case Encrypt:
- WebKit::Platform::current()->crypto()->encrypt(algorithm, key->key(), data, dataSize, result->result());
+ blink::Platform::current()->crypto()->encrypt(algorithm, key->key(), data, dataSize, result->result());
break;
case Decrypt:
- WebKit::Platform::current()->crypto()->decrypt(algorithm, key->key(), data, dataSize, result->result());
+ blink::Platform::current()->crypto()->decrypt(algorithm, key->key(), data, dataSize, result->result());
break;
case Sign:
- WebKit::Platform::current()->crypto()->sign(algorithm, key->key(), data, dataSize, result->result());
+ blink::Platform::current()->crypto()->sign(algorithm, key->key(), data, dataSize, result->result());
break;
case Verify:
- WebKit::Platform::current()->crypto()->verifySignature(algorithm, key->key(), reinterpret_cast<const unsigned char*>(signature->baseAddress()), signature->byteLength(), data, dataSize, result->result());
+ blink::Platform::current()->crypto()->verifySignature(algorithm, key->key(), reinterpret_cast<const unsigned char*>(signature->baseAddress()), signature->byteLength(), data, dataSize, result->result());
break;
case Digest:
- WebKit::Platform::current()->crypto()->digest(algorithm, data, dataSize, result->result());
+ blink::Platform::current()->crypto()->digest(algorithm, data, dataSize, result->result());
break;
default:
ASSERT_NOT_REACHED();
@@ -139,23 +139,23 @@ ScriptPromise SubtleCrypto::digest(const Dictionary& rawAlgorithm, ArrayBufferVi
ScriptPromise SubtleCrypto::generateKey(const Dictionary& rawAlgorithm, bool extractable, const Vector<String>& rawKeyUsages, ExceptionState& es)
{
- WebKit::WebCryptoKeyUsageMask keyUsages;
+ blink::WebCryptoKeyUsageMask keyUsages;
if (!Key::parseUsageMask(rawKeyUsages, keyUsages, es))
return ScriptPromise();
- WebKit::WebCryptoAlgorithm algorithm;
+ blink::WebCryptoAlgorithm algorithm;
if (!normalizeAlgorithm(rawAlgorithm, GenerateKey, algorithm, es))
return ScriptPromise();
ScriptPromise promise = ScriptPromise::createPending();
RefPtr<CryptoResultImpl> result = CryptoResultImpl::create(promise);
- WebKit::Platform::current()->crypto()->generateKey(algorithm, extractable, keyUsages, result->result());
+ blink::Platform::current()->crypto()->generateKey(algorithm, extractable, keyUsages, result->result());
return promise;
}
ScriptPromise SubtleCrypto::importKey(const String& rawFormat, ArrayBufferView* keyData, const Dictionary& rawAlgorithm, bool extractable, const Vector<String>& rawKeyUsages, ExceptionState& es)
{
- WebKit::WebCryptoKeyFormat format;
+ blink::WebCryptoKeyFormat format;
if (!Key::parseFormat(rawFormat, format, es))
return ScriptPromise();
@@ -164,12 +164,12 @@ ScriptPromise SubtleCrypto::importKey(const String& rawFormat, ArrayBufferView*
return ScriptPromise();
}
- WebKit::WebCryptoKeyUsageMask keyUsages;
+ blink::WebCryptoKeyUsageMask keyUsages;
if (!Key::parseUsageMask(rawKeyUsages, keyUsages, es))
return ScriptPromise();
// The algorithm is optional.
- WebKit::WebCryptoAlgorithm algorithm;
+ blink::WebCryptoAlgorithm algorithm;
if (!rawAlgorithm.isUndefinedOrNull() && !normalizeAlgorithm(rawAlgorithm, ImportKey, algorithm, es))
return ScriptPromise();
@@ -177,13 +177,13 @@ ScriptPromise SubtleCrypto::importKey(const String& rawFormat, ArrayBufferView*
ScriptPromise promise = ScriptPromise::createPending();
RefPtr<CryptoResultImpl> result = CryptoResultImpl::create(promise);
- WebKit::Platform::current()->crypto()->importKey(format, keyDataBytes, keyData->byteLength(), algorithm, extractable, keyUsages, result->result());
+ blink::Platform::current()->crypto()->importKey(format, keyDataBytes, keyData->byteLength(), algorithm, extractable, keyUsages, result->result());
return promise;
}
ScriptPromise SubtleCrypto::exportKey(const String& rawFormat, Key* key, ExceptionState& es)
{
- WebKit::WebCryptoKeyFormat format;
+ blink::WebCryptoKeyFormat format;
if (!Key::parseFormat(rawFormat, format, es))
return ScriptPromise();
@@ -199,7 +199,7 @@ ScriptPromise SubtleCrypto::exportKey(const String& rawFormat, Key* key, Excepti
ScriptPromise promise = ScriptPromise::createPending();
RefPtr<CryptoResultImpl> result = CryptoResultImpl::create(promise);
- WebKit::Platform::current()->crypto()->exportKey(format, key->key(), result->result());
+ blink::Platform::current()->crypto()->exportKey(format, key->key(), result->result());
return promise;
}
« no previous file with comments | « Source/modules/crypto/RsaSsaParams.cpp ('k') | Source/modules/device_orientation/DeviceMotionData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698