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

Unified Diff: chrome/common/extensions/docs/server2/object_store.py

Issue 658733004: Docserver: Make ObjectStore set calls return Futures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix, cleanup Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/server2/object_store.py
diff --git a/chrome/common/extensions/docs/server2/object_store.py b/chrome/common/extensions/docs/server2/object_store.py
index 51dedd0641fc111282c55f59fc583665e7d53411..b56986b349ae0ea1b8bd9eb00d07a27954393f64 100644
--- a/chrome/common/extensions/docs/server2/object_store.py
+++ b/chrome/common/extensions/docs/server2/object_store.py
@@ -21,12 +21,14 @@ class ObjectStore(object):
raise NotImplementedError(self.__class__)
def Set(self, key, value):
- '''Sets key -> value in the object store.
+ '''Sets key -> value in the object store. Returns a |Future| which is
+ resolved once the key's new value has been stored.
'''
- self.SetMulti({ key: value })
+ return self.SetMulti({ key: value })
def SetMulti(self, items):
'''Atomically sets the mapping of keys to values in the object store.
+ Returns a |Future| which is resolved once the new mapping has been stored.
'''
raise NotImplementedError(self.__class__)

Powered by Google App Engine
This is Rietveld 408576698