Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / sync / internal_api / public / read_transaction.h
index 02e2633..2084b9a 100644 (file)
@@ -6,6 +6,7 @@
 #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"
 
@@ -13,6 +14,10 @@ namespace tracked_objects {
 class Location;
 }  // namespace tracked_objects
 
+namespace sync_pb {
+class DataTypeContext;
+}
+
 namespace syncer {
 
 struct UserShare;
@@ -28,14 +33,22 @@ class SYNC_EXPORT ReadTransaction : public BaseTransaction {
   // 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.