| Index: chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h
|
| diff --git a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h
|
| index dd889193e59f134773bca5e8f48c1a5b94189c0e..6af1c1e647376547aff5d9e1dfaf38cdb1ef0ce2 100644
|
| --- a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h
|
| +++ b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h
|
| @@ -10,7 +10,8 @@
|
|
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| -#include "chrome/browser/extensions/chrome_extension_function.h"
|
| +#include "chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.h"
|
| +#include "extensions/browser/extension_function.h"
|
|
|
| namespace net {
|
| class X509Certificate;
|
| @@ -20,7 +21,7 @@ typedef std::vector<scoped_refptr<X509Certificate> > CertificateList;
|
| namespace extensions {
|
|
|
| class EnterprisePlatformKeysInternalGenerateKeyFunction
|
| - : public ChromeUIThreadExtensionFunction {
|
| + : public UIThreadExtensionFunction {
|
| private:
|
| ~EnterprisePlatformKeysInternalGenerateKeyFunction() override;
|
| ResponseAction Run() override;
|
| @@ -35,7 +36,7 @@ class EnterprisePlatformKeysInternalGenerateKeyFunction
|
| };
|
|
|
| class EnterprisePlatformKeysGetCertificatesFunction
|
| - : public ChromeUIThreadExtensionFunction {
|
| + : public UIThreadExtensionFunction {
|
| private:
|
| ~EnterprisePlatformKeysGetCertificatesFunction() override;
|
| ResponseAction Run() override;
|
| @@ -50,7 +51,7 @@ class EnterprisePlatformKeysGetCertificatesFunction
|
| };
|
|
|
| class EnterprisePlatformKeysImportCertificateFunction
|
| - : public ChromeUIThreadExtensionFunction {
|
| + : public UIThreadExtensionFunction {
|
| private:
|
| ~EnterprisePlatformKeysImportCertificateFunction() override;
|
| ResponseAction Run() override;
|
| @@ -64,7 +65,7 @@ class EnterprisePlatformKeysImportCertificateFunction
|
| };
|
|
|
| class EnterprisePlatformKeysRemoveCertificateFunction
|
| - : public ChromeUIThreadExtensionFunction {
|
| + : public UIThreadExtensionFunction {
|
| private:
|
| ~EnterprisePlatformKeysRemoveCertificateFunction() override;
|
| ResponseAction Run() override;
|
| @@ -78,7 +79,7 @@ class EnterprisePlatformKeysRemoveCertificateFunction
|
| };
|
|
|
| class EnterprisePlatformKeysInternalGetTokensFunction
|
| - : public ChromeUIThreadExtensionFunction {
|
| + : public UIThreadExtensionFunction {
|
| private:
|
| ~EnterprisePlatformKeysInternalGetTokensFunction() override;
|
| ResponseAction Run() override;
|
| @@ -92,6 +93,52 @@ class EnterprisePlatformKeysInternalGetTokensFunction
|
| ENTERPRISE_PLATFORMKEYSINTERNAL_GETTOKENS);
|
| };
|
|
|
| +class EnterprisePlatformKeysChallengeMachineKeyFunction
|
| + : public UIThreadExtensionFunction {
|
| + public:
|
| + EnterprisePlatformKeysChallengeMachineKeyFunction();
|
| + explicit EnterprisePlatformKeysChallengeMachineKeyFunction(
|
| + EPKPChallengeMachineKey* impl_for_testing);
|
| +
|
| + private:
|
| + ~EnterprisePlatformKeysChallengeMachineKeyFunction() override;
|
| + ResponseAction Run() override;
|
| +
|
| + // Called when the challenge operation is complete. If the operation succeeded
|
| + // |success| will be true and |data| will contain the challenge response data.
|
| + // Otherwise |success| will be false and |data| is an error message.
|
| + void OnChallengedKey(bool success, const std::string& data);
|
| +
|
| + scoped_ptr<EPKPChallengeMachineKey> default_impl_;
|
| + EPKPChallengeMachineKey* impl_;
|
| +
|
| + DECLARE_EXTENSION_FUNCTION("enterprise.platformKeys.challengeMachineKey",
|
| + ENTERPRISE_PLATFORMKEYS_CHALLENGEMACHINEKEY);
|
| +};
|
| +
|
| +class EnterprisePlatformKeysChallengeUserKeyFunction
|
| + : public UIThreadExtensionFunction {
|
| + public:
|
| + EnterprisePlatformKeysChallengeUserKeyFunction();
|
| + explicit EnterprisePlatformKeysChallengeUserKeyFunction(
|
| + EPKPChallengeUserKey* impl_for_testing);
|
| +
|
| + private:
|
| + ~EnterprisePlatformKeysChallengeUserKeyFunction() override;
|
| + ResponseAction Run() override;
|
| +
|
| + // Called when the challenge operation is complete. If the operation succeeded
|
| + // |success| will be true and |data| will contain the challenge response data.
|
| + // Otherwise |success| will be false and |data| is an error message.
|
| + void OnChallengedKey(bool success, const std::string& data);
|
| +
|
| + scoped_ptr<EPKPChallengeUserKey> default_impl_;
|
| + EPKPChallengeUserKey* impl_;
|
| +
|
| + DECLARE_EXTENSION_FUNCTION("enterprise.platformKeys.challengeUserKey",
|
| + ENTERPRISE_PLATFORMKEYS_CHALLENGEUSERKEY);
|
| +};
|
| +
|
| } // namespace extensions
|
|
|
| #endif // CHROME_BROWSER_EXTENSIONS_API_ENTERPRISE_PLATFORM_KEYS_ENTERPRISE_PLATFORM_KEYS_API_H_
|
|
|