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

Unified Diff: chrome/common/extensions/docs/server2/patch_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/patch_servlet.py
diff --git a/chrome/common/extensions/docs/server2/patch_servlet.py b/chrome/common/extensions/docs/server2/patch_servlet.py
index 008644554e8d22f0642dc55d3e57cca2367d44a5..f32ea7db4f34afc56f9beb86030eaac16502e591 100644
--- a/chrome/common/extensions/docs/server2/patch_servlet.py
+++ b/chrome/common/extensions/docs/server2/patch_servlet.py
@@ -19,6 +19,7 @@ from object_store_creator import ObjectStoreCreator
from patched_file_system import PatchedFileSystem
from server_instance import ServerInstance
from servlet import Request, Response, Servlet
+from subversion_file_system import SubversionFileSystem
import svn_constants
import url_constants
@@ -53,13 +54,17 @@ class _PatchServletDelegate(RenderServlet.Delegate):
compiled_fs_factory = ChainedCompiledFileSystem.Factory(
[(patched_compiled_fs_factory, patched_file_system),
(base_compiled_fs_factory, base_file_system)])
+ def create_file_system(branch):
+ return CachingFileSystem(SubversionFileSystem.Create(branch),
+ object_store_creator)
return ServerInstance(channel,
object_store_creator,
patched_file_system,
self._delegate.CreateAppSamplesFileSystem(
base_object_store_creator),
'/_patch/%s/static' % self._issue,
- compiled_fs_factory)
+ compiled_fs_factory,
+ create_file_system)
class PatchServlet(Servlet):
'''Servlet which renders patched docs.

Powered by Google App Engine
This is Rietveld 408576698