| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/read_transaction.h" | 5 #include "sync/internal_api/public/read_transaction.h" |
| 6 | 6 |
| 7 #include <stdint.h> |
| 8 |
| 7 #include "sync/syncable/directory.h" | 9 #include "sync/syncable/directory.h" |
| 8 #include "sync/syncable/syncable_read_transaction.h" | 10 #include "sync/syncable/syncable_read_transaction.h" |
| 9 | 11 |
| 10 namespace syncer { | 12 namespace syncer { |
| 11 | 13 |
| 12 ////////////////////////////////////////////////////////////////////////// | 14 ////////////////////////////////////////////////////////////////////////// |
| 13 // ReadTransaction member definitions | 15 // ReadTransaction member definitions |
| 14 ReadTransaction::ReadTransaction(const tracked_objects::Location& from_here, | 16 ReadTransaction::ReadTransaction(const tracked_objects::Location& from_here, |
| 15 UserShare* share) | 17 UserShare* share) |
| 16 : BaseTransaction(share), | 18 : BaseTransaction(share), |
| (...skipping 12 matching lines...) Expand all Loading... |
| 29 ReadTransaction::~ReadTransaction() { | 31 ReadTransaction::~ReadTransaction() { |
| 30 if (close_transaction_) { | 32 if (close_transaction_) { |
| 31 delete transaction_; | 33 delete transaction_; |
| 32 } | 34 } |
| 33 } | 35 } |
| 34 | 36 |
| 35 syncable::BaseTransaction* ReadTransaction::GetWrappedTrans() const { | 37 syncable::BaseTransaction* ReadTransaction::GetWrappedTrans() const { |
| 36 return transaction_; | 38 return transaction_; |
| 37 } | 39 } |
| 38 | 40 |
| 39 int64 ReadTransaction::GetModelVersion(ModelType type) const { | 41 int64_t ReadTransaction::GetModelVersion(ModelType type) const { |
| 40 return transaction_->directory()->GetTransactionVersion(type); | 42 return transaction_->directory()->GetTransactionVersion(type); |
| 41 } | 43 } |
| 42 | 44 |
| 43 void ReadTransaction::GetDataTypeContext( | 45 void ReadTransaction::GetDataTypeContext( |
| 44 ModelType type, | 46 ModelType type, |
| 45 sync_pb::DataTypeContext* context) const { | 47 sync_pb::DataTypeContext* context) const { |
| 46 return transaction_->directory()->GetDataTypeContext( | 48 return transaction_->directory()->GetDataTypeContext( |
| 47 transaction_, type, context); | 49 transaction_, type, context); |
| 48 } | 50 } |
| 49 | 51 |
| 50 void ReadTransaction::GetAttachmentIdsToUpload(ModelType type, | 52 void ReadTransaction::GetAttachmentIdsToUpload(ModelType type, |
| 51 AttachmentIdList* ids) const { | 53 AttachmentIdList* ids) const { |
| 52 DCHECK(ids); | 54 DCHECK(ids); |
| 53 transaction_->directory()->GetAttachmentIdsToUpload(transaction_, type, ids); | 55 transaction_->directory()->GetAttachmentIdsToUpload(transaction_, type, ids); |
| 54 } | 56 } |
| 55 | 57 |
| 56 std::string ReadTransaction::GetStoreBirthday() const { | 58 std::string ReadTransaction::GetStoreBirthday() const { |
| 57 return transaction_->directory()->store_birthday(); | 59 return transaction_->directory()->store_birthday(); |
| 58 } | 60 } |
| 59 | 61 |
| 60 } // namespace syncer | 62 } // namespace syncer |
| OLD | NEW |