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

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: 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..00b3e91818e2f5f4c2856359dec9bfccf3c65879 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 zip_data_source import ZipDataSource
EXTENSIONS_PATH = 'chrome/common/extensions'
DOCS_PATH = 'docs'
@@ -32,6 +33,7 @@ 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'
+ZIP_IGNORE_PATH = EXTENSIONS_PATH + '/' + DOCS_PATH
not at google - send to devlin 2012/07/11 00:35:09 The ignore path is prefix that should be stripped
cduvall 2012/07/11 20:56:30 Done.
# 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
@@ -61,8 +63,10 @@ class Server(webapp.RequestHandler):
intro_data_source,
cache_builder,
[PUBLIC_TEMPLATE_PATH, PRIVATE_TEMPLATE_PATH])
+ zip_data_source = ZipDataSource(cache_builder, DOCS_PATH, ZIP_IGNORE_PATH)
SERVER_INSTANCES[branch] = ServerInstance(
template_data_source,
+ zip_data_source,
cache_builder)
return SERVER_INSTANCES[branch]

Powered by Google App Engine
This is Rietveld 408576698