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

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

Issue 386443003: Docserver: Add 'deprecated since' message for API nodes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 posixpath 5 import posixpath
6 6
7 from api_schema_graph import APISchemaGraph 7 from api_schema_graph import APISchemaGraph
8 from branch_utility import BranchUtility, ChannelInfo 8 from branch_utility import BranchUtility, ChannelInfo
9 from extensions_paths import API_PATHS, JSON_TEMPLATES 9 from extensions_paths import API_PATHS, JSON_TEMPLATES
10 from features_bundle import FeaturesBundle 10 from features_bundle import FeaturesBundle
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 ''' 178 '''
179 if version < _SVN_MIN_VERSION: 179 if version < _SVN_MIN_VERSION:
180 # SVN data isn't available below this version. 180 # SVN data isn't available below this version.
181 return False 181 return False
182 features_bundle = self._CreateFeaturesBundle(file_system) 182 features_bundle = self._CreateFeaturesBundle(file_system)
183 available_channel = None 183 available_channel = None
184 if version >= _API_FEATURES_MIN_VERSION: 184 if version >= _API_FEATURES_MIN_VERSION:
185 # The _api_features.json file first appears in version 28 and should be 185 # The _api_features.json file first appears in version 28 and should be
186 # the most reliable for finding API availability. 186 # the most reliable for finding API availability.
187 available_channel = _GetChannelFromAPIFeatures(api_name, 187 available_channel = _GetChannelFromAPIFeatures(api_name,
188 features_bundle) 188 features_bundle)
189 if version >= _ORIGINAL_FEATURES_MIN_VERSION: 189 if version >= _ORIGINAL_FEATURES_MIN_VERSION:
190 # The _permission_features.json and _manifest_features.json files are 190 # The _permission_features.json and _manifest_features.json files are
191 # present in Chrome 20 and onwards. Use these if no information could be 191 # present in Chrome 20 and onwards. Use these if no information could be
192 # found using _api_features.json. 192 # found using _api_features.json.
193 available_channel = ( 193 available_channel = (
194 available_channel or 194 available_channel or
195 _GetChannelFromPermissionFeatures(api_name, features_bundle) or 195 _GetChannelFromPermissionFeatures(api_name, features_bundle) or
196 _GetChannelFromManifestFeatures(api_name, features_bundle)) 196 _GetChannelFromManifestFeatures(api_name, features_bundle))
197 if available_channel is not None: 197 if available_channel is not None:
198 return available_channel == 'stable' 198 return available_channel == 'stable'
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 # Continue looping until there are no longer differences between this 356 # Continue looping until there are no longer differences between this
357 # version and trunk. 357 # version and trunk.
358 return version_stat != trunk_stat 358 return version_stat != trunk_stat
359 359
360 self._file_system_iterator.Ascending( 360 self._file_system_iterator.Ascending(
361 self.GetAPIAvailability(api_name).channel_info, 361 self.GetAPIAvailability(api_name).channel_info,
362 update_availability_graph) 362 update_availability_graph)
363 363
364 self._node_level_object_store.Set(api_name, availability_graph) 364 self._node_level_object_store.Set(api_name, availability_graph)
365 return availability_graph 365 return availability_graph
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698