| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "sync/internal_api/public/base_transaction.h" | 5 #include "sync/internal_api/public/base_transaction.h" |
| 6 | 6 |
| 7 #include "sync/syncable/directory.h" | 7 #include "sync/syncable/directory.h" |
| 8 #include "sync/util/cryptographer.h" | 8 #include "sync/util/cryptographer.h" |
| 9 | 9 |
| 10 using syncer::Cryptographer; | |
| 11 | |
| 12 namespace syncer { | 10 namespace syncer { |
| 13 | 11 |
| 14 ////////////////////////////////////////////////////////////////////////// | 12 ////////////////////////////////////////////////////////////////////////// |
| 15 // BaseTransaction member definitions | 13 // BaseTransaction member definitions |
| 16 BaseTransaction::BaseTransaction(UserShare* share) { | 14 BaseTransaction::BaseTransaction(UserShare* share) { |
| 17 DCHECK(share && share->directory.get()); | 15 DCHECK(share && share->directory.get()); |
| 18 directory_ = share->directory.get(); | 16 directory_ = share->directory.get(); |
| 19 } | 17 } |
| 20 BaseTransaction::~BaseTransaction() { | 18 BaseTransaction::~BaseTransaction() { |
| 21 } | 19 } |
| 22 | 20 |
| 23 syncer::Cryptographer* BaseTransaction::GetCryptographer() const { | 21 Cryptographer* BaseTransaction::GetCryptographer() const { |
| 24 return directory_->GetCryptographer(this->GetWrappedTrans()); | 22 return directory_->GetCryptographer(this->GetWrappedTrans()); |
| 25 } | 23 } |
| 26 | 24 |
| 27 syncer::ModelTypeSet GetEncryptedTypes(const syncer::BaseTransaction* trans) { | 25 ModelTypeSet GetEncryptedTypes(const BaseTransaction* trans) { |
| 28 return trans->GetCryptographer()->GetEncryptedTypes(); | 26 return trans->GetCryptographer()->GetEncryptedTypes(); |
| 29 } | 27 } |
| 30 | 28 |
| 31 } // namespace syncer | 29 } // namespace syncer |
| OLD | NEW |