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

Side by Side Diff: sync/engine/directory_cryptographer_provider.h

Issue 452283003: sync: Finish non-blocking type encryption support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More cryptographer testing Created 6 years, 4 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
« no previous file with comments | « sync/engine/cryptographer_provider.cc ('k') | sync/engine/directory_cryptographer_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_ENGINE_DIRECTORY_CRYPTOGRAPHER_PROVIDER_H_
6 #define SYNC_ENGINE_DIRECTORY_CRYPTOGRAPHER_PROVIDER_H_
7
8 #include "sync/engine/cryptographer_provider.h"
9
10 #include "sync/syncable/syncable_read_transaction.h"
11
12 namespace syncer {
13
14 namespace syncable {
15 class Directory;
16 }
17
18 // Provides access to the Directory's cryptographer through the
19 // CryptographerProvider interface.
20 class DirectoryCryptographerProvider : public CryptographerProvider {
21 public:
22 DirectoryCryptographerProvider(syncable::Directory* dir);
23 virtual ~DirectoryCryptographerProvider();
24
25 virtual bool InitScopedCryptographerRef(
26 ScopedCryptographerRef* scoped) OVERRIDE;
27
28 private:
29 syncable::Directory* dir_;
30 };
31
32 // An implementation detail of the DirectoryCryptographerProvider. Contains
33 // the ReadTransaction used to safely access the Cryptographer.
34 class ScopedDirectoryCryptographerInternal
35 : public ScopedCryptographerInternal {
36 public:
37 ScopedDirectoryCryptographerInternal(syncable::Directory* dir);
38 virtual ~ScopedDirectoryCryptographerInternal();
39
40 virtual Cryptographer* Get() const OVERRIDE;
41
42 private:
43 syncable::Directory* dir_;
44 syncable::ReadTransaction trans_;
45
46 DISALLOW_COPY_AND_ASSIGN(ScopedDirectoryCryptographerInternal);
47 };
48
49 } // namespace syncer
50
51 #endif // SYNC_ENGINE_DIRECTORY_CRYPTOGRAPHER_PROVIDER_H_
OLDNEW
« no previous file with comments | « sync/engine/cryptographer_provider.cc ('k') | sync/engine/directory_cryptographer_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698