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

Unified Diff: chrome/common/extensions/docs/server2/instance_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: AvailabilityFinder Overhaul; Removing ConfigureFakeFetchers() calls 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/instance_servlet.py
diff --git a/chrome/common/extensions/docs/server2/instance_servlet.py b/chrome/common/extensions/docs/server2/instance_servlet.py
index 9710de6fd3d3451b2fb9afa5a3a97ee8525c46ff..2846a92c2cb773402afca4b0f56e89f1d311865b 100644
--- a/chrome/common/extensions/docs/server2/instance_servlet.py
+++ b/chrome/common/extensions/docs/server2/instance_servlet.py
@@ -37,13 +37,18 @@ class _OfflineRenderServletDelegate(RenderServlet.Delegate):
@memoize
def CreateServerInstanceForChannel(self, channel):
object_store_creator = ObjectStoreCreator(channel, start_empty=False)
- branch = (self._delegate.CreateBranchUtility(object_store_creator)
- .GetBranchForChannel(channel))
+ branch_utility = self._delegate.CreateBranchUtility(object_store_creator)
+ branch = branch_utility.GetChannelInfo(channel).branch
host_file_system = CachingFileSystem(
OfflineFileSystem(self._delegate.CreateHostFileSystemForBranch(branch)),
object_store_creator)
app_samples_file_system = self._delegate.CreateAppSamplesFileSystem(
object_store_creator)
+ def create_file_system(version):
+ return CachingFileSystem(
+ OfflineFileSystem(self._delegate.CreateHostFileSystemForBranch(
+ branch_utility.GetBranchNumberForVersion(version))),
+ object_store_creator)
compiled_host_fs_factory = CompiledFileSystem.Factory(
host_file_system,
object_store_creator)
@@ -52,7 +57,9 @@ class _OfflineRenderServletDelegate(RenderServlet.Delegate):
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)
class InstanceServlet(object):
'''Servlet for running on normal AppEngine instances.

Powered by Google App Engine
This is Rietveld 408576698