OLD | NEW |
1 // Copyright (c) 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 #ifndef SYNC_INTERNAL_API_PUBLIC_READ_TRANSACTION_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_READ_TRANSACTION_H_ |
6 #define SYNC_INTERNAL_API_PUBLIC_READ_TRANSACTION_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_READ_TRANSACTION_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "sync/base/sync_export.h" |
9 #include "sync/internal_api/public/base_transaction.h" | 10 #include "sync/internal_api/public/base_transaction.h" |
10 | 11 |
11 namespace tracked_objects { | 12 namespace tracked_objects { |
12 class Location; | 13 class Location; |
13 } // namespace tracked_objects | 14 } // namespace tracked_objects |
14 | 15 |
15 namespace syncer { | 16 namespace syncer { |
16 | 17 |
17 struct UserShare; | 18 struct UserShare; |
18 | 19 |
19 // Sync API's ReadTransaction is a read-only BaseTransaction. It wraps | 20 // Sync API's ReadTransaction is a read-only BaseTransaction. It wraps |
20 // a syncable::ReadTransaction. | 21 // a syncable::ReadTransaction. |
21 class ReadTransaction : public BaseTransaction { | 22 class SYNC_EXPORT ReadTransaction : public BaseTransaction { |
22 public: | 23 public: |
23 // Start a new read-only transaction on the specified repository. | 24 // Start a new read-only transaction on the specified repository. |
24 ReadTransaction(const tracked_objects::Location& from_here, | 25 ReadTransaction(const tracked_objects::Location& from_here, |
25 UserShare* share); | 26 UserShare* share); |
26 | 27 |
27 // Resume the middle of a transaction. Will not close transaction. | 28 // Resume the middle of a transaction. Will not close transaction. |
28 ReadTransaction(UserShare* share, syncable::BaseTransaction* trans); | 29 ReadTransaction(UserShare* share, syncable::BaseTransaction* trans); |
29 | 30 |
30 virtual ~ReadTransaction(); | 31 virtual ~ReadTransaction(); |
31 | 32 |
(...skipping 10 matching lines...) Expand all Loading... |
42 // The underlying syncable object which this class wraps. | 43 // The underlying syncable object which this class wraps. |
43 syncable::BaseTransaction* transaction_; | 44 syncable::BaseTransaction* transaction_; |
44 bool close_transaction_; | 45 bool close_transaction_; |
45 | 46 |
46 DISALLOW_COPY_AND_ASSIGN(ReadTransaction); | 47 DISALLOW_COPY_AND_ASSIGN(ReadTransaction); |
47 }; | 48 }; |
48 | 49 |
49 } // namespace syncer | 50 } // namespace syncer |
50 | 51 |
51 #endif // SYNC_INTERNAL_API_PUBLIC_READ_TRANSACTION_H_ | 52 #endif // SYNC_INTERNAL_API_PUBLIC_READ_TRANSACTION_H_ |
OLD | NEW |