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

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: clean up and tests 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..d4cfa15cc20c55a9605b75e388f28f4a715f93a6 100755
--- a/chrome/common/extensions/docs/server2/echo_handler.py
+++ b/chrome/common/extensions/docs/server2/echo_handler.py
@@ -22,9 +22,11 @@ from api_data_source import APIDataSource
from fetcher_cache import FetcherCache
from intro_data_source import IntroDataSource
from local_fetcher import LocalFetcher
+from samples_data_source import SamplesDataSource
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 +34,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
@@ -55,14 +59,23 @@ class Server(webapp.RequestHandler):
cache_builder = FetcherCache.Builder(fetcher, cache_timeout_seconds)
api_data_source = APIDataSource(cache_builder, API_PATH)
intro_data_source = IntroDataSource(cache_builder, INTRO_PATH)
+ samples_data_source = SamplesDataSource(fetcher,
+ cache_builder,
+ EXAMPLES_PATH)
template_data_source = TemplateDataSource(
branch,
api_data_source,
intro_data_source,
+ samples_data_source,
cache_builder,
[PUBLIC_TEMPLATE_PATH, PRIVATE_TEMPLATE_PATH])
+ example_zipper = ExampleZipper(fetcher,
+ cache_builder,
+ DOCS_PATH,
+ EXAMPLES_PATH)
SERVER_INSTANCES[branch] = ServerInstance(
template_data_source,
+ example_zipper,
cache_builder)
return SERVER_INSTANCES[branch]
« no previous file with comments | « chrome/common/extensions/docs/server2/api_data_source.py ('k') | chrome/common/extensions/docs/server2/example_zipper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698