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

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

Issue 26538009: Docserver: make file_system a property of Create (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: niggles Created 7 years, 2 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/host_file_system_provider.py
diff --git a/chrome/common/extensions/docs/server2/host_file_system_provider.py b/chrome/common/extensions/docs/server2/host_file_system_provider.py
index 3b8cf290b66232d48ce065c0a735809acd622fa4..407e0ecd94f7af69e5300f20d645398319a71bfc 100644
--- a/chrome/common/extensions/docs/server2/host_file_system_provider.py
+++ b/chrome/common/extensions/docs/server2/host_file_system_provider.py
@@ -92,19 +92,21 @@ class HostFileSystemProvider(object):
return CachingFileSystem(file_system, self._object_store_creator)
@staticmethod
- def ForLocal(object_store_creator):
+ def ForLocal(object_store_creator, **optargs):
'''Used in creating a server instance on localhost.
'''
return HostFileSystemProvider(
object_store_creator,
- constructor_for_test=lambda **_: LocalFileSystem.Create())
+ constructor_for_test=lambda **_: LocalFileSystem.Create(),
+ **optargs)
@staticmethod
- def ForTest(file_system, object_store_creator):
+ def ForTest(file_system, object_store_creator, **optargs):
'''Used in creating a test server instance. The HostFileSystemProvider
returned here will always return |file_system| when its Create() method is
called.
'''
return HostFileSystemProvider(
object_store_creator,
- constructor_for_test=lambda **_: file_system)
+ constructor_for_test=lambda **_: file_system,
+ **optargs)
« no previous file with comments | « chrome/common/extensions/docs/server2/file_system.py ('k') | chrome/common/extensions/docs/server2/instance_servlet.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698