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

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

Issue 10804036: Extensions Docs Server: Internationalized samples (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: SamplesDataSource.Factory 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/file_system_cache.py
diff --git a/chrome/common/extensions/docs/server2/file_system_cache.py b/chrome/common/extensions/docs/server2/file_system_cache.py
index b8e8f9492f6170981b76809cf27a4ba1bb7b14b0..a63b00cf9c76ff794a36b2b54703af66e025f63e 100644
--- a/chrome/common/extensions/docs/server2/file_system_cache.py
+++ b/chrome/common/extensions/docs/server2/file_system_cache.py
@@ -26,9 +26,6 @@ class FileSystemCache(object):
self._populate_function = populate_function
self._cache = {}
- def _FetchFile(self, filename):
- return self._file_system.Read([filename]).Get()[filename]
-
def _RecursiveList(self, files):
all_files = files[:]
dirs = {}
@@ -49,7 +46,7 @@ class FileSystemCache(object):
self._cache.pop(path)
else:
return self._cache[path]._cache_data
- cache_data = self._FetchFile(path)
+ cache_data = self._file_system.ReadSingleFile(path)
self._cache[path] = self._CacheEntry(self._populate_function(cache_data),
version)
return self._cache[path]._cache_data
@@ -66,7 +63,8 @@ class FileSystemCache(object):
self._cache.pop(path)
else:
return self._cache[path]._cache_data
- cache_data = self._RecursiveList([path + f for f in self._FetchFile(path)])
+ cache_data = self._RecursiveList(
+ [path + f for f in self._file_system.ReadSingleFile(path)])
self._cache[path] = self._CacheEntry(self._populate_function(cache_data),
version)
return self._cache[path]._cache_data

Powered by Google App Engine
This is Rietveld 408576698