| Index: sync/test/engine/simple_cryptographer_provider.h
|
| diff --git a/sync/test/engine/simple_cryptographer_provider.h b/sync/test/engine/simple_cryptographer_provider.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8af0d54c2a9814a7f3872208f3c5ad651beadfff
|
| --- /dev/null
|
| +++ b/sync/test/engine/simple_cryptographer_provider.h
|
| @@ -0,0 +1,43 @@
|
| +// 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 SYNC_TEST_ENGINE_SIMPLE_CRYPTOGRAPHER_PROVIDER_H_
|
| +#define SYNC_TEST_ENGINE_SIMPLE_CRYPTOGRAPHER_PROVIDER_H_
|
| +
|
| +#include "sync/engine/cryptographer_provider.h"
|
| +
|
| +#include "sync/util/cryptographer.h"
|
| +
|
| +namespace syncer {
|
| +
|
| +// A trivial cryptographer provider. Exposes the given Cryptographer through
|
| +// the CryptographerProvider interface. Does not take ownership of the
|
| +// |cryptographer|.
|
| +class SimpleCryptographerProvider : public CryptographerProvider {
|
| + public:
|
| + explicit SimpleCryptographerProvider(Cryptographer* cryptographer);
|
| + virtual ~SimpleCryptographerProvider();
|
| +
|
| + // Implementation of CryptographerProvider.
|
| + virtual bool InitScopedCryptographer(ScopedCryptographer* scoped) OVERRIDE;
|
| +
|
| + private:
|
| + Cryptographer* cryptographer_;
|
| +};
|
| +
|
| +class SimpleScopedCryptographerImpl : public ScopedCryptographerImpl {
|
| + public:
|
| + explicit SimpleScopedCryptographerImpl(Cryptographer* cryptographer);
|
| + virtual ~SimpleScopedCryptographerImpl();
|
| +
|
| + // Implementation of ScopedCryptographerImpl.
|
| + virtual Cryptographer* Get() const OVERRIDE;
|
| +
|
| + private:
|
| + Cryptographer* cryptographer_;
|
| +};
|
| +
|
| +} // namespace syncer
|
| +
|
| +#endif // SYNC_TEST_ENGINE_SIMPLE_CRYPTOGRAPHER_PROVIDER_H_
|
|
|