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

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

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/directory_cryptographer_provider.h ('k') | sync/engine/model_type_entity.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 #include "sync/engine/directory_cryptographer_provider.h"
6
7 #include "sync/syncable/directory.h"
8 #include "sync/syncable/syncable_read_transaction.h"
9
10 namespace syncer {
11
12 DirectoryCryptographerProvider::DirectoryCryptographerProvider(
13 syncable::Directory* dir)
14 : dir_(dir) {
15 }
16
17 DirectoryCryptographerProvider::~DirectoryCryptographerProvider() {
18 }
19
20 bool DirectoryCryptographerProvider::InitScopedCryptographerRef(
21 ScopedCryptographerRef* scoped) {
22 scoped->Initialize(new ScopedDirectoryCryptographerInternal(dir_));
23 return scoped->IsValid();
24 }
25
26 ScopedDirectoryCryptographerInternal::ScopedDirectoryCryptographerInternal(
27 syncable::Directory* dir)
28 : dir_(dir), trans_(FROM_HERE, dir) {
29 }
30
31 ScopedDirectoryCryptographerInternal::~ScopedDirectoryCryptographerInternal() {
32 }
33
34 Cryptographer* ScopedDirectoryCryptographerInternal::Get() const {
35 return dir_->GetCryptographer(&trans_);
36 }
37
38 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/directory_cryptographer_provider.h ('k') | sync/engine/model_type_entity.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698