Index: chrome/renderer/extensions/platform_keys_natives.cc |
diff --git a/chrome/renderer/extensions/platform_keys_natives.cc b/chrome/renderer/extensions/platform_keys_natives.cc |
index 186f297ab61af069812f701d0a4ef8a2a6dbeb7c..5e4b770dadc8fa2c02b7f8517ca0f0c03f33f011 100644 |
--- a/chrome/renderer/extensions/platform_keys_natives.cc |
+++ b/chrome/renderer/extensions/platform_keys_natives.cc |
@@ -25,10 +25,6 @@ bool StringToWebCryptoOperation(const std::string& str, |
*op = blink::WebCryptoOperationGenerateKey; |
return true; |
} |
- if (str == "ImportKey") { |
- *op = blink::WebCryptoOperationImportKey; |
- return true; |
- } |
if (str == "Sign") { |
*op = blink::WebCryptoOperationSign; |
return true; |
@@ -48,9 +44,6 @@ scoped_ptr<base::DictionaryValue> WebCryptoAlgorithmToBaseValue( |
const blink::WebCryptoAlgorithmInfo* info = |
blink::WebCryptoAlgorithm::lookupAlgorithmInfo(algorithm.id()); |
dict->SetStringWithoutPathExpansion("name", info->name); |
- |
- const blink::WebCryptoAlgorithm* hash = nullptr; |
- |
const blink::WebCryptoRsaHashedKeyGenParams* rsaHashedKeyGen = |
algorithm.rsaHashedKeyGenParams(); |
if (rsaHashedKeyGen) { |
@@ -64,20 +57,10 @@ scoped_ptr<base::DictionaryValue> WebCryptoAlgorithmToBaseValue( |
reinterpret_cast<const char*>(public_exponent.data()), |
public_exponent.size())); |
- hash = &rsaHashedKeyGen->hash(); |
- DCHECK(!hash->isNull()); |
- } |
- |
- const blink::WebCryptoRsaHashedImportParams* rsaHashedImport = |
- algorithm.rsaHashedImportParams(); |
- if (rsaHashedImport) { |
- hash = &rsaHashedImport->hash(); |
- DCHECK(!hash->isNull()); |
- } |
- |
- if (hash) { |
+ const blink::WebCryptoAlgorithm& hash = rsaHashedKeyGen->hash(); |
+ DCHECK(!hash.isNull()); |
const blink::WebCryptoAlgorithmInfo* hash_info = |
- blink::WebCryptoAlgorithm::lookupAlgorithmInfo(hash->id()); |
+ blink::WebCryptoAlgorithm::lookupAlgorithmInfo(hash.id()); |
scoped_ptr<base::DictionaryValue> hash_dict(new base::DictionaryValue); |
hash_dict->SetStringWithoutPathExpansion("name", hash_info->name); |