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

Side by Side Diff: chrome/common/extensions/docs/server2/handler.py

Issue 11315018: Extensions Docs Server: Generalize $ref's to work for any schema node (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 import os 6 import os
7 from StringIO import StringIO 7 from StringIO import StringIO
8 import sys 8 import sys
9 9
10 from appengine_wrappers import webapp 10 from appengine_wrappers import webapp
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 file_system = _CreateMemcacheFileSystem(branch, branch_memcache) 124 file_system = _CreateMemcacheFileSystem(branch, branch_memcache)
125 125
126 cache_factory = CompiledFileSystem.Factory(file_system, branch_memcache) 126 cache_factory = CompiledFileSystem.Factory(file_system, branch_memcache)
127 api_list_data_source_factory = APIListDataSource.Factory(cache_factory, 127 api_list_data_source_factory = APIListDataSource.Factory(cache_factory,
128 file_system, 128 file_system,
129 API_PATH, 129 API_PATH,
130 PUBLIC_TEMPLATE_PATH) 130 PUBLIC_TEMPLATE_PATH)
131 intro_data_source_factory = IntroDataSource.Factory( 131 intro_data_source_factory = IntroDataSource.Factory(
132 cache_factory, 132 cache_factory,
133 [INTRO_PATH, ARTICLE_PATH]) 133 [INTRO_PATH, ARTICLE_PATH])
134 api_data_source_factory = APIDataSource.Factory(
135 cache_factory,
136 API_PATH,
137 api_list_data_source_factory.Create())
not at google - send to devlin 2012/11/02 17:26:48 Looks suspicious. Why isn't APIDataSource.Factory
cduvall 2012/11/03 01:30:05 Done.
134 samples_data_source_factory = SamplesDataSource.Factory( 138 samples_data_source_factory = SamplesDataSource.Factory(
135 channel_name, 139 channel_name,
136 file_system, 140 file_system,
137 GITHUB_FILE_SYSTEM, 141 GITHUB_FILE_SYSTEM,
138 cache_factory, 142 cache_factory,
139 GITHUB_COMPILED_FILE_SYSTEM, 143 GITHUB_COMPILED_FILE_SYSTEM,
144 api_data_source_factory,
140 api_list_data_source_factory, 145 api_list_data_source_factory,
141 EXAMPLES_PATH) 146 EXAMPLES_PATH)
142 api_data_source_factory = APIDataSource.Factory(cache_factory,
143 API_PATH,
144 samples_data_source_factory)
145 template_data_source_factory = TemplateDataSource.Factory( 147 template_data_source_factory = TemplateDataSource.Factory(
146 channel_name, 148 channel_name,
147 api_data_source_factory, 149 api_data_source_factory,
148 api_list_data_source_factory, 150 api_list_data_source_factory,
149 intro_data_source_factory, 151 intro_data_source_factory,
150 samples_data_source_factory, 152 samples_data_source_factory,
151 KNOWN_ISSUES_DATA_SOURCE, 153 KNOWN_ISSUES_DATA_SOURCE,
152 cache_factory, 154 cache_factory,
153 PUBLIC_TEMPLATE_PATH, 155 PUBLIC_TEMPLATE_PATH,
154 PRIVATE_TEMPLATE_PATH) 156 PRIVATE_TEMPLATE_PATH)
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 346
345 # Redirect paths like "directory" to "directory/". This is so relative 347 # Redirect paths like "directory" to "directory/". This is so relative
346 # file paths will know to treat this as a directory. 348 # file paths will know to treat this as a directory.
347 if os.path.splitext(path)[1] == '' and path[-1] != '/': 349 if os.path.splitext(path)[1] == '' and path[-1] != '/':
348 self.redirect(path + '/') 350 self.redirect(path + '/')
349 return 351 return
350 352
351 path = path.strip('/') 353 path = path.strip('/')
352 if not self._RedirectFromCodeDotGoogleDotCom(path): 354 if not self._RedirectFromCodeDotGoogleDotCom(path):
353 self._HandleGet(path) 355 self._HandleGet(path)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698