| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SYNC_TEST_ENGINE_SIMPLE_CRYPTOGRAPHER_PROVIDER_H_ |
| 6 #define SYNC_TEST_ENGINE_SIMPLE_CRYPTOGRAPHER_PROVIDER_H_ |
| 7 |
| 8 #include "sync/engine/cryptographer_provider.h" |
| 9 |
| 10 #include "sync/util/cryptographer.h" |
| 11 |
| 12 namespace syncer { |
| 13 |
| 14 // A trivial cryptographer provider. Exposes the given Cryptographer through |
| 15 // the CryptographerProvider interface. Does not take ownership of the |
| 16 // |cryptographer|. |
| 17 class SimpleCryptographerProvider : public CryptographerProvider { |
| 18 public: |
| 19 explicit SimpleCryptographerProvider(Cryptographer* cryptographer); |
| 20 virtual ~SimpleCryptographerProvider(); |
| 21 |
| 22 // Implementation of CryptographerProvider. |
| 23 virtual bool InitScopedCryptographer(ScopedCryptographer* scoped) OVERRIDE; |
| 24 |
| 25 private: |
| 26 Cryptographer* cryptographer_; |
| 27 }; |
| 28 |
| 29 class SimpleScopedCryptographerImpl : public ScopedCryptographerImpl { |
| 30 public: |
| 31 explicit SimpleScopedCryptographerImpl(Cryptographer* cryptographer); |
| 32 virtual ~SimpleScopedCryptographerImpl(); |
| 33 |
| 34 // Implementation of ScopedCryptographerImpl. |
| 35 virtual Cryptographer* Get() const OVERRIDE; |
| 36 |
| 37 private: |
| 38 Cryptographer* cryptographer_; |
| 39 }; |
| 40 |
| 41 } // namespace syncer |
| 42 |
| 43 #endif // SYNC_TEST_ENGINE_SIMPLE_CRYPTOGRAPHER_PROVIDER_H_ |
| OLD | NEW |