Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: blimp/net/helium/vector_clock_generator.h

Issue 2382533002: Helium: Initial proto and Syncable interface definition (Closed)
Patch Set: test changes Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « blimp/net/helium/vector_clock.cc ('k') | blimp/net/helium/vector_clock_generator_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BLIMP_NET_HELIUM_VECTOR_CLOCK_GENERATOR_H_
6 #define BLIMP_NET_HELIUM_VECTOR_CLOCK_GENERATOR_H_
7
8 #include "base/macros.h"
9 #include "blimp/net/helium/vector_clock.h"
10
11 namespace blimp {
12
13 // This entity is responsible for generating monotonically increasing values
14 // of VectorClocks. This generator is going to be used one per host
15 // (client or engine) to ensure they have a single clock domain.
16 //
17 class VectorClockGenerator {
18 public:
19 VectorClockGenerator() {}
20
21 void Increment() { clock_.IncrementLocal(); }
22
23 const VectorClock& current() { return clock_; }
24
25 private:
26 VectorClock clock_;
27
28 DISALLOW_COPY_AND_ASSIGN(VectorClockGenerator);
29 };
30
31 } // namespace blimp
32
33 #endif // BLIMP_NET_HELIUM_VECTOR_CLOCK_GENERATOR_H_
OLDNEW
« no previous file with comments | « blimp/net/helium/vector_clock.cc ('k') | blimp/net/helium/vector_clock_generator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698