| 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 "chrome/browser/sync/internal_api/base_transaction.h" | 5 #include "sync/internal_api/base_transaction.h" |
| 6 | 6 |
| 7 #include "sync/syncable/syncable.h" | 7 #include "sync/syncable/syncable.h" |
| 8 #include "sync/util/cryptographer.h" | 8 #include "sync/util/cryptographer.h" |
| 9 | 9 |
| 10 using browser_sync::Cryptographer; | 10 using browser_sync::Cryptographer; |
| 11 | 11 |
| 12 namespace sync_api { | 12 namespace sync_api { |
| 13 | 13 |
| 14 ////////////////////////////////////////////////////////////////////////// | 14 ////////////////////////////////////////////////////////////////////////// |
| 15 // BaseTransaction member definitions | 15 // BaseTransaction member definitions |
| 16 BaseTransaction::BaseTransaction(UserShare* share) { | 16 BaseTransaction::BaseTransaction(UserShare* share) { |
| 17 DCHECK(share && share->directory.get()); | 17 DCHECK(share && share->directory.get()); |
| 18 directory_ = share->directory.get(); | 18 directory_ = share->directory.get(); |
| 19 } | 19 } |
| 20 BaseTransaction::~BaseTransaction() { | 20 BaseTransaction::~BaseTransaction() { |
| 21 } | 21 } |
| 22 | 22 |
| 23 browser_sync::Cryptographer* BaseTransaction::GetCryptographer() const { | 23 browser_sync::Cryptographer* BaseTransaction::GetCryptographer() const { |
| 24 return directory_->GetCryptographer(this->GetWrappedTrans()); | 24 return directory_->GetCryptographer(this->GetWrappedTrans()); |
| 25 } | 25 } |
| 26 | 26 |
| 27 syncable::ModelTypeSet GetEncryptedTypes( | 27 syncable::ModelTypeSet GetEncryptedTypes( |
| 28 const sync_api::BaseTransaction* trans) { | 28 const sync_api::BaseTransaction* trans) { |
| 29 return trans->GetCryptographer()->GetEncryptedTypes(); | 29 return trans->GetCryptographer()->GetEncryptedTypes(); |
| 30 } | 30 } |
| 31 | 31 |
| 32 } // namespace sync_api | 32 } // namespace sync_api |
| OLD | NEW |