| Index: chrome/common/extensions/docs/server2/patch_servlet.py
|
| ===================================================================
|
| --- chrome/common/extensions/docs/server2/patch_servlet.py (revision 0)
|
| +++ chrome/common/extensions/docs/server2/patch_servlet.py (revision 0)
|
| @@ -0,0 +1,27 @@
|
| +# Copyright 2013 The Chromium Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +from appengine_url_fetcher import AppEngineUrlFetcher
|
| +from appengine_wrappers import GetAppVersion
|
| +from object_store_creator import ObjectStoreCreator
|
| +#from servlet import Servlet
|
| +
|
| +PATCH_BASEURL = '_patch/'
|
| +PATCH_CHANNEL_NAME = 'trunk'
|
| +
|
| +class PatchServlet(object):
|
| + '''Servlet which renders patched docs.
|
| + '''
|
| + @staticmethod
|
| + def SplitPatchFromPath(path):
|
| + if path.startswith(PATCH_BASEURL):
|
| + remaining_path = path.split(PATCH_BASEURL, 1)[1]
|
| + if not '/' in remaining_path:
|
| + return (None, None, None)
|
| + issue, real_path = remaining_path.split('/', 1)
|
| + if not issue.isdigit() or len(real_path) == 0:
|
| + return (None, None, None)
|
| + return (PATCH_CHANNEL_NAME, issue, real_path)
|
| + else:
|
| + return (None, None, None)
|
|
|
| Property changes on: chrome/common/extensions/docs/server2/patch_servlet.py
|
| ___________________________________________________________________
|
| Added: svn:eol-style
|
| + LF
|
|
|
|
|