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

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

Issue 10834144: Extensions Docs Server: Split apps from extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 8 years, 4 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/handler.py
diff --git a/chrome/common/extensions/docs/server2/handler.py b/chrome/common/extensions/docs/server2/handler.py
index 92e7c77e7c7c399ce7b59ccba2ababe006d84b6d..a2d9ee98904250afbd4e004bab2234632bd3dac2 100644
--- a/chrome/common/extensions/docs/server2/handler.py
+++ b/chrome/common/extensions/docs/server2/handler.py
@@ -113,8 +113,10 @@ class Handler(webapp.RequestHandler):
def _NavigateToPath(self, path):
channel_name, real_path = BRANCH_UTILITY.SplitChannelNameFromPath(path)
branch = BRANCH_UTILITY.GetBranchNumberForChannelName(channel_name)
- if real_path == '':
- real_path = 'index.html'
+ if real_path.strip('/') == 'apps':
+ real_path = 'apps/index.html'
+ if real_path.strip('/') == 'extensions':
+ real_path = 'extensions/index.html'
not at google - send to devlin 2012/08/06 22:01:24 would be nice to do a webserver-y kind of thing an
cduvall 2012/08/06 22:25:45 Done.
# TODO: This leaks Server instances when branch bumps.
_GetInstanceForBranch(branch, self._local_path).Get(real_path,
self.request,
@@ -125,16 +127,16 @@ class Handler(webapp.RequestHandler):
if '_ah/warmup' in path:
logging.info('Warmup request.')
if DEFAULT_BRANCH != 'local':
- self._NavigateToPath('trunk/samples.html')
- self._NavigateToPath('dev/samples.html')
- self._NavigateToPath('beta/samples.html')
- self._NavigateToPath('stable/samples.html')
+ self._NavigateToPath('extensions/trunk/samples.html')
+ self._NavigateToPath('extensions/dev/samples.html')
+ self._NavigateToPath('extensions/beta/samples.html')
+ self._NavigateToPath('extensions/stable/samples.html')
return
# Redirect paths like "directory" to "directory/". This is so relative file
# paths will know to treat this as a directory.
if os.path.splitext(path)[1] == '' and path[-1] != '/':
self.redirect(path + '/')
- path = path.replace('/chrome/extensions/', '')
+ path = path.replace('/chrome/', '')
path = path.strip('/')
self._NavigateToPath(path)

Powered by Google App Engine
This is Rietveld 408576698