OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Custom binding for the enterprise.certificatesInternal API. |
| 6 |
| 7 var binding = |
| 8 require('binding').Binding.create('enterprise.certificatesInternal'); |
| 9 var importNative = |
| 10 requireNative('enterprise_certificates_natives').ImportNative; |
| 11 var sendRequest = require('sendRequest').sendRequest; |
| 12 |
| 13 binding.registerCustomHook(function(api) { |
| 14 var apiFunctions = api.apiFunctions; |
| 15 |
| 16 apiFunctions.setHandleRequest('importClientCertificateAndWebCryptoKey', |
| 17 function(key, cert, tokenName, callback) { |
| 18 sendRequest('' /* functionName unused */, |
| 19 [key, cert, tokenName, callback], |
| 20 this.definition.parameters, |
| 21 {nativeFunction: importNative}); |
| 22 }); |
| 23 }); |
| 24 |
| 25 exports.binding = binding.generate(); |
OLD | NEW |