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

Side by Side Diff: chrome/browser/extensions/api/enterprise_certificates/enterprise_certificates_internal_api.h

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 #ifndef CHROME_BROWSER_EXTENSIONS_API_ENTERPRISE_CERTIFICATES_ENTERPRISE_CERTIFI CATES_INTERNAL_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_ENTERPRISE_CERTIFICATES_ENTERPRISE_CERTIFI CATES_INTERNAL_API_H_
7
8 #include "base/compiler_specific.h"
9 #include "chrome/browser/extensions/chrome_extension_function.h"
10 #include "chrome/common/extensions/api/enterprise_certificates_internal.h"
11
12 namespace net {
13 class NSSCertDatabase;
14 class X509Certificate;
15 typedef std::vector<scoped_refptr<X509Certificate> > CertificateList;
16 }
17
18 namespace extensions {
19
20 extern const char kTokenNameUser[];
21
22 class ECIImport : public ChromeAsyncExtensionFunction {
Ryan Sleevi 2014/04/15 00:15:04 Naming is hard, but abbreviations of uncommon bits
23 protected:
24 virtual bool RunImpl() OVERRIDE;
25
26 private:
27 void DidGetCertDB(net::NSSCertDatabase* cert_db);
28
29 DECLARE_EXTENSION_FUNCTION(
30 "enterprise.certificatesInternal.importClientCertificateAndRawKey",
31 ENTERPRISE_CERTIFICATESINTERNAL_IMPORTCLIENTCERTIFICATEANDRAWKEY);
32 };
33
34 typedef ECIImport
35 EnterpriseCertificatesInternalImportClientCertificateAndRawKeyFunction;
36
37 class ECIGetCerts : public ChromeAsyncExtensionFunction {
38 protected:
39 virtual bool RunImpl() OVERRIDE;
40
41 private:
42 void DidGetCertDB(net::NSSCertDatabase* cert_db);
43 void DidGetCerts(scoped_ptr<net::CertificateList> certs);
44
45 DECLARE_EXTENSION_FUNCTION(
46 "enterprise.certificatesInternal.getClientCertificates",
47 ENTERPRISE_CERTIFICATESINTERNAL_GETCLIENTCERTIFICATES);
48 };
49
50 typedef ECIGetCerts EnterpriseCertificatesInternalGetClientCertificatesFunction;
51
52 class ECIGetTokens : public ChromeAsyncExtensionFunction {
53 protected:
54 virtual bool RunImpl() OVERRIDE;
55
56 private:
57 DECLARE_EXTENSION_FUNCTION(
58 "enterprise.certificatesInternal.getTokens",
59 ENTERPRISE_CERTIFICATESINTERNAL_GETTOKENS);
60 };
61
62 typedef ECIGetTokens EnterpriseCertificatesInternalGetTokensFunction;
63
64 } // namespace extensions
65
66 #endif // CHROME_BROWSER_EXTENSIONS_API_ENTERPRISE_CERTIFICATES_ENTERPRISE_CERT IFICATES_INTERNAL_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698