| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/renderer/extensions/platform_keys_natives.h" | 5 #include "chrome/renderer/extensions/platform_keys_natives.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 v8::Local<v8::Object>::Cast(call_info[0]), operation, &exception_code, | 118 v8::Local<v8::Object>::Cast(call_info[0]), operation, &exception_code, |
| 119 &error_details, call_info.GetIsolate()); | 119 &error_details, call_info.GetIsolate()); |
| 120 | 120 |
| 121 std::unique_ptr<base::DictionaryValue> algorithm_dict; | 121 std::unique_ptr<base::DictionaryValue> algorithm_dict; |
| 122 if (!algorithm.IsNull()) | 122 if (!algorithm.IsNull()) |
| 123 algorithm_dict = WebCryptoAlgorithmToBaseValue(algorithm); | 123 algorithm_dict = WebCryptoAlgorithmToBaseValue(algorithm); |
| 124 | 124 |
| 125 if (!algorithm_dict) | 125 if (!algorithm_dict) |
| 126 return; | 126 return; |
| 127 | 127 |
| 128 std::unique_ptr<content::V8ValueConverter> converter( | 128 call_info.GetReturnValue().Set(content::V8ValueConverter::Create()->ToV8Value( |
| 129 content::V8ValueConverter::create()); | 129 algorithm_dict.get(), context()->v8_context())); |
| 130 call_info.GetReturnValue().Set( | |
| 131 converter->ToV8Value(algorithm_dict.get(), context()->v8_context())); | |
| 132 } | 130 } |
| 133 | 131 |
| 134 } // namespace extensions | 132 } // namespace extensions |
| OLD | NEW |