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

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

Issue 12996003: Dynamically generate a heading for Extension Docs API pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing up Offline/Online Access - Attempting to rework availability algorithm Created 7 years, 7 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 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 import logging 5 import logging
6 import time 6 import time
7 import traceback 7 import traceback
8 8
9 from app_yaml_helper import AppYamlHelper 9 from app_yaml_helper import AppYamlHelper
10 from appengine_wrappers import ( 10 from appengine_wrappers import (
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 channel, delegate.GetAppVersion(), safe_revision)) 210 channel, delegate.GetAppVersion(), safe_revision))
211 211
212 return self._CreateServerInstance(channel, safe_revision) 212 return self._CreateServerInstance(channel, safe_revision)
213 213
214 def _CreateObjectStoreCreator(self, channel): 214 def _CreateObjectStoreCreator(self, channel):
215 return ObjectStoreCreator(channel, start_empty=True) 215 return ObjectStoreCreator(channel, start_empty=True)
216 216
217 def _GetBranchForChannel(self, channel): 217 def _GetBranchForChannel(self, channel):
218 object_store_creator = self._CreateObjectStoreCreator(channel) 218 object_store_creator = self._CreateObjectStoreCreator(channel)
219 return (self._delegate.CreateBranchUtility(object_store_creator) 219 return (self._delegate.CreateBranchUtility(object_store_creator)
220 .GetBranchForChannel(channel)) 220 .GetChannelInfo(channel).branch)
221 221
222 def _CreateServerInstance(self, channel, revision): 222 def _CreateServerInstance(self, channel, revision):
223 object_store_creator = self._CreateObjectStoreCreator(channel) 223 object_store_creator = self._CreateObjectStoreCreator(channel)
224 host_file_system = CachingFileSystem( 224 host_file_system = CachingFileSystem(
225 self._delegate.CreateHostFileSystemForBranchAndRevision( 225 self._delegate.CreateHostFileSystemForBranchAndRevision(
226 self._GetBranchForChannel(channel), 226 self._GetBranchForChannel,
227 revision), 227 revision),
228 object_store_creator) 228 object_store_creator)
229 app_samples_file_system = self._delegate.CreateAppSamplesFileSystem( 229 app_samples_file_system = self._delegate.CreateAppSamplesFileSystem(
230 object_store_creator) 230 object_store_creator)
231 compiled_host_fs_factory = CompiledFileSystem.Factory( 231 compiled_host_fs_factory = CompiledFileSystem.Factory(
232 host_file_system, 232 host_file_system,
233 object_store_creator) 233 object_store_creator)
234 def create_file_system(branch):
235 return CachingFileSystem(SubversionFileSystem.Create(branch),
236 object_store_creator)
234 return ServerInstance(channel, 237 return ServerInstance(channel,
235 object_store_creator, 238 object_store_creator,
236 host_file_system, 239 host_file_system,
237 app_samples_file_system, 240 app_samples_file_system,
238 '/static' if channel == 'stable' else 241 '/static' if channel == 'stable' else
239 '/%s/static' % channel, 242 '/%s/static' % channel,
240 compiled_host_fs_factory) 243 compiled_host_fs_factory,
244 create_file_system)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698