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

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

Issue 14267024: Devserver: have a separate ObjectStore namespace (both memcache and datastore) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove _CheckVersions Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/server2/compiled_file_system.py
diff --git a/chrome/common/extensions/docs/server2/compiled_file_system.py b/chrome/common/extensions/docs/server2/compiled_file_system.py
index 1ee0887cfa0b654328ddfb86cd0caf4754ac33a6..283ac6da09eaa57e7002dcb736ba9e9d65477b38 100644
--- a/chrome/common/extensions/docs/server2/compiled_file_system.py
+++ b/chrome/common/extensions/docs/server2/compiled_file_system.py
@@ -23,12 +23,12 @@ class CompiledFileSystem(object):
self._store_type = store_type
self._identity_instance = None
- def Create(self, populate_function, cls, category=None, version=None):
+ def Create(self, populate_function, cls, category=None):
"""Create a CompiledFileSystem that populates the cache by calling
|populate_function| with (path, data), where |data| is the data that was
fetched from |path|.
The namespace for the file system is derived like ObjectStoreCreator: from
- |cls| along with an optional |category| and |version|.
+ |cls| along with an optional |category|.
"""
assert isinstance(cls, type)
assert not cls.__name__[0].islower() # guard against non-class types
@@ -36,10 +36,7 @@ class CompiledFileSystem(object):
if category is not None:
full_name = '%s/%s' % (full_name, category)
# TODO(kalman): Fix ServerInstance.CreateForTest to not give an empty FS.
- if self._file_system and self._file_system.GetVersion() is not None:
- version = (self._file_system.GetVersion() +
- (version if version is not None else 0))
- return self._Create(populate_function, full_name, version=version)
+ return self._Create(populate_function, full_name)
def GetOrCreateIdentity(self):
'''Handy helper to get or create the identity compiled file system.
@@ -50,17 +47,15 @@ class CompiledFileSystem(object):
self._identity_instance = self._Create(lambda _, x: x, 'id')
return self._identity_instance
- def _Create(self, populate_function, full_name, version=None):
+ def _Create(self, populate_function, full_name):
object_store_creator = self._object_store_creator_factory.Create(
CompiledFileSystem,
store_type=self._store_type)
return CompiledFileSystem(
self._file_system,
populate_function,
- object_store_creator.Create(category='%s/file' % full_name,
- version=version),
- object_store_creator.Create(category='%s/list' % full_name,
- version=version))
+ object_store_creator.Create(category='%s/file' % full_name),
+ object_store_creator.Create(category='%s/list' % full_name))
def __init__(self,
file_system,

Powered by Google App Engine
This is Rietveld 408576698