| Index: content/child/webcrypto/openssl/aes_kw_openssl.cc
|
| diff --git a/content/browser/battery_status/battery_status_manager_default.cc b/content/child/webcrypto/openssl/aes_kw_openssl.cc
|
| similarity index 23%
|
| copy from content/browser/battery_status/battery_status_manager_default.cc
|
| copy to content/child/webcrypto/openssl/aes_kw_openssl.cc
|
| index cd037cf37c984e66d54b1d2a8d2fdf084e28f686..d2bb10fc88b8c7468fb37069d13e43db495a23f0 100644
|
| --- a/content/browser/battery_status/battery_status_manager_default.cc
|
| +++ b/content/child/webcrypto/openssl/aes_kw_openssl.cc
|
| @@ -2,39 +2,43 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "content/browser/battery_status/battery_status_manager.h"
|
| -
|
| #include "base/logging.h"
|
| +#include "content/child/webcrypto/openssl/aes_key_openssl.h"
|
| +#include "content/child/webcrypto/status.h"
|
|
|
| namespace content {
|
|
|
| +namespace webcrypto {
|
| +
|
| namespace {
|
|
|
| -class BatteryStatusManagerDefault : public BatteryStatusManager {
|
| +class AesKwImplementation : public AesAlgorithm {
|
| public:
|
| - explicit BatteryStatusManagerDefault(
|
| - const BatteryStatusService::BatteryUpdateCallback& callback) {}
|
| - virtual ~BatteryStatusManagerDefault() {}
|
| -
|
| - private:
|
| - // BatteryStatusManager:
|
| - virtual bool StartListeningBatteryChange() OVERRIDE {
|
| - NOTIMPLEMENTED();
|
| - return false;
|
| + AesKwImplementation() : AesAlgorithm("KW") {}
|
| +
|
| + virtual Status Encrypt(const blink::WebCryptoAlgorithm& algorithm,
|
| + const blink::WebCryptoKey& key,
|
| + const CryptoData& data,
|
| + std::vector<uint8>* buffer) const OVERRIDE {
|
| + // TODO(eroman):
|
| + return Status::ErrorUnsupported();
|
| }
|
|
|
| - virtual void StopListeningBatteryChange() OVERRIDE { NOTIMPLEMENTED(); }
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(BatteryStatusManagerDefault);
|
| + virtual Status Decrypt(const blink::WebCryptoAlgorithm& algorithm,
|
| + const blink::WebCryptoKey& key,
|
| + const CryptoData& data,
|
| + std::vector<uint8>* buffer) const OVERRIDE {
|
| + // TODO(eroman):
|
| + return Status::ErrorUnsupported();
|
| + }
|
| };
|
|
|
| } // namespace
|
|
|
| -// static
|
| -scoped_ptr<BatteryStatusManager> BatteryStatusManager::Create(
|
| - const BatteryStatusService::BatteryUpdateCallback& callback) {
|
| - return scoped_ptr<BatteryStatusManager>(
|
| - new BatteryStatusManagerDefault(callback));
|
| +AlgorithmImplementation* CreatePlatformAesKwImplementation() {
|
| + return new AesKwImplementation;
|
| }
|
|
|
| +} // namespace webcrypto
|
| +
|
| } // namespace content
|
|
|