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

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

Issue 18323018: Linking AvailabilityFinder with APIDataSource and intro-table templates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/server2/cron_servlet.py
diff --git a/chrome/common/extensions/docs/server2/cron_servlet.py b/chrome/common/extensions/docs/server2/cron_servlet.py
index b3d4953aac061023007ce0606734fe39259dd29b..df3c16e06814d99d5dcd8666eab558bd9c9b8b83 100644
--- a/chrome/common/extensions/docs/server2/cron_servlet.py
+++ b/chrome/common/extensions/docs/server2/cron_servlet.py
@@ -46,6 +46,9 @@ class CronServlet(Servlet):
def CreateHostFileSystemForBranchAndRevision(self, branch, revision):
return SubversionFileSystem.Create(branch, revision=revision)
+ def CreateFileSystemForBranch(self, branch):
+ return SubversionFileSystem.Create(branch)
not at google - send to devlin 2013/07/03 19:54:56 maybe we should just rename CreateHostFIleSystemFo
epeterson 2013/07/09 20:51:18 The cron_servlet_test likes to count up how many f
not at google - send to devlin 2013/07/09 23:11:55 ah right. and this does actually break the test? I
+
def CreateAppSamplesFileSystem(self, object_store_creator):
# TODO(kalman): CachingFileSystem wrapper for GithubFileSystem, but it's
# not supported yet (see comment there).
@@ -231,9 +234,17 @@ class CronServlet(Servlet):
compiled_host_fs_factory = CompiledFileSystem.Factory(
host_file_system,
object_store_creator)
+ branch_utility = self._delegate.CreateBranchUtility(object_store_creator)
+ def create_file_system(version):
+ return CachingFileSystem(
+ self._delegate.CreateFileSystemForBranch(
+ branch_utility.GetBranchForVersion(version)),
+ object_store_creator)
not at google - send to devlin 2013/07/03 19:54:56 let's introduce a class like HostFileSystemCreator
epeterson 2013/07/09 20:51:18 Done.
return ServerInstance(channel,
object_store_creator,
host_file_system,
app_samples_file_system,
'' if channel == 'stable' else '/%s' % channel,
- compiled_host_fs_factory)
+ compiled_host_fs_factory,
+ branch_utility,
+ create_file_system)

Powered by Google App Engine
This is Rietveld 408576698