| 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..3a4cd243d09521c8916f8e3f62d1afa45f3e6153
|
| --- /dev/null
|
| +++ b/chrome/browser/extensions/api/enterprise_platform_keys/token_method.h
|
| @@ -0,0 +1,70 @@
|
| +// 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 <string>
|
| +#include <vector>
|
| +
|
| +#include "base/macros.h"
|
| +#include "base/callback.h"
|
| +#include "chrome/common/extensions/api/enterprise_platform_keys.h"
|
| +#include "chrome/common/extensions/api/enterprise_platform_keys_internal.h"
|
| +
|
| +class Profile;
|
| +
|
| +namespace extensions {
|
| +
|
| +class EnterprisePlatformKeysTokenMethodExtensionFunction;
|
| +
|
| +namespace enterprise_platform_keys_details {
|
| +
|
| +class TokenMethod {
|
| + public:
|
| + typedef base::Callback<void(const std::string& error_message)> ErrorCallback;
|
| +
|
| + explicit TokenMethod(const ErrorCallback& error_callback, Profile* profile);
|
| + virtual ~TokenMethod();
|
| + virtual void Run() = 0;
|
| +
|
| + protected:
|
| + ErrorCallback error_callback_;
|
| + Profile* profile_;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(TokenMethod);
|
| +};
|
| +
|
| +typedef base::Callback<void(const std::string& public_key_str)>
|
| + GenerateKeyCallback;
|
| +
|
| +scoped_ptr<TokenMethod> CreateGenerateKey(
|
| + scoped_ptr<api::enterprise_platform_keys_internal::GenerateKey::Params>
|
| + params,
|
| + const GenerateKeyCallback& callback,
|
| + const TokenMethod::ErrorCallback& error_callback,
|
| + Profile* profile);
|
| +
|
| +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_
|
|
|