| OLD | NEW |
| (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 #include "blimp/helium/revision_generator.h" | |
| 6 | |
| 7 namespace blimp { | |
| 8 namespace helium { | |
| 9 | |
| 10 base::LazyInstance<RevisionGenerator> RevisionGenerator::instance_ = | |
| 11 LAZY_INSTANCE_INITIALIZER; | |
| 12 | |
| 13 const Revision& RevisionGenerator::GetNextRevision() { | |
| 14 DCHECK(sequence_checker_.CalledOnValidSequence()) | |
| 15 << "GetNextRevision() must be called on the same sequenced thread."; | |
| 16 return ++revision_; | |
| 17 } | |
| 18 | |
| 19 RevisionGenerator* RevisionGenerator::GetInstance() { | |
| 20 return instance_.Pointer(); | |
| 21 } | |
| 22 | |
| 23 Revision GetNextRevision() { | |
| 24 return RevisionGenerator::GetInstance()->GetNextRevision(); | |
| 25 } | |
| 26 | |
| 27 } // namespace helium | |
| 28 } // namespace blimp | |
| OLD | NEW |