Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: sync/test/engine/simple_cryptographer_provider.h

Issue 413833002: sync: Introduce CryptographerProvider interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Typo fix and small cleanup Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698