Chromium Code Reviews| Index: blimp/net/helium/vector_clock.h |
| diff --git a/blimp/net/helium/vector_clock.h b/blimp/net/helium/vector_clock.h |
| index c375aacc274a52b642d5da580c22579180ef25db..1b4091d4108ba1e32c167e3acf5f27a57ce431ac 100644 |
| --- a/blimp/net/helium/vector_clock.h |
| +++ b/blimp/net/helium/vector_clock.h |
| @@ -7,6 +7,8 @@ |
| #include <stdint.h> |
| +#include "blimp/common/proto/helium.pb.h" |
| + |
| namespace blimp { |
| // From wikipedia: |
| @@ -18,7 +20,7 @@ namespace blimp { |
| // For more info see: |
| // https://en.wikipedia.org/wiki/Vector_clock |
| -typedef uint32_t Revision; |
| +typedef uint64_t Revision; |
| class VectorClock { |
| public: |
| @@ -56,6 +58,14 @@ class VectorClock { |
| remote_revision_ = remote_revision; |
| } |
| + // Create the proto message object corresponding to this object. |
|
Kevin M
2016/10/04 17:28:12
Message, not message object?
scf
2016/10/04 21:27:46
Done.
|
| + proto::VectorClockMessage ToProto() const; |
| + |
| + // Inverts the local and remote components respectively. |
| + // Used when we send VectorClock across the wire. The local becomes |
| + // remote and vice versa. |
| + VectorClock Invert() const; |
| + |
| private: |
| Revision local_revision_ = 0; |
| Revision remote_revision_ = 0; |