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

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

Issue 10910208: Extensions Docs Server: Fix 404s from API links on the samples page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 PUBLIC_TEMPLATE_PATH) 126 PUBLIC_TEMPLATE_PATH)
127 intro_data_source_factory = IntroDataSource.Factory( 127 intro_data_source_factory = IntroDataSource.Factory(
128 cache_factory, 128 cache_factory,
129 [INTRO_PATH, ARTICLE_PATH]) 129 [INTRO_PATH, ARTICLE_PATH])
130 samples_data_source_factory = SamplesDataSource.Factory( 130 samples_data_source_factory = SamplesDataSource.Factory(
131 channel_name, 131 channel_name,
132 file_system, 132 file_system,
133 GITHUB_FILE_SYSTEM, 133 GITHUB_FILE_SYSTEM,
134 cache_factory, 134 cache_factory,
135 GITHUB_COMPILED_FILE_SYSTEM, 135 GITHUB_COMPILED_FILE_SYSTEM,
136 api_list_data_source_factory,
136 EXAMPLES_PATH) 137 EXAMPLES_PATH)
137 api_data_source_factory = APIDataSource.Factory(cache_factory, 138 api_data_source_factory = APIDataSource.Factory(cache_factory,
138 API_PATH, 139 API_PATH,
139 samples_data_source_factory) 140 samples_data_source_factory)
140 template_data_source_factory = TemplateDataSource.Factory( 141 template_data_source_factory = TemplateDataSource.Factory(
141 channel_name, 142 channel_name,
142 api_data_source_factory, 143 api_data_source_factory,
143 api_list_data_source_factory, 144 api_list_data_source_factory,
144 intro_data_source_factory, 145 intro_data_source_factory,
145 samples_data_source_factory, 146 samples_data_source_factory,
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 339
339 # Redirect paths like "directory" to "directory/". This is so relative 340 # Redirect paths like "directory" to "directory/". This is so relative
340 # file paths will know to treat this as a directory. 341 # file paths will know to treat this as a directory.
341 if os.path.splitext(path)[1] == '' and path[-1] != '/': 342 if os.path.splitext(path)[1] == '' and path[-1] != '/':
342 self.redirect(path + '/') 343 self.redirect(path + '/')
343 return 344 return
344 345
345 path = path.strip('/') 346 path = path.strip('/')
346 if not self._RedirectFromCodeDotGoogleDotCom(path): 347 if not self._RedirectFromCodeDotGoogleDotCom(path):
347 self._HandleGet(path) 348 self._HandleGet(path)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698