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

Side by Side Diff: chrome/renderer/resources/extensions/enterprise_certificates_internal_custom_bindings.js

Issue 214863002: Extension API enterprise.platformKeys. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed to OO-style API with Token object. Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698