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

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

Issue 15009006: Docserver: refactor Servlet, ObjectStore, and ServerInstance architecture to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cduvall, redirect fix Created 7 years, 7 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/offline_file_system.py
diff --git a/chrome/common/extensions/docs/server2/offline_file_system.py b/chrome/common/extensions/docs/server2/offline_file_system.py
index a48cda036e06cc764d218cafad4671c9e7a98de6..563f8d72e874c913f7a81e643e3ade7c386e17c3 100644
--- a/chrome/common/extensions/docs/server2/offline_file_system.py
+++ b/chrome/common/extensions/docs/server2/offline_file_system.py
@@ -6,10 +6,10 @@ from file_system import FileSystem, FileNotFoundError
class OfflineFileSystem(FileSystem):
'''An offline FileSystem which masquerades as another file system. It throws
- FileNotFound error for all operations, and overrides GetName and GetVersion.
+ FileNotFound error for all operations, and overrides GetIdentity.
'''
- def __init__(self, cls):
- self._cls = cls
+ def __init__(self, fs):
+ self._fs = fs
def Read(self, paths, binary=False):
raise FileNotFoundError('File system is offline, cannot read %s' % paths)
@@ -17,7 +17,5 @@ class OfflineFileSystem(FileSystem):
def Stat(self, path):
raise FileNotFoundError('File system is offline, cannot read %s' % path)
- # HACK: despite GetName being a @classmethod, these need to be instance
- # methods so that we can grab the name from the class given on construction.
- def GetName(self):
- return self._cls.GetName()
+ def GetIdentity(self):
+ return self._fs.GetIdentity()

Powered by Google App Engine
This is Rietveld 408576698