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

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

Issue 68873003: Docserver: Serve docs out of src/ not src/chrome/common/extensions. This allows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix samples Created 7 years, 1 month 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/path_canonicalizer.py
diff --git a/chrome/common/extensions/docs/server2/path_canonicalizer.py b/chrome/common/extensions/docs/server2/path_canonicalizer.py
index d4f4b497c77776eaace2d12c06839879789a08fa..219e30de59a90436eb50ac53ba5e678c49008b91 100644
--- a/chrome/common/extensions/docs/server2/path_canonicalizer.py
+++ b/chrome/common/extensions/docs/server2/path_canonicalizer.py
@@ -9,9 +9,10 @@ import traceback
from branch_utility import BranchUtility
from compiled_file_system import CompiledFileSystem, SingleFile
+from extensions_paths import PUBLIC_TEMPLATES
from file_system import FileNotFoundError
from third_party.json_schema_compiler.model import UnixName
-import svn_constants
+
def _SimplifyFileName(file_name):
return (posixpath.splitext(file_name)[0]
@@ -20,6 +21,7 @@ def _SimplifyFileName(file_name):
.replace('-', '')
.replace('_', ''))
+
class PathCanonicalizer(object):
'''Transforms paths into their canonical forms. Since the dev server has had
many incarnations - e.g. there didn't use to be apps/ - there may be old
@@ -82,9 +84,9 @@ class PathCanonicalizer(object):
try:
apps_public = self._public_apis.GetFromFileListing(
- '/'.join((svn_constants.PUBLIC_TEMPLATE_PATH, 'apps'))).Get()
+ '%s/apps' % PUBLIC_TEMPLATES).Get()
extensions_public = self._public_apis.GetFromFileListing(
- '/'.join((svn_constants.PUBLIC_TEMPLATE_PATH, 'extensions'))).Get()
+ '%s/extensions' % PUBLIC_TEMPLATES).Get()
except FileNotFoundError:
# Probably offline.
logging.warning(traceback.format_exc())

Powered by Google App Engine
This is Rietveld 408576698