summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcduvall@chromium.org <cduvall@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-30 21:05:01 +0000
committercduvall@chromium.org <cduvall@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-30 21:05:01 +0000
commit1b583b2ed078c7102216d19c0627cb30a81c78b2 (patch)
tree1bc262c79eab3074169997a29bab579b8bc22a96
parent16798da8397a41082a554508d75147674ee00baa (diff)
downloadchromium_src-1b583b2ed078c7102216d19c0627cb30a81c78b2.zip
chromium_src-1b583b2ed078c7102216d19c0627cb30a81c78b2.tar.gz
chromium_src-1b583b2ed078c7102216d19c0627cb30a81c78b2.tar.bz2
Extensions Docs Server: Redirect special case URLs
'/', '/index.html' and '/apps.html' are now redirected to the right pages. Also moved apps/apps.html to extensions/apps.html. BUG=145621 Review URL: https://chromiumcodereview.appspot.com/10908021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154266 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-xchrome/common/extensions/docs/server2/converter.py1
-rw-r--r--chrome/common/extensions/docs/server2/handler.py15
-rw-r--r--chrome/common/extensions/docs/server2/templates/public/apps/apps.html1
-rw-r--r--chrome/common/extensions/docs/server2/templates/public/extensions/apps.html1
4 files changed, 17 insertions, 1 deletions
diff --git a/chrome/common/extensions/docs/server2/converter.py b/chrome/common/extensions/docs/server2/converter.py
index f06eaa9..ba1437f 100755
--- a/chrome/common/extensions/docs/server2/converter.py
+++ b/chrome/common/extensions/docs/server2/converter.py
@@ -25,6 +25,7 @@ from docs_server_utils import SanitizeAPIName
IGNORED_FILES = [
# These are custom files.
'404',
+ 'apps',
'apps_api_index',
'api_index',
'experimental',
diff --git a/chrome/common/extensions/docs/server2/handler.py b/chrome/common/extensions/docs/server2/handler.py
index 5425ec3..8b1df79 100644
--- a/chrome/common/extensions/docs/server2/handler.py
+++ b/chrome/common/extensions/docs/server2/handler.py
@@ -239,6 +239,18 @@ class Handler(webapp.RequestHandler):
self.response.out.write('Success')
+ def _RedirectSpecialCases(self, path):
+ google_dev_url = 'http://developer.google.com/chrome'
+ if path == '/' or path == '/index.html':
+ self.redirect(google_dev_url)
+ return True
+
+ if path == '/apps.html':
+ self.redirect('/apps/about_apps.html')
+ return True
+
+ return False
+
def _RedirectFromCodeDotGoogleDotCom(self, path):
if (not self.request.url.startswith(('http://code.google.com',
'https://code.google.com'))):
@@ -264,6 +276,9 @@ class Handler(webapp.RequestHandler):
def get(self):
path = self.request.path
+ if self._RedirectSpecialCases(path):
+ return
+
if path.startswith('/cron'):
self._HandleCron(path)
return
diff --git a/chrome/common/extensions/docs/server2/templates/public/apps/apps.html b/chrome/common/extensions/docs/server2/templates/public/apps/apps.html
deleted file mode 100644
index b6fd62f..0000000
--- a/chrome/common/extensions/docs/server2/templates/public/apps/apps.html
+++ /dev/null
@@ -1 +0,0 @@
-{{+partials.standard_apps_article article:intros.apps}}
diff --git a/chrome/common/extensions/docs/server2/templates/public/extensions/apps.html b/chrome/common/extensions/docs/server2/templates/public/extensions/apps.html
new file mode 100644
index 0000000..898f3fc
--- /dev/null
+++ b/chrome/common/extensions/docs/server2/templates/public/extensions/apps.html
@@ -0,0 +1 @@
+{{+partials.standard_extensions_article article:intros.apps}}