#define SYNC_INTERNAL_API_PUBLIC_READ_TRANSACTION_H_
#include "base/compiler_specific.h"
+#include "sync/api/attachments/attachment_id.h"
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/base_transaction.h"
class Location;
} // namespace tracked_objects
+namespace sync_pb {
+class DataTypeContext;
+}
+
namespace syncer {
struct UserShare;
// Resume the middle of a transaction. Will not close transaction.
ReadTransaction(UserShare* share, syncable::BaseTransaction* trans);
- virtual ~ReadTransaction();
+ ~ReadTransaction() override;
// BaseTransaction override.
- virtual syncable::BaseTransaction* GetWrappedTrans() const OVERRIDE;
+ syncable::BaseTransaction* GetWrappedTrans() const override;
// Return |transaction_version| of |type| stored in sync directory's
// persisted info.
- int64 GetModelVersion(ModelType type);
+ int64 GetModelVersion(ModelType type) const;
+
+ // Fills |context| with the datatype context associated with |type|.
+ void GetDataTypeContext(ModelType type,
+ sync_pb::DataTypeContext* context) const;
+
+ // Clears |id_set| and fills it with the ids of attachments that need to be
+ // uploaded to the sync server.
+ void GetAttachmentIdsToUpload(ModelType type, AttachmentIdSet* id_set);
private:
void* operator new(size_t size); // Transaction is meant for stack use only.