OLD | NEW |
(Empty) | |
| 1 # Copyright 2014 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 from object_store_creator import ObjectStoreCreator |
| 6 from future import Future |
| 7 |
| 8 |
| 9 class CommitTracker(object): |
| 10 '''Utility class for managing and querying the storage of various named commit |
| 11 IDs.''' |
| 12 def __init__(self, object_store_creator): |
| 13 self._store = object_store_creator.Create(str, category='commits') |
| 14 |
| 15 def Get(self, key): |
| 16 return self._store.Get(key) |
| 17 |
| 18 def Set(self, key, commit): |
| 19 return self._store.Set(key, commit) |
OLD | NEW |