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

Side by Side Diff: chrome/common/extensions/docs/server2/caching_file_system.py

Issue 575613003: Docserver: Gitiles auth and cron refactoring. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import posixpath 5 import posixpath
6 import sys 6 import sys
7 7
8 from file_system import FileSystem, StatInfo, FileNotFoundError 8 from file_system import FileSystem, StatInfo, FileNotFoundError
9 from future import All, Future 9 from future import All, Future
10 from path_util import AssertIsDirectory, IsDirectory, ToDirectory 10 from path_util import AssertIsDirectory, IsDirectory, ToDirectory
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 for f in self.ReadSingle(root).Get(): 162 for f in self.ReadSingle(root).Get():
163 if IsDirectory(f): 163 if IsDirectory(f):
164 dirs.append(f) 164 dirs.append(f)
165 else: 165 else:
166 files.append(f) 166 files.append(f)
167 # Update the cache. This is a root -> (dirs, files, version) mapping. 167 # Update the cache. This is a root -> (dirs, files, version) mapping.
168 self._walk_cache.Set(root, (dirs, files, root_stat.version)) 168 self._walk_cache.Set(root, (dirs, files, root_stat.version))
169 return dirs, files 169 return dirs, files
170 return self._file_system.Walk(root, depth=depth, file_lister=file_lister) 170 return self._file_system.Walk(root, depth=depth, file_lister=file_lister)
171 171
172 def GetCommitID(self):
173 return self._file_system.GetCommitID()
174
175 def GetPreviousCommitID(self):
176 return self._file_system.GetPreviousCommitID()
177
172 def GetIdentity(self): 178 def GetIdentity(self):
173 return self._file_system.GetIdentity() 179 return self._file_system.GetIdentity()
174 180
175 def __repr__(self): 181 def __repr__(self):
176 return '%s of <%s>' % (type(self).__name__, repr(self._file_system)) 182 return '%s of <%s>' % (type(self).__name__, repr(self._file_system))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698