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

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

Issue 10808065: Extensions Docs Server: TDS fix, no local caching (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/local_file_system.py
diff --git a/chrome/common/extensions/docs/server2/local_file_system.py b/chrome/common/extensions/docs/server2/local_file_system.py
index 39b6360bbaeb177b26e949b3d4e1595cf7f9f7d0..5f6d98de82108a5faccb4e7c2d0e51c8548d9f06 100644
--- a/chrome/common/extensions/docs/server2/local_file_system.py
+++ b/chrome/common/extensions/docs/server2/local_file_system.py
@@ -11,8 +11,10 @@ class LocalFileSystem(FileSystem):
"""FileSystem implementation which fetches resources from the local
filesystem.
"""
- def __init__(self, base_path):
+ def __init__(self, base_path, inc_version=True):
self._base_path = self._ConvertToFilepath(base_path)
+ self._inc_version = inc_version
+ self._version = 0
def _ConvertToFilepath(self, path):
return path.replace('/', os.sep)
@@ -41,4 +43,6 @@ class LocalFileSystem(FileSystem):
return Future(value=result)
def Stat(self, path):
- return self.StatInfo(0)
+ if self._inc_version:
+ self._version += 1
+ return self.StatInfo(self._version)
not at google - send to devlin 2012/07/23 13:13:27 I don't understand this inc_version stuff. This is
cduvall 2012/07/23 19:04:41 Done.

Powered by Google App Engine
This is Rietveld 408576698