diff options
Diffstat (limited to 'chromium/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h')
-rw-r--r-- | chromium/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/chromium/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h b/chromium/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h index 9ec384a2ef3..598990b14ed 100644 --- a/chromium/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h +++ b/chromium/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h @@ -15,8 +15,8 @@ namespace net { class X509Certificate; -typedef std::vector<scoped_refptr<X509Certificate> > CertificateList; -} +using CertificateList = std::vector<scoped_refptr<X509Certificate>>; +} // namespace net namespace extensions { @@ -96,20 +96,16 @@ class EnterprisePlatformKeysChallengeMachineKeyFunction : public ExtensionFunction { 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); + // Called when the challenge operation is complete. + void OnChallengedKey( + const chromeos::attestation::TpmChallengeKeyResult& result); - std::unique_ptr<EPKPChallengeMachineKey> default_impl_; - EPKPChallengeMachineKey* impl_; + EPKPChallengeKey impl_; DECLARE_EXTENSION_FUNCTION("enterprise.platformKeys.challengeMachineKey", ENTERPRISE_PLATFORMKEYS_CHALLENGEMACHINEKEY) @@ -119,20 +115,16 @@ class EnterprisePlatformKeysChallengeUserKeyFunction : public ExtensionFunction { 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); + // Called when the challenge operation is complete. + void OnChallengedKey( + const chromeos::attestation::TpmChallengeKeyResult& result); - std::unique_ptr<EPKPChallengeUserKey> default_impl_; - EPKPChallengeUserKey* impl_; + EPKPChallengeKey impl_; DECLARE_EXTENSION_FUNCTION("enterprise.platformKeys.challengeUserKey", ENTERPRISE_PLATFORMKEYS_CHALLENGEUSERKEY) |