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

Side by Side Diff: blimp/helium/revision_generator.h

Issue 2602103002: Delete blimp/helium and remove references to it from dependent targets (Closed)
Patch Set: . Created 3 years, 11 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/helium/result_unittest.cc ('k') | blimp/helium/revision_generator.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_HELIUM_REVISION_GENERATOR_H_
6 #define BLIMP_HELIUM_REVISION_GENERATOR_H_
7
8 #include "base/lazy_instance.h"
9 #include "base/macros.h"
10 #include "base/sequence_checker.h"
11 #include "blimp/helium/blimp_helium_export.h"
12 #include "blimp/helium/version_vector.h"
13
14 namespace blimp {
15 namespace helium {
16
17 // Responsible for generating monotonically increasing values
18 // of Revisions. This generator is used one per host
19 // (client or engine) to ensure they have a single clock domain.
20 class BLIMP_HELIUM_EXPORT RevisionGenerator {
21 public:
22 RevisionGenerator() = default;
23
24 const Revision& current() { return revision_; }
25
26 const Revision& GetNextRevision();
27
28 static RevisionGenerator* GetInstance();
29
30 private:
31 static base::LazyInstance<RevisionGenerator> instance_;
32
33 Revision revision_ = 0;
34 base::SequenceChecker sequence_checker_;
35
36 DISALLOW_COPY_AND_ASSIGN(RevisionGenerator);
37 };
38
39 Revision BLIMP_HELIUM_EXPORT GetNextRevision();
40
41 } // namespace helium
42 } // namespace blimp
43
44 #endif // BLIMP_HELIUM_REVISION_GENERATOR_H_
OLDNEW
« no previous file with comments | « blimp/helium/result_unittest.cc ('k') | blimp/helium/revision_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698