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

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

Issue 385703005: Docserver: Modify doc inlining so all relevant data is present in availability_finder.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final nit Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/common/extensions/docs/server2/api_models.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 from copy import copy 5 from copy import copy
6 import logging 6 import logging
7 import os 7 import os
8 import posixpath 8 import posixpath
9 9
10 from data_source import DataSource 10 from data_source import DataSource
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 return 'properties' 210 return 'properties'
211 raise AssertionError('Could not classify node %s' % self) 211 raise AssertionError('Could not classify node %s' % self)
212 212
213 def GetAvailability(self): 213 def GetAvailability(self):
214 '''Returns availability information for this node. 214 '''Returns availability information for this node.
215 ''' 215 '''
216 if self._GetCategory() in self._ignored_categories: 216 if self._GetCategory() in self._ignored_categories:
217 return None 217 return None
218 node_availability = self._LookupAvailability(self._lookup_path) 218 node_availability = self._LookupAvailability(self._lookup_path)
219 if node_availability is None: 219 if node_availability is None:
220 if not IsReleaseServer(): 220 logging.warning('No availability found for: %s' % self)
221 # Bad, and happens a lot :(
222 logging.warning('No availability found for: %s' % self)
223 return None 221 return None
224 222
225 parent_node_availability = self._LookupAvailability(self._GetParentPath()) 223 parent_node_availability = self._LookupAvailability(self._GetParentPath())
226 # If the parent node availability couldn't be found, something 224 # If the parent node availability couldn't be found, something
227 # is very wrong. 225 # is very wrong.
228 assert parent_node_availability is not None 226 assert parent_node_availability is not None
229 227
230 # Only render this node's availability if it differs from the parent 228 # Only render this node's availability if it differs from the parent
231 # node's availability. 229 # node's availability.
232 if node_availability == parent_node_availability: 230 if node_availability == parent_node_availability:
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 getter = lambda: 0 768 getter = lambda: 0
771 getter.get = lambda api_name: self._GetImpl(platform, api_name).Get() 769 getter.get = lambda api_name: self._GetImpl(platform, api_name).Get()
772 return getter 770 return getter
773 771
774 def Cron(self): 772 def Cron(self):
775 futures = [] 773 futures = []
776 for platform in GetPlatforms(): 774 for platform in GetPlatforms():
777 futures += [self._GetImpl(platform, name) 775 futures += [self._GetImpl(platform, name)
778 for name in self._platform_bundle.GetAPIModels(platform).GetNames()] 776 for name in self._platform_bundle.GetAPIModels(platform).GetNames()]
779 return Collect(futures, except_pass=FileNotFoundError) 777 return Collect(futures, except_pass=FileNotFoundError)
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/docs/server2/api_models.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698