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

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

Issue 12996003: Dynamically generate a heading for Extension Docs API pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing up Offline/Online Access - Attempting to rework availability algorithm Created 7 years, 7 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 5929ac9e5d924c62820b67bbd70e39453b709153..9916a2f2030001277cea4669cc0b6b0ecda252a8 100644
--- a/chrome/common/extensions/docs/server2/cron_servlet.py
+++ b/chrome/common/extensions/docs/server2/cron_servlet.py
@@ -217,13 +217,13 @@ class CronServlet(Servlet):
def _GetBranchForChannel(self, channel):
object_store_creator = self._CreateObjectStoreCreator(channel)
return (self._delegate.CreateBranchUtility(object_store_creator)
- .GetBranchForChannel(channel))
+ .GetChannelInfo(channel).branch)
def _CreateServerInstance(self, channel, revision):
object_store_creator = self._CreateObjectStoreCreator(channel)
host_file_system = CachingFileSystem(
self._delegate.CreateHostFileSystemForBranchAndRevision(
- self._GetBranchForChannel(channel),
+ self._GetBranchForChannel,
revision),
object_store_creator)
app_samples_file_system = self._delegate.CreateAppSamplesFileSystem(
@@ -231,10 +231,14 @@ class CronServlet(Servlet):
compiled_host_fs_factory = CompiledFileSystem.Factory(
host_file_system,
object_store_creator)
+ def create_file_system(branch):
+ return CachingFileSystem(SubversionFileSystem.Create(branch),
+ object_store_creator)
return ServerInstance(channel,
object_store_creator,
host_file_system,
app_samples_file_system,
'/static' if channel == 'stable' else
'/%s/static' % channel,
- compiled_host_fs_factory)
+ compiled_host_fs_factory,
+ create_file_system)

Powered by Google App Engine
This is Rietveld 408576698