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 #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/api/attachments/attachment_id.h" | 9 #include "sync/api/attachments/attachment_id.h" |
10 #include "sync/base/sync_export.h" | 10 #include "sync/base/sync_export.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 syncable::BaseTransaction* GetWrappedTrans() const override; | 39 syncable::BaseTransaction* GetWrappedTrans() const override; |
40 | 40 |
41 // Return |transaction_version| of |type| stored in sync directory's | 41 // Return |transaction_version| of |type| stored in sync directory's |
42 // persisted info. | 42 // persisted info. |
43 int64 GetModelVersion(ModelType type) const; | 43 int64 GetModelVersion(ModelType type) const; |
44 | 44 |
45 // Fills |context| with the datatype context associated with |type|. | 45 // Fills |context| with the datatype context associated with |type|. |
46 void GetDataTypeContext(ModelType type, | 46 void GetDataTypeContext(ModelType type, |
47 sync_pb::DataTypeContext* context) const; | 47 sync_pb::DataTypeContext* context) const; |
48 | 48 |
49 // Clear |id_set| and fill it with the ids of attachments that need to be | 49 // Clear |ids| and fill it with the ids of attachments that need to be |
50 // uploaded to the sync server. | 50 // uploaded to the sync server. |
51 void GetAttachmentIdsToUpload(ModelType type, AttachmentIdSet* id_set) const; | 51 void GetAttachmentIdsToUpload(ModelType type, AttachmentIdList* ids) const; |
52 | 52 |
53 // Return the current (opaque) store birthday. | 53 // Return the current (opaque) store birthday. |
54 std::string GetStoreBirthday() const; | 54 std::string GetStoreBirthday() const; |
55 | 55 |
56 private: | 56 private: |
57 void* operator new(size_t size); // Transaction is meant for stack use only. | 57 void* operator new(size_t size); // Transaction is meant for stack use only. |
58 | 58 |
59 // The underlying syncable object which this class wraps. | 59 // The underlying syncable object which this class wraps. |
60 syncable::BaseTransaction* transaction_; | 60 syncable::BaseTransaction* transaction_; |
61 bool close_transaction_; | 61 bool close_transaction_; |
62 | 62 |
63 DISALLOW_COPY_AND_ASSIGN(ReadTransaction); | 63 DISALLOW_COPY_AND_ASSIGN(ReadTransaction); |
64 }; | 64 }; |
65 | 65 |
66 } // namespace syncer | 66 } // namespace syncer |
67 | 67 |
68 #endif // SYNC_INTERNAL_API_PUBLIC_READ_TRANSACTION_H_ | 68 #endif // SYNC_INTERNAL_API_PUBLIC_READ_TRANSACTION_H_ |
OLD | NEW |