Chromium Code Reviews| Index: chrome/browser/extensions/api/enterprise_platform_keys/token_method.h |
| diff --git a/chrome/browser/extensions/api/enterprise_platform_keys/token_method.h b/chrome/browser/extensions/api/enterprise_platform_keys/token_method.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..738405fb665d6f18a3bffaecb49e7dc9908ce15a |
| --- /dev/null |
| +++ b/chrome/browser/extensions/api/enterprise_platform_keys/token_method.h |
| @@ -0,0 +1,59 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_EXTENSIONS_API_ENTERPRISE_PLATFORM_KEYS_TOKEN_METHOD_H_ |
| +#define CHROME_BROWSER_EXTENSIONS_API_ENTERPRISE_PLATFORM_KEYS_TOKEN_METHOD_H_ |
| + |
| +#include <vector> |
| + |
| +#include "base/macros.h" |
| +#include "chrome/common/extensions/api/enterprise_platform_keys.h" |
| +#include "chrome/common/extensions/api/enterprise_platform_keys_internal.h" |
| + |
| +namespace extensions { |
| + |
| +class EnterprisePlatformKeysTokenMethodExtensionFunction; |
| + |
| +namespace enterprise_platform_keys_details { |
| + |
| +class TokenMethod { |
| + public: |
| + explicit TokenMethod( |
| + EnterprisePlatformKeysTokenMethodExtensionFunction* func); |
| + virtual ~TokenMethod(); |
| + virtual void Run() = 0; |
| + |
| + protected: |
| + EnterprisePlatformKeysTokenMethodExtensionFunction* func_; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(TokenMethod); |
| +}; |
| + |
| +scoped_ptr<TokenMethod> CreateGenerateKey( |
| + scoped_ptr<api::enterprise_platform_keys_internal::GenerateKey::Params> |
| + params, |
| + EnterprisePlatformKeysTokenMethodExtensionFunction* func); |
|
not at google - send to devlin
2014/05/08 00:13:14
Sorry but passing Functions around just doesn't ma
pneubeck (no reviews)
2014/05/08 15:04:17
Can you clarify what doesn't make sense to you?
T
not at google - send to devlin
2014/05/08 15:19:32
Why can't the ExtensionFunction implementations ge
|
| + |
| +scoped_ptr<TokenMethod> CreateSign( |
| + scoped_ptr<api::enterprise_platform_keys_internal::Sign::Params> params, |
| + EnterprisePlatformKeysTokenMethodExtensionFunction* func); |
| + |
| +scoped_ptr<TokenMethod> CreateGetCertificates( |
| + scoped_ptr<api::enterprise_platform_keys::GetCertificates::Params> params, |
| + EnterprisePlatformKeysTokenMethodExtensionFunction* func); |
| + |
| +scoped_ptr<TokenMethod> CreateImportCertificate( |
| + scoped_ptr<api::enterprise_platform_keys::ImportCertificate::Params> params, |
| + EnterprisePlatformKeysTokenMethodExtensionFunction* func); |
| + |
| +scoped_ptr<TokenMethod> CreateRemoveCertificate( |
| + scoped_ptr<api::enterprise_platform_keys::RemoveCertificate::Params> params, |
| + EnterprisePlatformKeysTokenMethodExtensionFunction* func); |
| + |
| +} // namespace enterprise_platform_keys_details |
| + |
| +} // namespace extensions |
| + |
| +#endif // CHROME_BROWSER_EXTENSIONS_API_ENTERPRISE_PLATFORM_KEYS_TOKEN_METHOD_H_ |