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

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

Issue 26418002: Docserver: Pull knowledge of host file systems into a single (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename to provider 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_iterator.py
diff --git a/chrome/common/extensions/docs/server2/host_file_system_iterator.py b/chrome/common/extensions/docs/server2/host_file_system_iterator.py
index 20c0741c774ffa55f3227194a3eaa4f8fb28cf26..1ecbb48da161b9c34a26c6cc928e80754e3bd981 100644
--- a/chrome/common/extensions/docs/server2/host_file_system_iterator.py
+++ b/chrome/common/extensions/docs/server2/host_file_system_iterator.py
@@ -10,9 +10,8 @@ class HostFileSystemIterator(object):
ascending (oldest to newest version) and descending order.
'''
- def __init__(self, file_system_creator, host_file_system, branch_utility):
- self._file_system_creator = file_system_creator
- self._host_file_system = host_file_system
+ def __init__(self, file_system_provider, branch_utility):
+ self._file_system_provider = file_system_provider
self._branch_utility = branch_utility
@memoize
@@ -24,14 +23,8 @@ class HostFileSystemIterator(object):
at each call of ForEach, but the data isn't going to change between calls.
Use |branch| to memoize the created file systems.
'''
- if branch == 'trunk':
- # Don't create a new file system for trunk, since there is a bug with the
- # current architecture and design of HostFileSystemCreator, where
- # creating 'trunk' ignores the pinned revision (in fact, it bypasses
- # every difference including whether the file system is patched).
- # TODO(kalman): Fix HostFileSystemCreator and update this comment.
- return self._host_file_system
- return self._file_system_creator.Create(branch)
+ return (self._file_system_provider.GetTrunk() if branch == 'trunk' else
+ self._file_system_provider.GetBranch(branch))
def _ForEach(self, channel_info, callback, get_next):
'''Iterates through a sequence of file systems defined by |get_next| until

Powered by Google App Engine
This is Rietveld 408576698