Chromium Code Reviews| Index: chrome/common/extensions/docs/server2/commit_tracker.py |
| diff --git a/chrome/common/extensions/docs/server2/commit_tracker.py b/chrome/common/extensions/docs/server2/commit_tracker.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8871a61bb0e45bdcf7dd681de6bbe2b02cbc54f5 |
| --- /dev/null |
| +++ b/chrome/common/extensions/docs/server2/commit_tracker.py |
| @@ -0,0 +1,20 @@ |
| +# Copyright 2014 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +from object_store_creator import ObjectStoreCreator |
| +from future import Future |
| + |
| + |
| +class CommitTracker(object): |
| + '''Utility class for managing and querying the storage of various named commit |
| + IDs.''' |
| + def __init__(self, object_store_creator): |
| + self._store = object_store_creator.Create(str, category='commits', |
|
not at google - send to devlin
2014/10/24 00:04:50
s/str/CommitTracker/ ?
Also it wouldn't need a cat
Ken Rockot(use gerrit already)
2014/10/24 21:26:53
Oh. Epiphany. I was making incorrect assumptions a
|
| + start_empty=False) |
| + |
| + def Get(self, key): |
| + return self._store.Get(key) |
| + |
| + def Set(self, key, commit): |
| + return self._store.Set(key, commit) |