1 // Copyright (c) 2012 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/internal_api/public/base_transaction.h"
7 #include "sync/syncable/directory.h"
8 #include "sync/util/cryptographer.h"
10 using syncer::Cryptographer
;
14 //////////////////////////////////////////////////////////////////////////
15 // BaseTransaction member definitions
16 BaseTransaction::BaseTransaction(UserShare
* share
) {
17 DCHECK(share
&& share
->directory
.get());
18 directory_
= share
->directory
.get();
20 BaseTransaction::~BaseTransaction() {
23 syncer::Cryptographer
* BaseTransaction::GetCryptographer() const {
24 return directory_
->GetCryptographer(this->GetWrappedTrans());
27 syncer::ModelTypeSet
GetEncryptedTypes(const syncer::BaseTransaction
* trans
) {
28 return trans
->GetCryptographer()->GetEncryptedTypes();