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

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

Issue 63203002: Docserver: Make the hand-written Cron methods run first rather than last, since (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: jeffrey Created 7 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 from HTMLParser import HTMLParser 5 from HTMLParser import HTMLParser
6 import mimetypes 6 import mimetypes
7 import logging 7 import logging
8 import os 8 import os
9 9
10 from compiled_file_system import SingleFile 10 from compiled_file_system import SingleFile
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 # Check for a zip file first, if zip is enabled. 78 # Check for a zip file first, if zip is enabled.
79 if self._directory_zipper and ext == '.zip': 79 if self._directory_zipper and ext == '.zip':
80 zip_future = self._directory_zipper.Zip(base) 80 zip_future = self._directory_zipper.Zip(base)
81 return Future(delegate=Gettable( 81 return Future(delegate=Gettable(
82 lambda: ContentAndType(zip_future.Get(), 'application/zip'))) 82 lambda: ContentAndType(zip_future.Get(), 'application/zip')))
83 83
84 return self._content_cache.GetFromFile(path, binary=True) 84 return self._content_cache.GetFromFile(path, binary=True)
85 85
86 def Cron(self): 86 def Cron(self):
87 # Running Refresh() on the file system is enough to pull GitHub content, 87 # Running Refresh() on the file system is enough to pull GitHub content,
88 # which is all we need for now. 88 # which is all we need for now while the full render-every-page cron step
89 self.file_system.Refresh().Get() 89 # is in effect.
90 # TODO(kalman): Walk over the whole filesystem and compile the content.
91 return self.file_system.Refresh()
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/server2/app.yaml ('k') | chrome/common/extensions/docs/server2/content_providers.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698