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.
5 #include "sync/test/engine/simple_cryptographer_provider.h"
9 SimpleCryptographerProvider::SimpleCryptographerProvider(
10 Cryptographer* cryptographer)
11 : cryptographer_(cryptographer) {
14 SimpleCryptographerProvider::~SimpleCryptographerProvider() {
17 bool SimpleCryptographerProvider::InitScopedCryptographerRef(
18 ScopedCryptographerRef* scoped) {
19 scoped->Initialize(new SimpleScopedCryptographerInternal(cryptographer_));
20 return scoped->IsValid();
23 SimpleScopedCryptographerInternal::SimpleScopedCryptographerInternal(
24 Cryptographer* cryptographer)
25 : cryptographer_(cryptographer) {
28 SimpleScopedCryptographerInternal::~SimpleScopedCryptographerInternal() {
31 Cryptographer* SimpleScopedCryptographerInternal::Get() const {
32 return cryptographer_;