Index: sync/internal_api/public/base/invalidation_state.h |
diff --git a/sync/internal_api/public/base/invalidation_state.h b/sync/internal_api/public/base/invalidation_state.h |
index 8c811afda6684e8ccea314011ce5cb5fb7f46898..b2a57027c355d4ce779e0495b497e8b3989ad955 100644 |
--- a/sync/internal_api/public/base/invalidation_state.h |
+++ b/sync/internal_api/public/base/invalidation_state.h |
@@ -7,6 +7,7 @@ |
#include <string> |
+#include "base/basictypes.h" |
#include "base/memory/scoped_ptr.h" |
namespace base { |
@@ -16,28 +17,34 @@ class Value; |
namespace syncer { |
-// Opaque class that represents an ack handle. |
-// TODO(dcheng): This is just a refactoring change, so the class is empty for |
-// the moment. It will be filled once we start implementing 'reminders'. |
+// Opaque class that represents an ack handle. We don't reuse the Tango ack |
+// handles to avoid unnecessary dependencies. |
class AckHandle { |
public: |
+ static AckHandle CreateUnique(); |
+ static AckHandle InvalidAckHandle(); |
+ |
bool Equals(const AckHandle& other) const; |
scoped_ptr<base::Value> ToValue() const; |
- |
bool ResetFromValue(const base::Value& value); |
+ |
+ private: |
+ AckHandle(const std::string& state); |
+ |
+ std::string state_; |
}; |
struct InvalidationState { |
- std::string payload; |
- AckHandle ack_handle; |
+ InvalidationState(); |
bool Equals(const InvalidationState& other) const; |
- // Caller owns the returned DictionaryValue. |
scoped_ptr<base::DictionaryValue> ToValue() const; |
- |
bool ResetFromValue(const base::DictionaryValue& value); |
+ |
+ std::string payload; |
+ AckHandle ack_handle; |
}; |
} // namespace syncer |