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

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

Issue 10825067: Extensions Docs Server: Apps samples page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no more zip file Created 8 years, 4 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 | Annotate | Revision Log
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 os 5 import os
6 6
7 def _ProcessFileData(data, path): 7 def _ProcessFileData(data, path):
8 if os.path.splitext(path)[-1] not in ['.js', '.html', '.json']: 8 if os.path.splitext(path)[-1] not in ['.js', '.html', '.json']:
9 return data 9 return data
10 try: 10 try:
(...skipping 24 matching lines...) Expand all
35 def ReadSingle(self, path): 35 def ReadSingle(self, path):
36 """Reads a single file from the FileSystem. 36 """Reads a single file from the FileSystem.
37 """ 37 """
38 return self.Read([path]).Get()[path] 38 return self.Read([path]).Get()[path]
39 39
40 def Stat(self, path): 40 def Stat(self, path):
41 """Gets the version number of |path| if it is a directory, or the parent 41 """Gets the version number of |path| if it is a directory, or the parent
42 directory if it is a file. 42 directory if it is a file.
43 """ 43 """
44 raise NotImplementedError() 44 raise NotImplementedError()
45
46 def CheckStat(self, version1, version2):
47 """Returns True if cache is expired.
48 """
49 return version1 > version2
not at google - send to devlin 2012/08/02 13:27:48 This won't work for git.
cduvall 2012/08/02 23:20:01 I had this overridden in GithubFileSystem using !=
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698