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/read_transaction.h" | 5 #include "sync/internal_api/public/read_transaction.h" |
6 | 6 |
7 #include "sync/syncable/directory.h" | |
8 #include "sync/syncable/read_transaction.h" | 7 #include "sync/syncable/read_transaction.h" |
9 | 8 |
10 namespace syncer { | 9 namespace syncer { |
11 | 10 |
12 ////////////////////////////////////////////////////////////////////////// | 11 ////////////////////////////////////////////////////////////////////////// |
13 // ReadTransaction member definitions | 12 // ReadTransaction member definitions |
14 ReadTransaction::ReadTransaction(const tracked_objects::Location& from_here, | 13 ReadTransaction::ReadTransaction(const tracked_objects::Location& from_here, |
15 UserShare* share) | 14 UserShare* share) |
16 : BaseTransaction(share), | 15 : BaseTransaction(share), |
17 transaction_(NULL), | 16 transaction_(NULL), |
(...skipping 11 matching lines...) Expand all Loading... |
29 ReadTransaction::~ReadTransaction() { | 28 ReadTransaction::~ReadTransaction() { |
30 if (close_transaction_) { | 29 if (close_transaction_) { |
31 delete transaction_; | 30 delete transaction_; |
32 } | 31 } |
33 } | 32 } |
34 | 33 |
35 syncable::BaseTransaction* ReadTransaction::GetWrappedTrans() const { | 34 syncable::BaseTransaction* ReadTransaction::GetWrappedTrans() const { |
36 return transaction_; | 35 return transaction_; |
37 } | 36 } |
38 | 37 |
39 int64 ReadTransaction::GetModelVersion(ModelType type) { | |
40 return transaction_->directory()->GetTransactionVersion(type); | |
41 } | |
42 | |
43 } // namespace syncer | 38 } // namespace syncer |
OLD | NEW |