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

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

Issue 218363002: Docs: Use ETags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 | Annotate | Revision Log
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 render_servlet import RenderServlet 5 from render_servlet import RenderServlet
6 from server_instance import ServerInstance 6 from server_instance import ServerInstance
7 from servlet import Request 7 from servlet import Request
8 8
9 class _LocalRenderServletDelegate(object): 9 class _LocalRenderServletDelegate(object):
10 def CreateServerInstance(self): 10 def CreateServerInstance(self):
11 return ServerInstance.ForLocal() 11 return ServerInstance.ForLocal()
12 12
13 class LocalRenderer(object): 13 class LocalRenderer(object):
14 '''Renders pages fetched from the local file system. 14 '''Renders pages fetched from the local file system.
15 ''' 15 '''
16 @staticmethod 16 @staticmethod
17 def Render(path): 17 def Render(path, headers=None):
18 assert not '\\' in path 18 assert not '\\' in path
19 return RenderServlet(Request.ForTest(path), 19 return RenderServlet(Request.ForTest(path, headers=headers),
20 _LocalRenderServletDelegate()).Get() 20 _LocalRenderServletDelegate()).Get()
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/server2/cron.yaml ('k') | chrome/common/extensions/docs/server2/patch_servlet_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698