summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/docs/server2/future.py
diff options
context:
space:
mode:
authorkalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-05 04:25:12 +0000
committerkalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-05 04:25:12 +0000
commitab9ad605bed8d9aa8a63585fc84f32270d0917c9 (patch)
treede413eeb1566bbabf6d87b85876df1d4a431cf5e /chrome/common/extensions/docs/server2/future.py
parenta87f28d3051782dbb5bb442aa56eb0c9d16bca75 (diff)
downloadchromium_src-ab9ad605bed8d9aa8a63585fc84f32270d0917c9.zip
chromium_src-ab9ad605bed8d9aa8a63585fc84f32270d0917c9.tar.gz
chromium_src-ab9ad605bed8d9aa8a63585fc84f32270d0917c9.tar.bz2
Docserver: Properly implement the Cron logic for ContentProvider and
TemplateDataSource so that the nacl docs and partial templates are correctly pulled in by the cronjob. Make the integration tests actually test nacl docs. BUG=339936 R=yoz@chromium.org Review URL: https://codereview.chromium.org/151773002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248847 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/docs/server2/future.py')
-rw-r--r--chrome/common/extensions/docs/server2/future.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/common/extensions/docs/server2/future.py b/chrome/common/extensions/docs/server2/future.py
index 0e9ef24..4a903440 100644
--- a/chrome/common/extensions/docs/server2/future.py
+++ b/chrome/common/extensions/docs/server2/future.py
@@ -7,6 +7,13 @@ import sys
_no_value = object()
+def Collect(futures):
+ '''Creates a Future which returns a list of results from each Future in
+ |futures|.
+ '''
+ return Future(delegate=Gettable(lambda: [f.Get() for f in futures]))
+
+
class Gettable(object):
'''Allows a Future to accept a callable as a delegate. Wraps |f| in a .Get
interface required by Future.