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 #include "sync/test/engine/simple_cryptographer_provider.h" |
| 6 |
| 7 namespace syncer { |
| 8 |
| 9 SimpleCryptographerProvider::SimpleCryptographerProvider( |
| 10 Cryptographer* cryptographer) |
| 11 : cryptographer_(cryptographer) { |
| 12 } |
| 13 |
| 14 SimpleCryptographerProvider::~SimpleCryptographerProvider() { |
| 15 } |
| 16 |
| 17 bool SimpleCryptographerProvider::InitScopedCryptographerRef( |
| 18 ScopedCryptographerRef* scoped) { |
| 19 scoped->Initialize(new SimpleScopedCryptographerInternal(cryptographer_)); |
| 20 return scoped->IsValid(); |
| 21 } |
| 22 |
| 23 SimpleScopedCryptographerInternal::SimpleScopedCryptographerInternal( |
| 24 Cryptographer* cryptographer) |
| 25 : cryptographer_(cryptographer) { |
| 26 } |
| 27 |
| 28 SimpleScopedCryptographerInternal::~SimpleScopedCryptographerInternal() { |
| 29 } |
| 30 |
| 31 Cryptographer* SimpleScopedCryptographerInternal::Get() const { |
| 32 return cryptographer_; |
| 33 } |
| 34 |
| 35 } // namespace syncer |
OLD | NEW |