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

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

Issue 12521030: Extension docs: Include sidenav in 404 pages (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 8 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
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 from fnmatch import fnmatch 5 from fnmatch import fnmatch
6 import mimetypes 6 import mimetypes
7 import os 7 import os
8 8
9 from file_system import FileNotFoundError 9 from file_system import FileNotFoundError
10 import compiled_file_system as compiled_fs 10 import compiled_file_system as compiled_fs
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 content = self._FetchStaticResource(path, response) 65 content = self._FetchStaticResource(path, response)
66 elif path.endswith('.html'): 66 elif path.endswith('.html'):
67 content = templates.Render(path) 67 content = templates.Render(path)
68 68
69 response.headers['x-frame-options'] = 'sameorigin' 69 response.headers['x-frame-options'] = 'sameorigin'
70 if content: 70 if content:
71 response.headers['cache-control'] = 'max-age=300' 71 response.headers['cache-control'] = 'max-age=300'
72 response.out.write(content) 72 response.out.write(content)
73 else: 73 else:
74 response.set_status(404); 74 response.set_status(404);
75 response.out.write(templates.Render('404')) 75 if path.startswith('apps/'):
76 response.out.write(templates.Render('apps/404'))
77 else:
78 response.out.write(templates.Render('extensions/404'))
not at google - send to devlin 2013/03/26 16:12:19 As a somewhat separate issue, we need to move away
方觉(Fang Jue) 2013/03/27 00:43:46 I tried to extract the first component of path and
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698