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

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

Issue 534133002: [WIP] bindings: Introduce PropertyBag (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « Source/modules/crypto/CryptoResultImpl.cpp ('k') | Source/modules/crypto/SubtleCrypto.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/crypto/NormalizeAlgorithm.cpp
diff --git a/Source/modules/crypto/NormalizeAlgorithm.cpp b/Source/modules/crypto/NormalizeAlgorithm.cpp
index d439fa251f928102eb9c65fba5152b0e7f69b017..89b7b06423850d4c6ab40ac58949a20bf6f08793 100644
--- a/Source/modules/crypto/NormalizeAlgorithm.cpp
+++ b/Source/modules/crypto/NormalizeAlgorithm.cpp
@@ -269,7 +269,7 @@ private:
// FIXME: Currently only supports ArrayBufferView.
bool getOptionalCryptoOperationData(const Dictionary& raw, const char* propertyName, bool& hasProperty, RefPtr<ArrayBufferView>& buffer, const ErrorContext& context, AlgorithmError* error)
{
- if (!DictionaryHelper::get(raw, propertyName, buffer)) {
+ if (!raw.get(propertyName, buffer)) {
hasProperty = false;
return true;
}
@@ -302,7 +302,7 @@ bool getCryptoOperationData(const Dictionary& raw, const char* propertyName, Ref
bool getUint8Array(const Dictionary& raw, const char* propertyName, RefPtr<Uint8Array>& array, const ErrorContext& context, AlgorithmError* error)
{
- if (!DictionaryHelper::get(raw, propertyName, array) || !array) {
+ if (!raw.get(propertyName, array) || !array) {
setSyntaxError(context.toString(propertyName, "Missing or not a Uint8Array"), error);
return false;
}
@@ -322,7 +322,7 @@ bool getBigInteger(const Dictionary& raw, const char* propertyName, RefPtr<Uint8
return false;
}
- if (!DictionaryHelper::get(raw, propertyName, array) || !array) {
+ if (!raw.get(propertyName, array) || !array) {
setSyntaxError(context.toString(propertyName, "Missing or not a Uint8Array"), error);
return false;
}
@@ -333,7 +333,7 @@ bool getBigInteger(const Dictionary& raw, const char* propertyName, RefPtr<Uint8
bool getOptionalInteger(const Dictionary& raw, const char* propertyName, bool& hasProperty, double& value, double minValue, double maxValue, const ErrorContext& context, AlgorithmError* error)
{
double number;
- bool ok = DictionaryHelper::get(raw, propertyName, number, hasProperty);
+ bool ok = raw.get(propertyName, number, hasProperty);
if (!hasProperty)
return true;
@@ -445,7 +445,7 @@ bool parseAlgorithm(const Dictionary&, WebCryptoOperation, WebCryptoAlgorithm&,
bool parseHash(const Dictionary& raw, WebCryptoAlgorithm& hash, ErrorContext context, AlgorithmError* error)
{
Dictionary rawHash;
- if (!DictionaryHelper::get(raw, "hash", rawHash)) {
+ if (!raw.get("hash", rawHash)) {
setSyntaxError(context.toString("hash", "Missing or not a dictionary"), error);
return false;
}
@@ -685,7 +685,7 @@ bool parseAlgorithm(const Dictionary& raw, WebCryptoOperation op, WebCryptoAlgor
}
String algorithmName;
- if (!DictionaryHelper::get(raw, "name", algorithmName)) {
+ if (!raw.get("name", algorithmName)) {
setSyntaxError(context.toString("name", "Missing or not a string"), error);
return false;
}
« no previous file with comments | « Source/modules/crypto/CryptoResultImpl.cpp ('k') | Source/modules/crypto/SubtleCrypto.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698