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

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: 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
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..49f218f36328b6a5f21b0e19327bca11418433c1 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 {
Devlin 2016/02/19 18:05:02 Thanks :)
+ : public UIThreadExtensionFunction {
private:
~EnterprisePlatformKeysInternalGetTokensFunction() override;
ResponseAction Run() override;
@@ -92,6 +93,44 @@ class EnterprisePlatformKeysInternalGetTokensFunction
ENTERPRISE_PLATFORMKEYSINTERNAL_GETTOKENS);
};
+class EnterprisePlatformKeysChallengeMachineKeyFunction
+ : public UIThreadExtensionFunction {
+ public:
+ EnterprisePlatformKeysChallengeMachineKeyFunction();
+ EnterprisePlatformKeysChallengeMachineKeyFunction(
Devlin 2016/02/19 18:05:02 nit: explicit
Darren Krahn 2016/02/23 23:39:46 Done.
+ EPKPChallengeMachineKey* impl_for_testing);
+
+ private:
+ ~EnterprisePlatformKeysChallengeMachineKeyFunction() override;
+ ResponseAction Run() override;
Devlin 2016/02/19 18:05:02 nit: newline between overridden/non-overridden fun
Darren Krahn 2016/02/23 23:39:46 Done.
+ void OnChallengedKey(bool success, const std::string& data);
Devlin 2016/02/19 18:05:02 nit: function comments.
Darren Krahn 2016/02/23 23:39:46 Done.
+
+ scoped_ptr<EPKPChallengeMachineKey> default_impl_;
+ EPKPChallengeMachineKey* impl_;
+
+ DECLARE_EXTENSION_FUNCTION("enterprise.platformKeys.challengeMachineKey",
+ ENTERPRISE_PLATFORMKEYS_CHALLENGEMACHINEKEY);
+};
+
+class EnterprisePlatformKeysChallengeUserKeyFunction
+ : public UIThreadExtensionFunction {
+ public:
+ EnterprisePlatformKeysChallengeUserKeyFunction();
+ EnterprisePlatformKeysChallengeUserKeyFunction(
+ EPKPChallengeUserKey* impl_for_testing);
+
+ private:
+ ~EnterprisePlatformKeysChallengeUserKeyFunction() override;
+ ResponseAction Run() override;
+ 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_

Powered by Google App Engine
This is Rietveld 408576698