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

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

Issue 10689144: Extensions Docs Server: Samples zip files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Samples page with full links and descriptions Created 8 years, 5 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/echo_handler.py
diff --git a/chrome/common/extensions/docs/server2/echo_handler.py b/chrome/common/extensions/docs/server2/echo_handler.py
index cd99c4c76982b7d7d56cd02b8f4a5e12fc8cb120..2c72d5e23f47852721fc62de994d4f5ddb9fcfbd 100755
--- a/chrome/common/extensions/docs/server2/echo_handler.py
+++ b/chrome/common/extensions/docs/server2/echo_handler.py
@@ -25,6 +25,7 @@ from local_fetcher import LocalFetcher
from server_instance import ServerInstance
from subversion_fetcher import SubversionFetcher
from template_data_source import TemplateDataSource
+from example_zipper import ExampleZipper
EXTENSIONS_PATH = 'chrome/common/extensions'
DOCS_PATH = 'docs'
@@ -32,6 +33,8 @@ API_PATH = 'api'
INTRO_PATH = DOCS_PATH + '/server2/templates/intros'
PUBLIC_TEMPLATE_PATH = DOCS_PATH + '/server2/templates/public'
PRIVATE_TEMPLATE_PATH = DOCS_PATH + '/server2/templates/private'
+EXAMPLES_PATH = 'examples'
+FULL_EXAMPLES_PATH = DOCS_PATH + '/' + EXAMPLES_PATH
# The branch that the server will default to when no branch is specified in the
# URL. This is necessary because it is not possible to pass flags to the script
@@ -60,9 +63,12 @@ class Server(webapp.RequestHandler):
api_data_source,
intro_data_source,
cache_builder,
+ FULL_EXAMPLES_PATH,
[PUBLIC_TEMPLATE_PATH, PRIVATE_TEMPLATE_PATH])
+ example_zipper = ExampleZipper(cache_builder, DOCS_PATH, EXAMPLES_PATH)
SERVER_INSTANCES[branch] = ServerInstance(
template_data_source,
+ example_zipper,
cache_builder)
return SERVER_INSTANCES[branch]

Powered by Google App Engine
This is Rietveld 408576698