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

Side by Side Diff: chrome/common/extensions/docs/server2/samples_data_source.py

Issue 1151283007: Docserver overhaul: Gitiles away from me. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove inform_users template to fix presubmit failure (it's now a redirect) Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 import traceback 6 import traceback
7 7
8 from data_source import DataSource 8 from data_source import DataSource
9 from extensions_paths import EXAMPLES 9 from extensions_paths import EXAMPLES
10 from future import All, Future 10 from future import All, Future
(...skipping 10 matching lines...) Expand all
21 21
22 def _GetImpl(self, platform): 22 def _GetImpl(self, platform):
23 cache = self._platform_bundle.GetSamplesModel(platform).GetCache() 23 cache = self._platform_bundle.GetSamplesModel(platform).GetCache()
24 create_view = lambda samp_list: CreateSamplesView(samp_list, self._request) 24 create_view = lambda samp_list: CreateSamplesView(samp_list, self._request)
25 return cache.GetFromFileListing('' if platform == 'apps' 25 return cache.GetFromFileListing('' if platform == 'apps'
26 else EXAMPLES).Then(create_view) 26 else EXAMPLES).Then(create_view)
27 27
28 def get(self, platform): 28 def get(self, platform):
29 return self._GetImpl(platform).Get() 29 return self._GetImpl(platform).Get()
30 30
31 def GetRefreshPaths(self): 31 def Refresh(self):
32 return [platform for platform in GetPlatforms()] 32 return All(self._GetImpl(platform) for platform in GetPlatforms())
33
34 def Refresh(self, path):
35 return self._GetImpl(path)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698