OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #include "components/sync/core/base_transaction.h" | |
6 | |
7 #include "components/sync/syncable/directory.h" | |
8 #include "components/sync/syncable/nigori_handler.h" | |
9 | |
10 namespace syncer { | |
11 | |
12 ////////////////////////////////////////////////////////////////////////// | |
13 // BaseTransaction member definitions | |
14 BaseTransaction::BaseTransaction(UserShare* share) : user_share_(share) { | |
15 DCHECK(share && share->directory.get()); | |
16 } | |
17 | |
18 BaseTransaction::~BaseTransaction() {} | |
19 | |
20 Cryptographer* BaseTransaction::GetCryptographer() const { | |
21 return GetDirectory()->GetCryptographer(this->GetWrappedTrans()); | |
22 } | |
23 | |
24 ModelTypeSet BaseTransaction::GetEncryptedTypes() const { | |
25 syncable::NigoriHandler* nigori_handler = GetDirectory()->GetNigoriHandler(); | |
26 return nigori_handler | |
27 ? nigori_handler->GetEncryptedTypes(this->GetWrappedTrans()) | |
28 : ModelTypeSet(); | |
29 } | |
30 | |
31 } // namespace syncer | |
OLD | NEW |