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

Unified Diff: chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h

Issue 1685103003: Copy challenge*Key methods to enterprise.platformKeys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits; now use ArrayBuffer Created 4 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « no previous file | chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698