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

Unified Diff: chrome/browser/extensions/api/platform_keys/platform_keys_api.h

Issue 875373002: First implementation of chrome.platformKeys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cert_idl
Patch Set: Fix .gn file. Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/platform_keys/platform_keys_api.h
diff --git a/chrome/browser/extensions/api/platform_keys/platform_keys_api.h b/chrome/browser/extensions/api/platform_keys/platform_keys_api.h
index def650cba6c03fabc13a0eb5b9ec75a785c50017..a423e9df5cb59ff0282a7fa70c02cd9d24d0eb19 100644
--- a/chrome/browser/extensions/api/platform_keys/platform_keys_api.h
+++ b/chrome/browser/extensions/api/platform_keys/platform_keys_api.h
@@ -6,9 +6,15 @@
#define CHROME_BROWSER_EXTENSIONS_API_PLATFORM_KEYS_PLATFORM_KEYS_API_H_
#include <string>
+#include <vector>
#include "chrome/browser/extensions/chrome_extension_function.h"
+namespace net {
+class X509Certificate;
+typedef std::vector<scoped_refptr<X509Certificate>> CertificateList;
+}
+
namespace extensions {
namespace platform_keys {
@@ -25,6 +31,21 @@ std::string PlatformKeysTokenIdToApiId(
} // namespace platform_keys
+class PlatformKeysInternalSelectClientCertificatesFunction
+ : public ChromeUIThreadExtensionFunction {
+ private:
+ ~PlatformKeysInternalSelectClientCertificatesFunction() override;
+ ResponseAction Run() override;
+
+ // Called when the certificates were selected. If an error occurred, |certs|
+ // will be null and instead |error_message| be set.
+ void OnSelectedCertificates(scoped_ptr<net::CertificateList> matches,
+ const std::string& error_message);
+
+ DECLARE_EXTENSION_FUNCTION("platformKeysInternal.selectClientCertificates",
+ PLATFORMKEYSINTERNAL_SELECTCLIENTCERTIFICATES);
+};
+
class PlatformKeysInternalSignFunction
: public ChromeUIThreadExtensionFunction {
private:
« no previous file with comments | « chrome/browser/extensions/api/platform_keys/OWNERS ('k') | chrome/browser/extensions/api/platform_keys/platform_keys_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698