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

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

Issue 10829348: Extensions Docs Server: Large performance increase (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: server is fast Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/server2/file_system.py
diff --git a/chrome/common/extensions/docs/server2/file_system.py b/chrome/common/extensions/docs/server2/file_system.py
index 6d3357b0ea6112fa8907ab89c0ad6bbb06e87a1b..fe849f7a25df07d9515399f0ade38b91c142d283 100644
--- a/chrome/common/extensions/docs/server2/file_system.py
+++ b/chrome/common/extensions/docs/server2/file_system.py
@@ -8,6 +8,13 @@ class FileNotFoundError(Exception):
def __init__(self, filename):
Exception.__init__(self, filename)
+class StatInfo(object):
+ """The result of calling Stat on a FileSystem.
+ """
+ def __init__(self, version, child_versions=None):
+ self.version = version
+ self.child_versions = child_versions
+
def _ProcessFileData(data, path):
if os.path.splitext(path)[-1] not in ['.js', '.html', '.json']:
return data
@@ -19,12 +26,6 @@ def _ProcessFileData(data, path):
class FileSystem(object):
"""A FileSystem interface that can read files and directories.
"""
- class StatInfo(object):
- """The result of calling Stat on a FileSystem.
- """
- def __init__(self, version, child_versions=None):
- self.version = version
- self.child_versions = child_versions
def Read(self, paths, binary=False):
"""Reads each file in paths and returns a dictionary mapping the path to the

Powered by Google App Engine
This is Rietveld 408576698